Altar and Dagger should respect 0 LP as an effective blacklist (#837)
This commit is contained in:
parent
14b448bbee
commit
7fdbcf3b3c
|
@ -52,6 +52,9 @@ public class ItemDaggerOfSacrifice extends Item implements IVariantProvider
|
|||
if (BloodMagicAPI.getEntitySacrificeValues().containsKey(entityName))
|
||||
lifeEssence = BloodMagicAPI.getEntitySacrificeValues().get(entityName);
|
||||
|
||||
if (lifeEssence <= 0)
|
||||
return false;
|
||||
|
||||
if (PlayerSacrificeHelper.findAndFillAltar(attacker.worldObj, target, lifeEssence, true))
|
||||
{
|
||||
target.worldObj.playSound(null, target.posX, target.posY, target.posZ, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (target.worldObj.rand.nextFloat() - target.worldObj.rand.nextFloat()) * 0.8F);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package WayofTime.bloodmagic.ritual;
|
||||
|
||||
import WayofTime.bloodmagic.ConfigHandler;
|
||||
import WayofTime.bloodmagic.api.BloodMagicAPI;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.saving.SoulNetwork;
|
||||
import WayofTime.bloodmagic.api.ritual.*;
|
||||
|
@ -87,8 +88,12 @@ public class RitualWellOfSuffering extends Ritual
|
|||
|
||||
for (EntityLivingBase entity : entities)
|
||||
{
|
||||
if (!ConfigHandler.wellOfSufferingBlacklist.contains(entity.getClass().getSimpleName()))
|
||||
{
|
||||
if (ConfigHandler.wellOfSufferingBlacklist.contains(entity.getClass().getSimpleName()))
|
||||
continue;
|
||||
|
||||
if (BloodMagicAPI.getEntitySacrificeValues().get(entity.getClass().getSimpleName()) <= 0)
|
||||
continue;
|
||||
|
||||
if (entity.isEntityAlive() && !(entity instanceof EntityPlayer))
|
||||
{
|
||||
if (entity.attackEntityFrom(DamageSource.outOfWorld, 1))
|
||||
|
@ -105,7 +110,6 @@ public class RitualWellOfSuffering extends Ritual
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
network.syphon(getRefreshCost() * totalEffects);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue