From 7d16df11ff91c959400a291f54679ecf4fdb8314 Mon Sep 17 00:00:00 2001 From: BadBones69 Date: Thu, 16 Jun 2016 10:32:07 -0400 Subject: [PATCH] Adding 1.9 particles Particles Added: - DRAGON_BREATH - END_ROD - DAMAGE_INDICATOR - SWEEP_ATTACK Made it so it can allow 1.10 because it used to only get one number but since 10 has two numbers the method of getting the version needed to be changed. --- .../particleeffect/ParticleEffect.java | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/darkblade12/particleeffect/ParticleEffect.java b/src/main/java/com/darkblade12/particleeffect/ParticleEffect.java index 6db6726..2011306 100644 --- a/src/main/java/com/darkblade12/particleeffect/ParticleEffect.java +++ b/src/main/java/com/darkblade12/particleeffect/ParticleEffect.java @@ -381,7 +381,43 @@ 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); private static final Map NAME_MAP = new HashMap(); private static final Map ID_MAP = new HashMap(); @@ -1403,7 +1439,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"); }