Fixed a bug with mudballs.

This commit is contained in:
Amnet 2013-05-13 05:07:45 +02:00
parent e738e1ff62
commit 77d026306a
1 changed files with 2 additions and 1 deletions

View File

@ -37,7 +37,8 @@ public class EntityMudball extends EntityThrowable
if (par1MovingObjectPosition.entityHit != null) if (par1MovingObjectPosition.entityHit != null)
{ {
par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), 0); par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), 0);
((EntityLiving)par1MovingObjectPosition.entityHit).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 400, 2)); if (par1MovingObjectPosition.entityHit instanceof EntityLiving)
((EntityLiving)par1MovingObjectPosition.entityHit).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 400, 2));
} }
for (int i = 0; i < 16; ++i) for (int i = 0; i < 16; ++i)