From fb19fd7ca6dd2b18d7ac65c467c57e94a20f727b Mon Sep 17 00:00:00 2001 From: Adubbz Date: Sat, 6 Apr 2013 09:21:36 +1100 Subject: [PATCH] Entities get the slowness potion effect when hit by mudballs (just how Foristride wanted :D) --- .../biomesop/items/projectiles/EntityMudball.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/minecraft/tdwp_ftw/biomesop/items/projectiles/EntityMudball.java b/src/minecraft/tdwp_ftw/biomesop/items/projectiles/EntityMudball.java index a4766f654..15915c8ff 100644 --- a/src/minecraft/tdwp_ftw/biomesop/items/projectiles/EntityMudball.java +++ b/src/minecraft/tdwp_ftw/biomesop/items/projectiles/EntityMudball.java @@ -1,13 +1,9 @@ package tdwp_ftw.biomesop.items.projectiles; -import tdwp_ftw.biomesop.mod_BiomesOPlenty; -import net.minecraft.client.particle.EntityBreakingFX; -import net.minecraft.client.particle.EntityFX; -import net.minecraft.client.renderer.RenderEngine; -import net.minecraft.client.renderer.RenderGlobal; import net.minecraft.entity.EntityLiving; import net.minecraft.entity.projectile.EntityThrowable; -import net.minecraft.item.Item; +import net.minecraft.potion.Potion; +import net.minecraft.potion.PotionEffect; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; @@ -34,6 +30,7 @@ public class EntityMudball extends EntityThrowable if (par1MovingObjectPosition.entityHit != null) { par1MovingObjectPosition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), 1); + ((EntityLiving)par1MovingObjectPosition.entityHit).addPotionEffect(new PotionEffect(Potion.moveSlowdown.id, 300)); } for (int i = 0; i < 16; ++i)