Altar and Dagger should respect 0 LP as an effective blacklist (#837)

This commit is contained in:
Nicholas Ignoffo 2016-07-04 20:17:23 -07:00
parent 14b448bbee
commit 7fdbcf3b3c
2 changed files with 18 additions and 11 deletions

View file

@ -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);