Skip to content

Commit

Permalink
Fix killing blows not giving lifesteal #1436
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Mar 2, 2015
1 parent c34ab3d commit a544071
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/tconstruct/library/tools/AbilityHelper.java
Expand Up @@ -112,6 +112,7 @@ public static boolean onLeftClickEntity (ItemStack stack, EntityLivingBase playe
damage = 1;
}
boolean causedDamage = false;
boolean isAlive = entity.isEntityAlive();
if (tool.pierceArmor() && !broken)
{
if (player instanceof EntityPlayer)
Expand All @@ -135,7 +136,7 @@ public static boolean onLeftClickEntity (ItemStack stack, EntityLivingBase playe
tool.onEntityDamaged(player.worldObj, player, entity);
if (!necroticUHS || (entity instanceof IMob && entity instanceof EntityLivingBase && ((EntityLivingBase) entity).getHealth() <= 0))
{
if(entity.isEntityAlive()) {
if(isAlive) {
int drain = toolTags.getInteger("Necrotic") * 2;
if (drain > 0)
player.heal(random.nextInt(drain + 1));
Expand Down

0 comments on commit a544071

Please sign in to comment.