Updated alpha and cupid class for testing random offset.
This commit is contained in:
parent
0a35d4383d
commit
5e13b9ed2d
|
|
@ -35,9 +35,9 @@ public class Alpha {
|
|||
|
||||
frameList.add(new Frame(frameOne()));
|
||||
|
||||
ParticleStorage.addParticleSet(APartType.KILL, new ParticleSet(frameList, 5, 10, 10, APartType.KILL, "UNIQUE_NAME_ALPHA", "apart.particle.test", itemStack));
|
||||
ParticleStorage.addParticleSet(APartType.TELEPORT_ARRIVE, new ParticleSet(frameList, 5, 10, 10, APartType.TELEPORT_ARRIVE, "UNIQUE_NAME_ALPHA", "apart.particle.test", itemStack));
|
||||
ParticleStorage.addParticleSet(APartType.CLICK_BLOCK, new ParticleSet(frameList, 5, 10, 10, APartType.CLICK_BLOCK, "UNIQUE_NAME_ALPHA", "apart.particle.test", itemStack));
|
||||
ParticleStorage.addParticleSet(APartType.KILL, new ParticleSet(frameList, 5, 10, 10, APartType.KILL, "ALPHA_KILL", "apart.particle.alpha", itemStack));
|
||||
ParticleStorage.addParticleSet(APartType.TELEPORT_ARRIVE, new ParticleSet(frameList, 5, 10, 10, APartType.TELEPORT_ARRIVE, "ALPHA_TELEPORT", "apart.particle.alpha", itemStack));
|
||||
ParticleStorage.addParticleSet(APartType.CLICK_BLOCK, new ParticleSet(frameList, 5, 10, 10, APartType.CLICK_BLOCK, "ALPHA_CLICK", "apart.particle.alpha", itemStack));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ public class Alpha {
|
|||
double[] zPts = {0.91, 0.86, 0.81, 0.76, 0.70, 0.63, 0.58, 0.52, 0.47, 0.42, 0.39, 0.38, 0.39, 0.42, 0.47, 0.52, 0.58, 0.63, 0.69, 0.75, 0.81, 0.86, 0.89, 0.90, 0.89, 0.87, 0.83, 0.79, 0.74, 0.69, 0.57, 0.51, 0.46, 0.42, 0.40, 0.40, 0.42, 0.47};
|
||||
|
||||
for(int i = 0; i < xPts.length; i++) {
|
||||
list.add(new AParticle(xPts[i] * 5, 2, zPts[i] * 5, 0.5, new ParticleBuilder(Particle.REDSTONE).color(Color.GRAY).count(1)));
|
||||
list.add(new AParticle(xPts[i] * 5, 2, zPts[i] * 5, 0, new ParticleBuilder(Particle.REDSTONE).color(Color.GRAY).count(1)));
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
|
|
|||
59
src/main/java/com/alttd/particles/Cupid.java
Normal file
59
src/main/java/com/alttd/particles/Cupid.java
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
package com.alttd.particles;
|
||||
|
||||
import com.alttd.objects.APartType;
|
||||
import com.alttd.objects.AParticle;
|
||||
import com.alttd.objects.Frame;
|
||||
import com.alttd.objects.ParticleSet;
|
||||
import com.alttd.storage.ParticleStorage;
|
||||
import com.destroystokyo.paper.ParticleBuilder;
|
||||
import net.kyori.adventure.text.minimessage.MiniMessage;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Particle;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
import org.bukkit.inventory.meta.ItemMeta;
|
||||
import org.bukkit.inventory.meta.PotionMeta;
|
||||
import org.bukkit.potion.Potion;
|
||||
import org.bukkit.potion.PotionData;
|
||||
import org.bukkit.potion.PotionType;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class Cupid {
|
||||
private static final ItemStack itemStack;
|
||||
|
||||
static {
|
||||
MiniMessage miniMessage = MiniMessage.miniMessage();
|
||||
itemStack = new ItemStack(Material.PINK_TULIP);
|
||||
/*PotionMeta meta = (PotionMeta) itemStack.getItemMeta();
|
||||
meta.setBasePotionData(new PotionData(PotionType.REGEN));
|
||||
itemStack.setItemMeta(meta);*/
|
||||
ItemMeta itemMeta = itemStack.getItemMeta();
|
||||
itemMeta.displayName(miniMessage.deserialize("<gold>Cupid Particles</gold>"));
|
||||
itemMeta.lore(List.of(
|
||||
miniMessage.deserialize("<dark_aqua>No one is immune</dark_aqua>"),
|
||||
miniMessage.deserialize("<dark_aqua>to Cupid's arrow...</dark_aqua>")));
|
||||
itemStack.setItemMeta(itemMeta);
|
||||
}
|
||||
|
||||
public Cupid() {
|
||||
List<Frame> frameList = new ArrayList<>();
|
||||
|
||||
frameList.add(new Frame(frameOne()));
|
||||
|
||||
ParticleStorage.addParticleSet(APartType.HEAD, new ParticleSet(frameList, 10, 5, 40, APartType.HEAD, "CUPID_HEAD", "apart.particle.test", itemStack));
|
||||
ParticleStorage.addParticleSet(APartType.TELEPORT_ARRIVE, new ParticleSet(frameList, 10, 5, 40, APartType.TELEPORT_ARRIVE, "CUPID_TELEPORT", "apart.particle.test", itemStack));
|
||||
ParticleStorage.addParticleSet(APartType.CLICK_BLOCK, new ParticleSet(frameList, 10, 5, 40, APartType.CLICK_BLOCK, "CUPID_CLICK", "apart.particle.test", itemStack));
|
||||
}
|
||||
|
||||
|
||||
public List<AParticle> frameOne() {
|
||||
List<AParticle> list = new ArrayList<>();
|
||||
|
||||
list.add(new AParticle((Math.random() * 2) - 1, (Math.random() * 2) - 1, (Math.random() * 2) - 1, 0.5, new ParticleBuilder(Particle.HEART).count(1)));
|
||||
list.add(new AParticle((Math.random() * 2) - 1, (Math.random() * 2) - 1, (Math.random() * 2) - 1, 0.5, new ParticleBuilder(Particle.HEART).count(1)));
|
||||
list.add(new AParticle((Math.random() * 2) - 1, (Math.random() * 2) - 1, (Math.random() * 2) - 1, 0.5,new ParticleBuilder(Particle.HEART).count(1)));
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
|
@ -4,5 +4,6 @@ public class InitParticles {
|
|||
public static void init() {
|
||||
new Test();
|
||||
new Alpha();
|
||||
new Cupid();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user