Fixed the Hyacidus wasting mana by trying to poison undead.

This commit is contained in:
Vasco Lavos committed 2014-07-23 00:04:54 +01:00
1 parent a0cd327617
commit fdd69b1ff2
1 file changed
+2 -1
@@ -14,6 +14,7 @@ package vazkii.botania.common.block.subtile.functional;
import java.util.List;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.EnumCreatureAttribute;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
@@ -36,7 +37,7 @@ public class SubTileHyacidus extends SubTileFunctional {
List<EntityLivingBase> entities = supertile.getWorldObj().getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(supertile.xCoord - range, supertile.yCoord - range, supertile.zCoord - range, supertile.xCoord + range, supertile.yCoord + range, supertile.zCoord + range));
for(EntityLivingBase entity : entities) {
if(!(entity instanceof EntityPlayer) && entity.getActivePotionEffect(Potion.poison) == null && mana >= cost) {
if(!(entity instanceof EntityPlayer) && entity.getActivePotionEffect(Potion.poison) == null && mana >= cost && !entity.worldObj.isRemote && entity.getCreatureAttribute() != EnumCreatureAttribute.UNDEAD) {
entity.addPotionEffect(new PotionEffect(Potion.poison.id, 60, 0));
mana -= cost;
}