diff --git a/src/main/java/com/darkblade12/particleeffect/ParticleEffect.java b/src/main/java/com/darkblade12/particleeffect/ParticleEffect.java index 6db6726..6246cb0 100644 --- a/src/main/java/com/darkblade12/particleeffect/ParticleEffect.java +++ b/src/main/java/com/darkblade12/particleeffect/ParticleEffect.java @@ -381,7 +381,51 @@ public enum ParticleEffect { *
  • The offset values have no influence on this particle effect * */ - MOB_APPEARANCE("mobappearance", 41, 8); + MOB_APPEARANCE("mobappearance", 41, 8), + /** + * A particle effect which is displayed by ender dragon: + * + */ + DRAGON_BREATH("dragonbreath", 42, 9), + /** + * A particle effect which is displayed by skulker bullets and end rods: + * + */ + END_ROD("endRod", 43, 9), + /** + * A particle effect which is displayed by mobs when damaged: + * + */ + DAMAGE_INDICATOR("damageIndicator", 44, 9), + /** + * A particle effect which is displayed by swinging a sword: + * + */ + SWEEP_ATTACK("sweepAttack", 45, 9), + /** + * A particle effect which is displayed by unstable sand and gravel: + * + */ + FALLING_DUST("fallingdust", 46, 10, ParticleProperty.REQUIRES_DATA); private static final Map NAME_MAP = new HashMap(); private static final Map ID_MAP = new HashMap(); @@ -530,7 +574,7 @@ private static boolean isLongDistance(Location location, List players) { * @return Whether the data type is correct or not */ private static boolean isDataCorrect(ParticleEffect effect, ParticleData data) { - return ((effect == BLOCK_CRACK || effect == BLOCK_DUST) && data instanceof BlockData) || (effect == ITEM_CRACK && data instanceof ItemData); + return ((effect == BLOCK_CRACK || effect == BLOCK_DUST || effect == FALLING_DUST) && data instanceof BlockData) || (effect == ITEM_CRACK && data instanceof ItemData); } /** @@ -1403,7 +1447,7 @@ public static void initialize() throws VersionIncompatibleException { return; } try { - version = Integer.parseInt(Character.toString(PackageType.getServerVersion().charAt(3))); + version = Integer.parseInt(PackageType.getServerVersion().split("_")[1]); if (version > 7) { enumParticle = PackageType.MINECRAFT_SERVER.getClass("EnumParticle"); } @@ -1602,4 +1646,4 @@ public PacketSendingException(String message, Throwable cause) { } } } -} \ No newline at end of file +}