Implement Entity blacklist for WoS

This commit is contained in:
Nick 2016-01-09 18:05:21 -08:00
parent 9eee22affc
commit 351aa3e74c
3 changed files with 21 additions and 8 deletions

View file

@ -3,6 +3,7 @@ package WayofTime.bloodmagic.ritual;
import java.util.ArrayList;
import java.util.List;
import WayofTime.bloodmagic.ConfigHandler;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
@ -87,17 +88,20 @@ public class RitualWellOfSuffering extends Ritual
for (EntityLivingBase entity : entities)
{
if (entity.isEntityAlive() && !(entity instanceof EntityPlayer))
if (!ConfigHandler.wellOfSufferingBlacklist.contains(entity.getClass().getSimpleName()))
{
if (entity.attackEntityFrom(DamageSource.outOfWorld, 1))
if (entity.isEntityAlive() && !(entity instanceof EntityPlayer))
{
tileAltar.sacrificialDaggerCall(SACRIFICE_AMOUNT, true);
totalEffects++;
if (totalEffects >= maxEffects)
if (entity.attackEntityFrom(DamageSource.outOfWorld, 1))
{
break;
tileAltar.sacrificialDaggerCall(SACRIFICE_AMOUNT, true);
totalEffects++;
if (totalEffects >= maxEffects)
{
break;
}
}
}
}