Trying to add a potion effect to the player when he attacks something. It does add the potion effect, but it shows up with a duration of 0:00 and it never goes away, also the icon isn't there. Not sure why. Any ideas?
Here's my event code. I left out a bunch of conditionals, they are commented out while I'm debugging this now.
public class EventHook
{
@ForgeSubscribe
public void entityAttacked(LivingAttackEvent event)
{
if( !event.worldObj.isRemote ) return;
EntityPlayer player = Minecraft.getMinecraft().thePlayer;
player.addPotionEffect(new PotionEffect(Potion.heal.getID(), 1, 1));
}
}