Skip to content

Commit

Permalink
te compat fixes/tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
progwml6 committed Dec 7, 2013
1 parent b61c1c5 commit 3744f8a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/tconstruct/library/tools/AbilityHelper.java
Expand Up @@ -422,16 +422,16 @@ public static boolean damageElectricTool (ItemStack stack, NBTTagCompound tags,
float bonusLog = (float) Math.log(durability / 72f + 1) * 2 * stonebound;
trueSpeed += bonusLog;
trueSpeed *= 6;
if (energy > 0)
if (energy != -1)
{
if (energy < trueSpeed)
if (energy < trueSpeed * 2)
{
if (energy > 0)
tags.setInteger("Energy", 0);
return false;
}

energy -= trueSpeed;
energy -= trueSpeed * 2;
ToolCore tool = (ToolCore) stack.getItem();
stack.setItemDamage(1 + (tool.getMaxEnergyStored(stack) - energy) * (stack.getMaxDamage() - 1) / tool.getMaxEnergyStored(stack));
tags.setInteger("Energy", energy);
Expand Down

0 comments on commit 3744f8a

Please sign in to comment.