Hotfix some exceptions

This commit is contained in:
2025-03-03 09:56:12 +01:00
parent b4eab65757
commit 5f73395b63
3 changed files with 32 additions and 34 deletions
@@ -25,7 +25,7 @@ public interface ParticleElement {
} }
default Particle.DustOptions withColor(int r, int g, int b) { default Particle.DustOptions withColor(int r, int g, int b) {
return new Particle.DustOptions(Color.fromRGB(r, g, b), randomSize()); return new Particle.DustOptions(Color.fromRGB(r, g, b), RANDOM.nextFloat() / 2);
} }
default void display(Location location, Player root, boolean onlySelf, boolean onlyOther, Consumer<Player> consumer) { default void display(Location location, Player root, boolean onlySelf, boolean onlyOther, Consumer<Player> consumer) {
@@ -48,15 +48,13 @@ public class TrippleCircle extends Circle {
Vector vector = new Vector(distance, 0, 0); Vector vector = new Vector(distance, 0, 0);
vector.rotateAroundY((particleTickData.getDeg() * speed) % 360); vector.rotateAroundY((particleTickData.getDeg() * speed) % 360);
ParticleTickData nParticleTickData = particleTickData.withLocation(location.clone().add(vector));
particleElement.tick(nParticleTickData);
vector.rotateAroundY(120); particleElement.tick(particleTickData.withLocation(location.clone().add(vector)));
nParticleTickData = particleTickData.withLocation(location.clone().add(vector));
second.tick(nParticleTickData);
vector.rotateAroundY(120); vector.rotateAroundY(120 / 180.0);
nParticleTickData = particleTickData.withLocation(location.clone().add(vector)); second.tick(particleTickData.withLocation(location.clone().add(vector)));
third.tick(nParticleTickData);
vector.rotateAroundY(120 / 180.0);
third.tick(particleTickData.withLocation(location.clone().add(vector)));
} }
} }
@@ -28,25 +28,25 @@ public enum CustomEasterParticle implements ParticleEnum {
), ),
PLAYER_10916(new ParticleData(Material.TORCHFLOWER, "PARTICLE_PLAYER_10916_AURA", ParticleRequirement.easterEventSpecificPlayer(10916), PLAYER_10916(new ParticleData(Material.TORCHFLOWER, "PARTICLE_PLAYER_10916_AURA", ParticleRequirement.easterEventSpecificPlayer(10916),
new Always(new NonMoving(new Group( new Always(new NonMoving(new Group(
new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.1, 1), location -> location.add(0, 0.2, 0)), new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.5, 1), location -> location.add(0, 0.2, 0)),
new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.1, 1), location -> location.add(0, 0.3, 0)), new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.5, 1), location -> location.add(0, 0.3, 0)),
new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.1, 1), location -> location.add(0, 0.4, 0)), new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.55, 1), location -> location.add(0, 0.4, 0)),
new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.1, 1), location -> location.add(0, 0.5, 0)), new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.55, 1), location -> location.add(0, 0.5, 0)),
new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.1, 1), location -> location.add(0, 0.6, 0)), new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.65, 1), location -> location.add(0, 0.6, 0)),
new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.1, 1), location -> location.add(0, 0.7, 0)), new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.65, 1), location -> location.add(0, 0.7, 0)),
new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.1, 1), location -> location.add(0, 0.8, 0)), new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.7, 1), location -> location.add(0, 0.8, 0)),
new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.1, 1), location -> location.add(0, 0.9, 0)), new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.7, 1), location -> location.add(0, 0.9, 0)),
new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.1, 1), location -> location.add(0, 1.0, 0)), new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.7, 1), location -> location.add(0, 1.0, 0)),
new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.1, 1), location -> location.add(0, 1.1, 0)), new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.75, 1), location -> location.add(0, 1.1, 0)),
new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.1, 1), location -> location.add(0, 1.2, 0)), new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.75, 1), location -> location.add(0, 1.2, 0)),
new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.1, 1), location -> location.add(0, 1.3, 0)), new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.75, 1), location -> location.add(0, 1.3, 0)),
new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.1, 1), location -> location.add(0, 1.4, 0)), new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.8, 1), location -> location.add(0, 1.4, 0)),
new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.1, 1), location -> location.add(0, 1.5, 0)), new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.8, 1), location -> location.add(0, 1.5, 0)),
new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.1, 1), location -> location.add(0, 1.6, 0)), new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.8, 1), location -> location.add(0, 1.6, 0)),
new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.1, 1), location -> location.add(0, 1.7, 0)), new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.85, 1), location -> location.add(0, 1.7, 0)),
new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.1, 1), location -> location.add(0, 1.8, 0)), new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.85, 1), location -> location.add(0, 1.8, 0)),
new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.1, 1), location -> location.add(0, 1.9, 0)), new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.85, 1), location -> location.add(0, 1.9, 0)),
new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.1, 1), location -> location.add(0, 2.0, 0)) new LocationMutator(new Circle(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.RED)), 0.9, 1), location -> location.add(0, 2.0, 0))
)))) ))))
), ),
PLAYER_10697(new ParticleData(Material.GUNPOWDER, "PARTICLE_PLAYER_10697_AURA", ParticleRequirement.easterEventSpecificPlayer(10697), PLAYER_10697(new ParticleData(Material.GUNPOWDER, "PARTICLE_PLAYER_10697_AURA", ParticleRequirement.easterEventSpecificPlayer(10697),
@@ -66,10 +66,10 @@ public enum CustomEasterParticle implements ParticleEnum {
), ),
PLAYER_153(new ParticleData(Material.OAK_SIGN, "PARTICLE_PLAYER_153", ParticleRequirement.easterEventSpecificPlayer(153), PLAYER_153(new ParticleData(Material.OAK_SIGN, "PARTICLE_PLAYER_153", ParticleRequirement.easterEventSpecificPlayer(153),
new Always(new Delayed(new NonFlying(new Group( new Always(new Delayed(new NonFlying(new Group(
new Wing(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.DARK_GRAY)), 0.15, WingDesign.ELY_E), new Wing(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.DARK_GRAY)), 0.2, WingDesign.ELY_E),
new Wing(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.GREEN)), 0.15, WingDesign.ELY_L), new Wing(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.GREEN)), 0.2, WingDesign.ELY_L),
new Wing(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.GRAY)), 0.15, WingDesign.ELY_Y) new Wing(new DustParticle(Particle.REDSTONE, 0, 0, 0, 0, 1, new Gradient(Color.GRAY)), 0.2, WingDesign.ELY_Y)
)), 80))) )), 20)))
), ),
// TODO: Implement zSalos! -> Team // TODO: Implement zSalos! -> Team
// TODO: Implement GroupXyz! // TODO: Implement GroupXyz!
@@ -83,7 +83,7 @@ public enum CustomEasterParticle implements ParticleEnum {
new DustParticle(Particle.REDSTONE, new Gradient(Color.CYAN, Color.BLUE, Color.MAGENTA.darker(), Color.RED, Color.YELLOW, Color.GREEN, Color.CYAN)), new DustParticle(Particle.REDSTONE, new Gradient(Color.CYAN, Color.BLUE, Color.MAGENTA.darker(), Color.RED, Color.YELLOW, Color.GREEN, Color.CYAN)),
new DustParticle(Particle.REDSTONE, new Gradient(Color.CYAN, Color.BLUE, Color.MAGENTA.darker(), Color.RED, Color.YELLOW, Color.GREEN, Color.CYAN)), new DustParticle(Particle.REDSTONE, new Gradient(Color.CYAN, Color.BLUE, Color.MAGENTA.darker(), Color.RED, Color.YELLOW, Color.GREEN, Color.CYAN)),
0.7, 0.7,
0.5), location -> location.add(0, 1.2, 0) 0.5), location -> location.add(0, 0.6, 0)
))))) )))))
), ),
// TODO: Implement Gehfxhler! // TODO: Implement Gehfxhler!
@@ -93,7 +93,7 @@ public enum CustomEasterParticle implements ParticleEnum {
new Always(new NonFlying(new Delayed(new Wing(new SimpleParticle(Particle.CRIT_MAGIC, 0, 0, 0, 0, 1), 0.2, WingDesign.EV), 20)))) new Always(new NonFlying(new Delayed(new Wing(new SimpleParticle(Particle.CRIT_MAGIC, 0, 0, 0, 0, 1), 0.2, WingDesign.EV), 20))))
), ),
TEAM_158_2(new ParticleData(Material.ENDER_EYE, "PARTICLE_TEAM_158_2", ParticleRequirement.easterEventSpecificTeam(158), TEAM_158_2(new ParticleData(Material.ENDER_EYE, "PARTICLE_TEAM_158_2", ParticleRequirement.easterEventSpecificTeam(158),
new Always(new NonFlying(new YOffset(new DoubleCircle(new SimpleParticle(Particle.SPORE_BLOSSOM_AIR, 0.01f, 0.01f, 0.01f, 0.1, 1), new SimpleParticle(Particle.SPORE_BLOSSOM_AIR, 0.01f, 0.01f, 0.01f, 0.1, 1), 0.5, 1), 1, 0, 2, false, false)))) new Always(new NonFlying(new YOffset(new DoubleCircle(new DustParticle(Particle.REDSTONE, 0.01f, 0.01f, 0.01f, 0.1, 1, new Gradient(Color.RED)), new DustParticle(Particle.REDSTONE, 0.01f, 0.01f, 0.01f, 0.1, 1, new Gradient(Color.BLUE)), 0.5, 1), 1, 0, 2, false, false))))
), ),
; ;
public static ParticleEnum[] particles = values(); public static ParticleEnum[] particles = values();