diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2018-05-24 15:50:07 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2018-05-24 15:50:07 -0400 |
| commit | 4f7ad220df0438b6f3382110577b53f29da46453 (patch) | |
| tree | 07d5e7c812721753cdbe3df7226dad5dc3802c29 /src/main/java/darkknight/jewelrycraft/potions/PotionStun.java | |
| parent | 01c8701b68986ccfa83e902515716838d6829311 (diff) | |
Update of all changes
Diffstat (limited to 'src/main/java/darkknight/jewelrycraft/potions/PotionStun.java')
| -rwxr-xr-x[-rw-r--r--] | src/main/java/darkknight/jewelrycraft/potions/PotionStun.java | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/main/java/darkknight/jewelrycraft/potions/PotionStun.java b/src/main/java/darkknight/jewelrycraft/potions/PotionStun.java index e1f43e6..a361e9f 100644..100755 --- 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);
+ }
}
}
|
