mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
Change necrotic modifier to only heal on actually alive mobs. This prevents lifesteal from test dummies and similar things.
This commit is contained in:
1 parent
724aa45b94
commit
d408caba71
1 file changed
+5
-3
@@ -141,9 +141,11 @@ public class AbilityHelper
|
||||
tool.onEntityDamaged(player.worldObj, player, entity);
|
||||
if (!necroticUHS || (entity instanceof IMob && entity instanceof EntityLivingBase && ((EntityLivingBase) entity).getHealth() <= 0))
|
||||
{
|
||||
int drain = toolTags.getInteger("Necrotic") * 2;
|
||||
if (drain > 0)
|
||||
player.heal(random.nextInt(drain + 1));
|
||||
if(entity.isEntityAlive()) {
|
||||
int drain = toolTags.getInteger("Necrotic") * 2;
|
||||
if (drain > 0)
|
||||
player.heal(random.nextInt(drain + 1));
|
||||
}
|
||||
}
|
||||
|
||||
if (knockback > 0)
|
||||
|
||||
Reference in new issue
Block a user