From 4f7ad220df0438b6f3382110577b53f29da46453 Mon Sep 17 00:00:00 2001 From: bculkin2442 Date: Thu, 24 May 2018 15:50:07 -0400 Subject: Update of all changes --- .../darkknight/jewelrycraft/potions/PotionStun.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) mode change 100644 => 100755 src/main/java/darkknight/jewelrycraft/potions/PotionStun.java (limited to 'src/main/java/darkknight/jewelrycraft/potions/PotionStun.java') diff --git a/src/main/java/darkknight/jewelrycraft/potions/PotionStun.java b/src/main/java/darkknight/jewelrycraft/potions/PotionStun.java old mode 100644 new mode 100755 index e1f43e6..a361e9f --- a/src/main/java/darkknight/jewelrycraft/potions/PotionStun.java +++ b/src/main/java/darkknight/jewelrycraft/potions/PotionStun.java @@ -15,20 +15,33 @@ public class PotionStun extends PotionBase { this.setPotionName(Variables.MODID + ".potion.stun"); } + @Override public void action(EntityLivingBase entity) { entity.motionX *= 0D; entity.motionZ *= 0D; entity.motionY *= 0D; + entity.isSwingInProgress = false; + entity.moveForward = 0F; entity.moveStrafing = 0F; + entity.setAIMoveSpeed(0F); + entity.limbSwing = 0F; entity.limbSwingAmount = 0F; entity.swingProgressInt = 0; + entity.rotationPitch = entity.prevRotationPitch; entity.rotationYaw = entity.prevRotationYaw; - entity.worldObj.spawnParticle("spell", entity.posX, entity.posY + entity.getEyeHeight(), entity.posZ, 0.0D, 0.3D, 0.0D); - if (entity.getActivePotionEffect(PotionList.stun).getDuration() == 0) entity.removePotionEffect(PotionList.stun.id); + + entity.worldObj.spawnParticle("spell", entity.posX, + entity.posY + entity.getEyeHeight(), entity.posZ, 0.0D, + 0.3D, 0.0D); + + if (entity.getActivePotionEffect(PotionList.stun) + .getDuration() == 0) { + entity.removePotionEffect(PotionList.stun.id); + } } } -- cgit v1.2.3