Child mobs are now viable for sacrifice at half the rate
This commit is contained in:
parent
3f24e464e6
commit
719cff06e1
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.monster.IMob;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
|
@ -47,7 +48,10 @@ public class ItemDaggerOfSacrifice extends Item implements IVariantProvider
|
|||
if (!target.isNonBoss())
|
||||
return false;
|
||||
|
||||
if (target.isChild() || target instanceof EntityPlayer)
|
||||
if (target instanceof EntityPlayer)
|
||||
return false;
|
||||
|
||||
if (target.isChild() && !(target instanceof IMob))
|
||||
return false;
|
||||
|
||||
if (target.isDead || target.getHealth() < 0.5F)
|
||||
|
@ -71,6 +75,11 @@ public class ItemDaggerOfSacrifice extends Item implements IVariantProvider
|
|||
lifeEssence = (int) (lifeEssence * (1 + PurificationHelper.getCurrentPurity((EntityAnimal) target)));
|
||||
}
|
||||
|
||||
if (target.isChild())
|
||||
{
|
||||
lifeEssence *= 0.5F;
|
||||
}
|
||||
|
||||
if (PlayerSacrificeHelper.findAndFillAltar(attacker.getEntityWorld(), target, lifeEssence, true))
|
||||
{
|
||||
target.getEntityWorld().playSound(null, target.posX, target.posY, target.posZ, SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (target.getEntityWorld().rand.nextFloat() - target.getEntityWorld().rand.nextFloat()) * 0.8F);
|
||||
|
|
|
@ -106,6 +106,9 @@ public class RitualWellOfSuffering extends Ritual
|
|||
if (BloodMagicAPI.getEntitySacrificeValues().containsKey(entityName))
|
||||
lifeEssenceRatio = BloodMagicAPI.getEntitySacrificeValues().get(entityName);
|
||||
|
||||
if (entity.isChild())
|
||||
lifeEssenceRatio *= 0.5F;
|
||||
|
||||
tileAltar.sacrificialDaggerCall(lifeEssenceRatio, true);
|
||||
|
||||
totalEffects++;
|
||||
|
|
Loading…
Reference in a new issue