// Path: src/main/java/com/dsh105/sparktrail/util/protocol/Packet.java
// public class Packet {
// 
//     private Class packetClass;
//     private Object packetHandle;
//     private Protocol protocol;
//     private Sender sender;
// 
//     public Packet(PacketFactory.PacketType packetType) {
//         this(packetType.getProtocol(), packetType.getSender(), packetType.getId(), packetType.getLegacyId());
//     }
// 
//     public Packet(Protocol protocol, Sender sender, int id, int legacyId) {
// 
//         if (SparkTrailPlugin.isUsingNetty) {
// 
//             this.packetClass = PacketUtil.getPacket(protocol, sender, id);
//             try {
//                 this.packetHandle = this.packetClass.newInstance();
//             } catch (InstantiationException e) {
//                 e.printStackTrace();
//             } catch (IllegalAccessException e) {
//                 e.printStackTrace();
//             }
//         } else {
//             FieldAccessor<Map> mapField = new SafeField<Map>(ReflectionUtil.getNMSClass("Packet"), "a");
//             Map map = mapField.get(null);
//             this.packetClass = (Class) MiscUtil.getKeyAtValue(map, legacyId);
//             try {
//                 this.packetHandle = this.packetClass.newInstance();
//             } catch (InstantiationException e) {
//                 e.printStackTrace();
//             } catch (IllegalAccessException e) {
//                 e.printStackTrace();
//             }
//         }
//     }
// 
//     public Object read(String fieldName) {
//         return ReflectionUtil.getField(getPacketClass(), fieldName, this.getPacketHandle());
//     }
// 
//     public void write(String fieldName, Object value) {
//         ReflectionUtil.setField(getPacketClass(), fieldName, getPacketHandle(), value);
//     }
// 
//     public void send(Player receiver) {
//         PlayerUtil.sendPacket(receiver, getPacketHandle());
//     }
// 
//     public Class getPacketClass() {
//         return this.packetClass;
//     }
// 
//     public Object getPacketHandle() {
//         return this.packetHandle;
//     }
// 
//     public Protocol getProtocol() {
//         return this.protocol;
//     }
// 
//     public Sender getSender() {
//         return this.sender;
//     }
// }
// 
// Path: src/main/java/com/dsh105/sparktrail/util/protocol/PacketFactory.java
// public class PacketFactory {
// 
//     public enum PacketType {
//         ENTITY_SPAWN(Protocol.PLAY, Sender.SERVER, 0x0E, 0x17),
//         ENTITY_LIVING_SPAWN(Protocol.PLAY, Sender.SERVER, 0x0F, 0x18),
//         ENTITY_DESTROY(Protocol.PLAY, Sender.SERVER, 0x13, 0x1D),
//         ENTITY_TELEPORT(Protocol.PLAY, Sender.SERVER, 0x18, 0x22),
//         ENTITY_ATTACH(Protocol.PLAY, Sender.SERVER, 0x1B, 0x27),
//         ENTITY_METADATA(Protocol.PLAY, Sender.SERVER, 0x1C, 0x28),
//         CHAT(Protocol.PLAY, Sender.SERVER, 0x02, 0x03),
//         NAMED_ENTITY_SPAWN(Protocol.PLAY, Sender.SERVER, 0x0C, 0x14),
//         WORLD_PARTICLES(Protocol.PLAY, Sender.SERVER, 0x2A, 0x3F);
// 
//         private Protocol protocol;
//         private Sender sender;
//         private int id;
//         private int legacyId;
// 
//         PacketType(Protocol protocol, Sender sender, int id, int legacyId) {
//             this.protocol = protocol;
//             this.sender = sender;
//             this.id = id;
//             this.legacyId = legacyId;
//         }
// 
//         public Protocol getProtocol() {
//             return protocol;
//         }
// 
//         public Sender getSender() {
//             return sender;
//         }
// 
//         public int getId() {
//             return id;
//         }
// 
//         public int getLegacyId() {
//             return this.legacyId;
//         }
//     }
// 
//     //TODO
// 
// }


import com.dsh105.sparktrail.util.protocol.Packet;
import com.dsh105.sparktrail.util.protocol.PacketFactory;
    public enum ParticleType {
        SMOKE("largesmoke", 0.2f, 20),
        RED_SMOKE("reddust", 0f, 40),
        RAINBOW_SMOKE("reddust", 1f, 100),
        FIRE("flame", 0.05f, 100),
        FIREWORK_SPARK("fireworksSpark", 50F, 30),
        HEART("heart", 0f, 4),
        MAGIC_RUNES("enchantmenttable", 1f, 100),
        LAVA_SPARK("lava", 0f, 4),
        SPLASH("splash", 1f, 40),
        PORTAL("portal", 1f, 100),

        SMALL_EXPLOSION("largeexplode", 0.1f, 1),
        HUGE_EXPLOSION("hugeexplosion", 0.1f, 1),
        CLOUD("explode", 0.1f, 10),
        CRITICAL("crit", 0.1f, 100),
        MAGIC_CRITIAL("magicCrit", 0.1f, 100),
        ANGRY_VILLAGER("angryVillager", 0f, 20),
        SPARKLE("happyVillager", 0f, 20),
        WATER_DRIP("dripWater", 0f, 100),
        LAVA_DRIP("dripLava", 0f, 100),
        WITCH_MAGIC("witchMagic", 1f, 20),
        WITCH_MAGIC_SMALL("witchMagic", 0.1f, 5),

        SNOWBALL("snowballpoof", 1f, 20),
        SNOW_SHOVEL("snowshovel", 0.02f, 30),
        SLIME_SPLAT("slime", 1f, 30),
        BUBBLE("bubble", 0f, 50),
        SPELL("mobSpell", 1f, 100),
        SPELL_AMBIENT("mobSpellAmbient", 1f, 100),
// Path: src/main/java/com/dsh105/sparktrail/util/protocol/Packet.java
// public class Packet {
// 
//     private Class packetClass;
//     private Object packetHandle;
//     private Protocol protocol;
//     private Sender sender;
// 
//     public Packet(PacketFactory.PacketType packetType) {
//         this(packetType.getProtocol(), packetType.getSender(), packetType.getId(), packetType.getLegacyId());
//     }
// 
//     public Packet(Protocol protocol, Sender sender, int id, int legacyId) {
// 
//         if (SparkTrailPlugin.isUsingNetty) {
// 
//             this.packetClass = PacketUtil.getPacket(protocol, sender, id);
//             try {
//                 this.packetHandle = this.packetClass.newInstance();
//             } catch (InstantiationException e) {
//                 e.printStackTrace();
//             } catch (IllegalAccessException e) {
//                 e.printStackTrace();
//             }
//         } else {
//             FieldAccessor<Map> mapField = new SafeField<Map>(ReflectionUtil.getNMSClass("Packet"), "a");
//             Map map = mapField.get(null);
//             this.packetClass = (Class) MiscUtil.getKeyAtValue(map, legacyId);
//             try {
//                 this.packetHandle = this.packetClass.newInstance();
//             } catch (InstantiationException e) {
//                 e.printStackTrace();
//             } catch (IllegalAccessException e) {
//                 e.printStackTrace();
//             }
//         }
//     }
// 
//     public Object read(String fieldName) {
//         return ReflectionUtil.getField(getPacketClass(), fieldName, this.getPacketHandle());
//     }
// 
//     public void write(String fieldName, Object value) {
//         ReflectionUtil.setField(getPacketClass(), fieldName, getPacketHandle(), value);
//     }
// 
//     public void send(Player receiver) {
//         PlayerUtil.sendPacket(receiver, getPacketHandle());
//     }
// 
//     public Class getPacketClass() {
//         return this.packetClass;
//     }
// 
//     public Object getPacketHandle() {
//         return this.packetHandle;
//     }
// 
//     public Protocol getProtocol() {
//         return this.protocol;
//     }
// 
//     public Sender getSender() {
//         return this.sender;
//     }
// }
// 
// Path: src/main/java/com/dsh105/sparktrail/util/protocol/PacketFactory.java
// public class PacketFactory {
// 
//     public enum PacketType {
//         ENTITY_SPAWN(Protocol.PLAY, Sender.SERVER, 0x0E, 0x17),
//         ENTITY_LIVING_SPAWN(Protocol.PLAY, Sender.SERVER, 0x0F, 0x18),
//         ENTITY_DESTROY(Protocol.PLAY, Sender.SERVER, 0x13, 0x1D),
//         ENTITY_TELEPORT(Protocol.PLAY, Sender.SERVER, 0x18, 0x22),
//         ENTITY_ATTACH(Protocol.PLAY, Sender.SERVER, 0x1B, 0x27),
//         ENTITY_METADATA(Protocol.PLAY, Sender.SERVER, 0x1C, 0x28),
//         CHAT(Protocol.PLAY, Sender.SERVER, 0x02, 0x03),
//         NAMED_ENTITY_SPAWN(Protocol.PLAY, Sender.SERVER, 0x0C, 0x14),
//         WORLD_PARTICLES(Protocol.PLAY, Sender.SERVER, 0x2A, 0x3F);
// 
//         private Protocol protocol;
//         private Sender sender;
//         private int id;
//         private int legacyId;
// 
//         PacketType(Protocol protocol, Sender sender, int id, int legacyId) {
//             this.protocol = protocol;
//             this.sender = sender;
//             this.id = id;
//             this.legacyId = legacyId;
//         }
// 
//         public Protocol getProtocol() {
//             return protocol;
//         }
// 
//         public Sender getSender() {
//             return sender;
//         }
// 
//         public int getId() {
//             return id;
//         }
// 
//         public int getLegacyId() {
//             return this.legacyId;
//         }
//     }
// 
//     //TODO
// 
// }


// Path: src/main/java/com/dsh105/sparktrail/util/protocol/wrapper/WrapperPacketWorldParticles.java
import com.dsh105.sparktrail.util.protocol.Packet;
import com.dsh105.sparktrail.util.protocol.PacketFactory;

    public enum ParticleType {
        SMOKE("largesmoke", 0.2f, 20),
        RED_SMOKE("reddust", 0f, 40),
        RAINBOW_SMOKE("reddust", 1f, 100),
        FIRE("flame", 0.05f, 100),
        FIREWORK_SPARK("fireworksSpark", 50F, 30),
        HEART("heart", 0f, 4),
        MAGIC_RUNES("enchantmenttable", 1f, 100),
        LAVA_SPARK("lava", 0f, 4),
        SPLASH("splash", 1f, 40),
        PORTAL("portal", 1f, 100),

        SMALL_EXPLOSION("largeexplode", 0.1f, 1),
        HUGE_EXPLOSION("hugeexplosion", 0.1f, 1),
        CLOUD("explode", 0.1f, 10),
        CRITICAL("crit", 0.1f, 100),
        MAGIC_CRITIAL("magicCrit", 0.1f, 100),
        ANGRY_VILLAGER("angryVillager", 0f, 20),
        SPARKLE("happyVillager", 0f, 20),
        WATER_DRIP("dripWater", 0f, 100),
        LAVA_DRIP("dripLava", 0f, 100),
        WITCH_MAGIC("witchMagic", 1f, 20),
        WITCH_MAGIC_SMALL("witchMagic", 0.1f, 5),

        SNOWBALL("snowballpoof", 1f, 20),
        SNOW_SHOVEL("snowshovel", 0.02f, 30),
        SLIME_SPLAT("slime", 1f, 30),
        BUBBLE("bubble", 0f, 50),
        SPELL("mobSpell", 1f, 100),
        SPELL_AMBIENT("mobSpellAmbient", 1f, 100),
        VOID("townaura", 1f, 100),