From 468cc040d677bd4b88157cd32086b65da3f546ec Mon Sep 17 00:00:00 2001 From: yoyosource Date: Tue, 4 Apr 2023 11:20:48 +0200 Subject: [PATCH] Update old particles to new system (WIP) --- .../lobby/otherparticle/ParticleData.java | 7 ++- .../otherparticle/elements/DustParticle.java | 2 +- .../elements/LocationMutator.java | 4 ++ .../otherparticle/elements/Sneaking.java | 30 +++++++++ .../particles/EasterParticle.java | 39 ++++++++++++ .../particles/EventParticle.java | 29 +++++++++ .../particles/EventParticleParticipation.java | 45 +++++++++++++ .../particles/EventParticlePlacement.java | 51 +++++++++++++++ .../particles/PlayerParticle.java | 63 +++++++++++++++++++ .../otherparticle/particles/TeamParticle.java | 50 +++++++++++++++ .../custom/CustomEasterParticle.java | 4 ++ .../particles/custom/CustomTeamParticle.java | 24 +++++++ 12 files changed, 345 insertions(+), 3 deletions(-) create mode 100644 src/de/steamwar/lobby/otherparticle/elements/Sneaking.java create mode 100644 src/de/steamwar/lobby/otherparticle/particles/EasterParticle.java create mode 100644 src/de/steamwar/lobby/otherparticle/particles/EventParticle.java create mode 100644 src/de/steamwar/lobby/otherparticle/particles/EventParticleParticipation.java create mode 100644 src/de/steamwar/lobby/otherparticle/particles/EventParticlePlacement.java create mode 100644 src/de/steamwar/lobby/otherparticle/particles/PlayerParticle.java create mode 100644 src/de/steamwar/lobby/otherparticle/particles/TeamParticle.java create mode 100644 src/de/steamwar/lobby/otherparticle/particles/custom/CustomEasterParticle.java create mode 100644 src/de/steamwar/lobby/otherparticle/particles/custom/CustomTeamParticle.java diff --git a/src/de/steamwar/lobby/otherparticle/ParticleData.java b/src/de/steamwar/lobby/otherparticle/ParticleData.java index e65dd57..b443250 100644 --- a/src/de/steamwar/lobby/otherparticle/ParticleData.java +++ b/src/de/steamwar/lobby/otherparticle/ParticleData.java @@ -16,17 +16,20 @@ public class ParticleData { private final String name; private final Set attributes = new LinkedHashSet<>(); private final ParticleRequirement requirement; + private final ParticleElement particleElement; - public ParticleData(Material material, String name) { + public ParticleData(Material material, String name, ParticleElement particleElement) { this.material = material; this.name = name; this.requirement = ParticleRequirement.NO_REQUIRMENT; + this.particleElement = particleElement; } - public ParticleData(Material material, String name, ParticleRequirement requirement) { + public ParticleData(Material material, String name, ParticleRequirement requirement, ParticleElement particleElement) { this.material = material; this.name = name; this.requirement = requirement; + this.particleElement = particleElement; } public ParticleData add(String attribute) { diff --git a/src/de/steamwar/lobby/otherparticle/elements/DustParticle.java b/src/de/steamwar/lobby/otherparticle/elements/DustParticle.java index 55ca442..96b37c1 100644 --- a/src/de/steamwar/lobby/otherparticle/elements/DustParticle.java +++ b/src/de/steamwar/lobby/otherparticle/elements/DustParticle.java @@ -25,7 +25,7 @@ public class DustParticle implements ParticleElement { this.vz = vz; } - public DustParticle(Particle particle, float vx, float vy, float vz, float speed, int count) { + public DustParticle(Particle particle, float vx, float vy, float vz, double speed, int count) { this.particle = particle; this.vx = vx; this.vy = vy; diff --git a/src/de/steamwar/lobby/otherparticle/elements/LocationMutator.java b/src/de/steamwar/lobby/otherparticle/elements/LocationMutator.java index f0e389d..2de8f8a 100644 --- a/src/de/steamwar/lobby/otherparticle/elements/LocationMutator.java +++ b/src/de/steamwar/lobby/otherparticle/elements/LocationMutator.java @@ -15,6 +15,10 @@ public class LocationMutator extends DelegatingParticleElement { this.mutator = mutator; } + public LocationMutator(ParticleElement particleElement, double vx, double vy, double vz) { + this(particleElement, location -> location.add(vx, vy, vz)); + } + @Override public String attribute() { return null; diff --git a/src/de/steamwar/lobby/otherparticle/elements/Sneaking.java b/src/de/steamwar/lobby/otherparticle/elements/Sneaking.java new file mode 100644 index 0000000..a087ba5 --- /dev/null +++ b/src/de/steamwar/lobby/otherparticle/elements/Sneaking.java @@ -0,0 +1,30 @@ +package de.steamwar.lobby.otherparticle.elements; + +import de.steamwar.lobby.otherparticle.ParticleElement; +import de.steamwar.lobby.otherparticle.ParticleTickData; +import de.steamwar.lobby.otherparticle.ParticleTickType; + +public class Sneaking extends DelegatingParticleElement { + + public Sneaking(ParticleElement particleElement) { + super(particleElement); + } + + @Override + public ParticleTickType tickType() { + return ParticleTickType.SNEAK; + } + + @Override + public String attribute() { + return null; // TODO: Implement this attribute + } + + @Override + public void tick(ParticleTickData particleTickData) { + if (!particleTickData.getPlayer().isSneaking()) { + return; + } + particleElement.tick(particleTickData); + } +} diff --git a/src/de/steamwar/lobby/otherparticle/particles/EasterParticle.java b/src/de/steamwar/lobby/otherparticle/particles/EasterParticle.java new file mode 100644 index 0000000..c5291e7 --- /dev/null +++ b/src/de/steamwar/lobby/otherparticle/particles/EasterParticle.java @@ -0,0 +1,39 @@ +package de.steamwar.lobby.otherparticle.particles; + +import de.steamwar.lobby.otherparticle.ParticleData; +import de.steamwar.lobby.otherparticle.ParticleEnum; +import de.steamwar.lobby.otherparticle.ParticleRequirement; +import de.steamwar.lobby.otherparticle.elements.LocationMutator; +import de.steamwar.lobby.otherparticle.elements.SimpleParticle; +import lombok.AllArgsConstructor; +import lombok.Getter; +import org.bukkit.Material; +import org.bukkit.Particle; + +@AllArgsConstructor +public enum EasterParticle implements ParticleEnum { + + EGG_HUNT_EASY(new ParticleData(Material.LIME_CONCRETE_POWDER, "PARTICLE_EGG_HUNT_EASY", ParticleRequirement.EGG_HUNT_EASY, + new LocationMutator(new SimpleParticle(Particle.FALLING_SPORE_BLOSSOM), 0, 2.2, 0)) + ), + EGG_HUNT_MEDIUM(new ParticleData(Material.YELLOW_CONCRETE_POWDER, "PARTICLE_EGG_HUNT_MEDIUM", ParticleRequirement.EGG_HUNT_MEDIUM, + new SimpleParticle(Particle.FALLING_SPORE_BLOSSOM)) + ), + EGG_HUNT_HARD(new ParticleData(Material.ORANGE_CONCRETE_POWDER, "PARTICLE_EGG_HUNT_HARD", ParticleRequirement.EGG_HUNT_HARD, + new SimpleParticle(Particle.FALLING_SPORE_BLOSSOM)) + ), + EGG_HUNT_EXTREME(new ParticleData(Material.RED_CONCRETE_POWDER, "PARTICLE_EGG_HUNT_EXTREME", ParticleRequirement.EGG_HUNT_EXTREME, + new SimpleParticle(Particle.FALLING_SPORE_BLOSSOM)) + ), + EGG_HUNT_ADVANCED(new ParticleData(Material.PURPLE_CONCRETE_POWDER, "PARTICLE_EGG_HUNT_ADVANCED", ParticleRequirement.EGG_HUNT_ADVANCED, + new SimpleParticle(Particle.FALLING_SPORE_BLOSSOM)) + ), + EGG_HUNT_HALF(new ParticleData(Material.PURPLE_CONCRETE_POWDER, "PARTICLE_EGG_HUNT_HALF", ParticleRequirement.EGG_HUNT_FOUND_HALF, + new SimpleParticle(Particle.FALLING_SPORE_BLOSSOM)) + ), + ; + public static ParticleEnum[] particles = values(); + + @Getter + private ParticleData particle; +} diff --git a/src/de/steamwar/lobby/otherparticle/particles/EventParticle.java b/src/de/steamwar/lobby/otherparticle/particles/EventParticle.java new file mode 100644 index 0000000..abaa6bd --- /dev/null +++ b/src/de/steamwar/lobby/otherparticle/particles/EventParticle.java @@ -0,0 +1,29 @@ +package de.steamwar.lobby.otherparticle.particles; + +import de.steamwar.lobby.otherparticle.ParticleData; +import de.steamwar.lobby.otherparticle.ParticleEnum; +import de.steamwar.lobby.otherparticle.ParticleRequirement; +import de.steamwar.lobby.otherparticle.elements.Always; +import de.steamwar.lobby.otherparticle.elements.Circle; +import de.steamwar.lobby.otherparticle.elements.LocationMutator; +import de.steamwar.lobby.otherparticle.elements.SimpleParticle; +import lombok.AllArgsConstructor; +import lombok.Getter; +import org.bukkit.Material; +import org.bukkit.Particle; + +@AllArgsConstructor +public enum EventParticle implements ParticleEnum { + + WATER(new ParticleData(Material.WATER_BUCKET, "PARTICLE_WATER", ParticleRequirement.EVENT_PARTICIPATION, + new Always(new Circle(new LocationMutator(new SimpleParticle(Particle.DRIP_WATER), 0, 1.1, 0)))) + ), + LAVA(new ParticleData(Material.LAVA_BUCKET, "PARTICLE_FIRE", ParticleRequirement.EVENT_PARTICIPATION, + new Always(new Circle(new LocationMutator(new SimpleParticle(Particle.DRIP_LAVA), 0, 1.1, 0)))) + ), + ; + public static ParticleEnum[] particles = values(); + + @Getter + private ParticleData particle; +} diff --git a/src/de/steamwar/lobby/otherparticle/particles/EventParticleParticipation.java b/src/de/steamwar/lobby/otherparticle/particles/EventParticleParticipation.java new file mode 100644 index 0000000..a55a3bd --- /dev/null +++ b/src/de/steamwar/lobby/otherparticle/particles/EventParticleParticipation.java @@ -0,0 +1,45 @@ +package de.steamwar.lobby.otherparticle.particles; + +import de.steamwar.lobby.otherparticle.ParticleData; +import de.steamwar.lobby.otherparticle.ParticleEnum; +import de.steamwar.lobby.otherparticle.ParticleRequirement; +import de.steamwar.lobby.otherparticle.WingDesign; +import de.steamwar.lobby.otherparticle.elements.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import org.bukkit.Material; +import org.bukkit.Particle; + +@AllArgsConstructor +public enum EventParticleParticipation implements ParticleEnum { + + WarGearSeason(new ParticleData(Material.BOOK, "PARTICLE_EVENT_ENCHANTING", ParticleRequirement.eventParticipation(22), + new SimpleParticle(Particle.ENCHANTMENT_TABLE)) + ), + AirshipEvent(new ParticleData(Material.SNOW_BLOCK, "PARTICLE_EVENT_CLOUD", ParticleRequirement.eventParticipation(26), + new SimpleParticle(Particle.CLOUD)) + ), + HellsBellsWs(new ParticleData(Material.TNT, "PARTICLE_EVENT_SMOKE", ParticleRequirement.eventParticipation(28), + new Circle(new SimpleParticle(Particle.CAMPFIRE_COSY_SMOKE, 0, 0, 0, 0.01))) + ), + Underwater(new ParticleData(Material.PRISMARINE_BRICKS, "PARTICLE_EVENT_WATER", ParticleRequirement.eventParticipation(31), + new SimpleParticle(Particle.DRIP_WATER)) + ), + AdventWarShip(new ParticleData(Material.PRISMARINE_WALL, "PARTICLE_EVENT_WATER", ParticleRequirement.eventParticipation(32), + new Group(new SimpleParticle(Particle.DRIP_WATER), new SimpleParticle(Particle.WATER_WAKE, 0.2F, 0.2F, 0.2F, 0.01))) + ), + MiniWarGearLiga(new ParticleData(Material.PRISMARINE_SLAB, "PARTICLE_EVENT_WATER", ParticleRequirement.eventParticipation(33), + new Circle(new SimpleParticle(Particle.WATER_WAKE, 0, 0, 0, 0))) + ), + UnderwaterMWG(new ParticleData(Material.BLUE_CARPET, "PARTICLE_EVENT_RAIN_CLOUD", ParticleRequirement.eventParticipation(35), + new Always(new LocationMutator(new Group(new SimpleParticle(Particle.CLOUD, 0.3F, 0.1F, 0.3F, 0.01), new SimpleParticle(Particle.WATER_WAKE, 0.3F, 0.1F, 0.3F, 0.01), new LocationMutator(new SimpleParticle(Particle.DRIP_WATER, 0.3F, 0.0F, 0.3F, 0.01), 0, 0.2, 0)), 0, 2.2, 0))) + ), + WarGearSeason2022(new ParticleData(Material.DIAMOND_SWORD, "PARTICLE_EVENT_WINGS", ParticleRequirement.eventParticipation(37), + new Always(new Delayed(new NonFlying(new Wing(new SimpleParticle(Particle.DRAGON_BREATH, 0, 0, 0, 0, 1), 0.15, WingDesign.COMPLEX)), 20))) + ), + ; + public static ParticleEnum[] particles = values(); + + @Getter + private ParticleData particle; +} diff --git a/src/de/steamwar/lobby/otherparticle/particles/EventParticlePlacement.java b/src/de/steamwar/lobby/otherparticle/particles/EventParticlePlacement.java new file mode 100644 index 0000000..e339e72 --- /dev/null +++ b/src/de/steamwar/lobby/otherparticle/particles/EventParticlePlacement.java @@ -0,0 +1,51 @@ +package de.steamwar.lobby.otherparticle.particles; + +import de.steamwar.lobby.otherparticle.ParticleData; +import de.steamwar.lobby.otherparticle.ParticleEnum; +import de.steamwar.lobby.otherparticle.ParticleRequirement; +import de.steamwar.lobby.otherparticle.WingDesign; +import de.steamwar.lobby.otherparticle.elements.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import org.bukkit.Material; +import org.bukkit.Particle; + +@AllArgsConstructor +public enum EventParticlePlacement implements ParticleEnum { + + WarGearSeason(new ParticleData(Material.ENCHANTING_TABLE, "PARTICLE_EVENT_ENCHANTING", ParticleRequirement.eventPlacement(22, 12, 285, 54), + new Cloud(new Circle(new LocationMutator(new SimpleParticle(Particle.ENCHANTMENT_TABLE, 0, 0, 0, 0.01), 0, 1.1, 0))) + )), + AirshipEvent(new ParticleData(Material.SNOWBALL, "PARTICLE_EVENT_CLOUD", ParticleRequirement.eventPlacement(26, 205, 9, 54, 120, 292), + new Circle(new LocationMutator(new SimpleParticle(Particle.CLOUD, 0, 0, 0, 0.01), 0, 2.2, 0)) + )), + HellsBellsWs(new ParticleData(Material.TNT_MINECART, "PARTICLE_EVENT_SMOKE", ParticleRequirement.eventPlacement(28, 205, 9, 11), + new Cloud(new Circle(new LocationMutator(new SimpleParticle(Particle.CAMPFIRE_COSY_SMOKE, 0, 0, 0, 0.01), 0, 2.2, 0))) + )), + Underwater(new ParticleData(Material.PRISMARINE_SHARD, "PARTICLE_EVENT_WATER", ParticleRequirement.eventPlacement(31, 9, 210, 520), + new Cloud(new SimpleParticle(Particle.DRIP_WATER))) + ), + AdventWarShip(new ParticleData(Material.PRISMARINE_CRYSTALS, "PARTICLE_EVENT_WATER", ParticleRequirement.eventPlacement(31, 9, 205, 210), + new Always(new LocationMutator(new Circle(new Group(new SimpleParticle(Particle.DRIP_WATER), new SimpleParticle(Particle.WATER_WAKE, 0.2F, 0.2F, 0.2F, 0.01))), 0, 1.1, 0))) + ), + MiniWarGearLiga(new ParticleData(Material.IRON_SWORD, "PARTICLE_EVENT_WINGS", ParticleRequirement.eventPlacement(33, 9, 34, 205), + new Always(new Delayed(new NonFlying(new Wing(new SimpleParticle(Particle.WATER_WAKE, 0, 0, 0, 0, 1), 0.15, WingDesign.MWGL)), 20))) + ), + Absturz(new ParticleData(Material.FEATHER, "PARTICLE_EVENT_WINGS", ParticleRequirement.eventPlacement(34, 210, 205, 527, 286), + new Always(new Delayed(new NonFlying(new Wing(new SimpleParticle(Particle.CRIT_MAGIC, 0, 0, 0, 0, 1), 0.15, WingDesign.SIMPLE)), 20))) + ), + UnderwaterMWG(new ParticleData(Material.CYAN_CARPET, "PARTICLE_EVENT_RAIN_CLOUD", ParticleRequirement.eventPlacement(35, 9, 210), + new Always(new Delayed(new NonFlying(new Wing(new SimpleParticle(Particle.CRIT_MAGIC, 0, 0, 0, 0, 1), 0.15, WingDesign.SW)), 20))) + ), + WarGearSeason2022(new ParticleData(Material.DIAMOND_HELMET, "PARTICLE_EVENT_WGS", ParticleRequirement.eventPlacement(37, 285, 210, 122), + new Always(new Delayed(new NonFlying(new Wing(new SimpleParticle(Particle.FIREWORKS_SPARK, 0, 0, 0, 0, 1), 0.15, WingDesign.WGS)), 20))) + ), + WargearClash(new ParticleData(Material.GOLDEN_SWORD, "PARTICLE_EVENT_WARGEARCLASH", ParticleRequirement.eventPlacement(38, 210, 158, 167, 286), + new Always(new Delayed(new NonFlying(new Wing(new SimpleParticle(Particle.CRIT_MAGIC, 0, 0, 0, 0, 1), 0.1, WingDesign.SWORD_CROSSED)), 20))) + ), + ; + public static ParticleEnum[] particles = values(); + + @Getter + private ParticleData particle; +} diff --git a/src/de/steamwar/lobby/otherparticle/particles/PlayerParticle.java b/src/de/steamwar/lobby/otherparticle/particles/PlayerParticle.java new file mode 100644 index 0000000..88d095e --- /dev/null +++ b/src/de/steamwar/lobby/otherparticle/particles/PlayerParticle.java @@ -0,0 +1,63 @@ +package de.steamwar.lobby.otherparticle.particles; + +import de.steamwar.lobby.otherparticle.ParticleData; +import de.steamwar.lobby.otherparticle.ParticleEnum; +import de.steamwar.lobby.otherparticle.elements.DustParticle; +import de.steamwar.lobby.otherparticle.elements.LocationMutator; +import de.steamwar.lobby.otherparticle.elements.SimpleParticle; +import lombok.AllArgsConstructor; +import lombok.Getter; +import org.bukkit.Material; +import org.bukkit.Particle; + +@AllArgsConstructor +public enum PlayerParticle implements ParticleEnum { + + SNEEZE(new ParticleData(Material.SLIME_BLOCK, "PARTICLE_SNEEZE", + new SimpleParticle(Particle.SNEEZE, 0.2F, 0.2F, 0.2F, 0.01)) + ), + SMOKE(new ParticleData(Material.COBWEB, "PARTICLE_SMOKE", + new SimpleParticle(Particle.SMOKE_NORMAL, 0.2F, 0.2F, 0.2F, 0.01)) + ), + FIRE(new ParticleData(Material.LAVA_BUCKET, "PARTICLE_FIRE", + new SimpleParticle(Particle.DRIP_LAVA)) + ), + WATER(new ParticleData(Material.WATER_BUCKET, "PARTICLE_WATER", + new SimpleParticle(Particle.DRIP_WATER)) + ), + HEARTH(new ParticleData(Material.RED_DYE, "PARTICLE_HEART", + new LocationMutator(new SimpleParticle(Particle.HEART), 0, 2.2, 0)) + ), + NOTES(new ParticleData(Material.NOTE_BLOCK, "PARTICLE_NOTES", + new LocationMutator(new SimpleParticle(Particle.NOTE), 0, 2.2, 0)) + ), + NAUTILUS(new ParticleData(Material.NAUTILUS_SHELL, "PARTICLE_NAUTILUS", + new SimpleParticle(Particle.NAUTILUS, 0.2F, 0.2F ,0.2F, 0.01)) + ), + SNOWBALL(new ParticleData(Material.SNOWBALL, "PARTICLE_SNOWBALL", + new SimpleParticle(Particle.SNOWBALL, 0.2F, 0.2F ,0.2F, 0.01)) + ), + EFFECT(new ParticleData(Material.GLASS_BOTTLE, "PARTICLE_EFFECT", + new DustParticle(Particle.REDSTONE, 0, 0.2F, 02F, 0.01, 5)) + ), + CAMPFIRE(new ParticleData(Material.CAMPFIRE, "PARTICLE_CAMPFIRE", + new SimpleParticle(Particle.CAMPFIRE_COSY_SMOKE, 0, 0.2F ,0, 0.01)) + ), + MAGIC(new ParticleData(Material.CAULDRON, "PARTICLE_MAGIC", + new SimpleParticle(Particle.CRIT_MAGIC, 0.2F, 0.2F, 0.2F, 0.01)) + ), + ANGRY(new ParticleData(Material.REDSTONE_BLOCK, "PARTICLE_ANGRY", + new SimpleParticle(Particle.VILLAGER_ANGRY, 0.2F, 0.2F, 0.2F, 0.01)) + ), + SLIME(new ParticleData(Material.SLIME_BALL, "PARTICLE_SLIME", + new SimpleParticle(Particle.SLIME)) + ), + MOB(new ParticleData(Material.ZOMBIE_HEAD, "PARTICLE_MOB", + new SimpleParticle(Particle.SPELL_MOB)) + ), + ; + public static ParticleEnum[] particles = values(); + + @Getter + private ParticleData particle; +} diff --git a/src/de/steamwar/lobby/otherparticle/particles/TeamParticle.java b/src/de/steamwar/lobby/otherparticle/particles/TeamParticle.java new file mode 100644 index 0000000..12bcd2c --- /dev/null +++ b/src/de/steamwar/lobby/otherparticle/particles/TeamParticle.java @@ -0,0 +1,50 @@ +package de.steamwar.lobby.otherparticle.particles; + +import de.steamwar.lobby.otherparticle.ParticleData; +import de.steamwar.lobby.otherparticle.ParticleEnum; +import de.steamwar.lobby.otherparticle.ParticleRequirement; +import de.steamwar.lobby.otherparticle.elements.Circle; +import de.steamwar.lobby.otherparticle.elements.LocationMutator; +import de.steamwar.lobby.otherparticle.elements.NonFloor; +import de.steamwar.lobby.otherparticle.elements.SimpleParticle; +import lombok.AllArgsConstructor; +import lombok.Getter; +import org.bukkit.Material; +import org.bukkit.Particle; + +@AllArgsConstructor +public enum TeamParticle implements ParticleEnum { + + SQUID(new ParticleData(Material.INK_SAC, "PARTICLE_SQUID", ParticleRequirement.HAS_TEAM, + new SimpleParticle(Particle.SQUID_INK, 0.2F, 0.2F, 0.2F, 0.01)) + ), + BUBBLE(new ParticleData(Material.TUBE_CORAL, "PARTICLE_BUBBLE", ParticleRequirement.HAS_TEAM, + new SimpleParticle(Particle.BUBBLE_POP, 0.2F, 0.2F, 0.2F, 0.01)) + ), + HONEY(new ParticleData(Material.HONEY_BOTTLE, "PARTICLE_HONEY", ParticleRequirement.HAS_TEAM, + new SimpleParticle(Particle.DRIPPING_HONEY, 0.2F, 0.2F, 0.2F, 1)) + ), + NECTAR(new ParticleData(Material.HONEYCOMB, "PARTICLE_NECTAR", ParticleRequirement.HAS_TEAM, + new SimpleParticle(Particle.FALLING_NECTAR, 0.2F, 0.2F, 0.2F, 1)) + ), + FIREWORK(new ParticleData(Material.FIRE_CHARGE, "PARTICLE_FIREWORK", ParticleRequirement.HAS_TEAM, + new LocationMutator(new NonFloor(new SimpleParticle(Particle.FIREWORKS_SPARK, 0.1F, 0.1F, 0.1F, 0.2, 2)), 0, -0.2, 0)) + ), + DRAGON_BREATH(new ParticleData(Material.DRAGON_BREATH, "PARTICLE_DRAGON_BREATH", ParticleRequirement.HAS_TEAM, + new SimpleParticle(Particle.DRAGON_BREATH, 1F, 0.2F, 1F, 0.01)) + ), + DAMAGE(new ParticleData(Material.SPIDER_EYE, "PARTICLE_DAMAGE", ParticleRequirement.HAS_TEAM, + new SimpleParticle(Particle.DAMAGE_INDICATOR, 0.2F, 0, 0.2F, 0.01)) + ), + DOLPHIN(new ParticleData(Material.BLUE_DYE, "PARTICLE_DOLPHIN", ParticleRequirement.HAS_TEAM, + new SimpleParticle(Particle.DOLPHIN, 0.2F, 0, 0.2F, 0.01)) + ), + HEART(new ParticleData(Material.RED_CONCRETE, "PARTICLE_HEART", ParticleRequirement.HAS_TEAM, + new Circle(new LocationMutator(new SimpleParticle(Particle.HEART), 0, 2.2, 0))) + ), + ; + public static ParticleEnum[] particles = values(); + + @Getter + private ParticleData particle; +} diff --git a/src/de/steamwar/lobby/otherparticle/particles/custom/CustomEasterParticle.java b/src/de/steamwar/lobby/otherparticle/particles/custom/CustomEasterParticle.java new file mode 100644 index 0000000..6b086ea --- /dev/null +++ b/src/de/steamwar/lobby/otherparticle/particles/custom/CustomEasterParticle.java @@ -0,0 +1,4 @@ +package de.steamwar.lobby.otherparticle.particles.custom; + +public enum CustomEasterParticle { +} diff --git a/src/de/steamwar/lobby/otherparticle/particles/custom/CustomTeamParticle.java b/src/de/steamwar/lobby/otherparticle/particles/custom/CustomTeamParticle.java new file mode 100644 index 0000000..a6234bd --- /dev/null +++ b/src/de/steamwar/lobby/otherparticle/particles/custom/CustomTeamParticle.java @@ -0,0 +1,24 @@ +package de.steamwar.lobby.otherparticle.particles.custom; + +import de.steamwar.lobby.otherparticle.ParticleData; +import de.steamwar.lobby.otherparticle.ParticleEnum; +import de.steamwar.lobby.otherparticle.ParticleRequirement; +import de.steamwar.lobby.otherparticle.WingDesign; +import de.steamwar.lobby.otherparticle.elements.*; +import lombok.AllArgsConstructor; +import lombok.Getter; +import org.bukkit.Material; +import org.bukkit.Particle; + +@AllArgsConstructor +public enum CustomTeamParticle implements ParticleEnum { + + Eclipse(new ParticleData(Material.ENDER_CHEST, "PARTICLE_EVENT_ENCHANTING", ParticleRequirement.specificTeam(34), + new Always(new Delayed(new NonFlying(new Wing(new SimpleParticle(Particle.PORTAL, 0, 0, 0, 0.01), 0.15, WingDesign.ECLIPSE)), 20))) + ), + ; + public static ParticleEnum[] particles = values(); + + @Getter + private ParticleData particle; +}