BloodMagic/BM_src/WayofTime/alchemicalWizardry/common/EntityAirElemental.java

34 lines
1.3 KiB
Java
Raw Normal View History

2014-01-17 19:12:49 +00:00
package WayofTime.alchemicalWizardry.common;
2014-01-17 21:54:16 +00:00
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
2014-01-17 19:12:49 +00:00
import WayofTime.alchemicalWizardry.common.entity.mob.EntityElemental;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.common.network.Player;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.IMob;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;
2014-01-17 21:43:13 +00:00
public class EntityAirElemental extends EntityElemental implements IMob
{
2014-01-17 19:12:49 +00:00
public EntityAirElemental(World world)
{
super(world, AlchemicalWizardry.entityAirElementalID);
}
public void inflictEffectOnEntity(Entity target)
{
if (target instanceof EntityPlayer)
{
PacketDispatcher.sendPacketToPlayer(PacketHandler.getPlayerVelocitySettingPacket(target.motionX, target.motionY + 3, target.motionZ), (Player) target);
((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0));
} else if (target instanceof EntityLivingBase)
2014-01-17 19:12:49 +00:00
{
((EntityLivingBase) target).motionY += 3.0D;
((EntityLivingBase) target).addPotionEffect(new PotionEffect(AlchemicalWizardry.customPotionInhibit.id, 150, 0));
2014-01-17 19:12:49 +00:00
}
}
}