Skip to content

Commit

Permalink
Fix damage-display calculation. #1082
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Oct 13, 2014
1 parent 82ca44b commit 033c635
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/tconstruct/library/tools/ToolCore.java
Expand Up @@ -790,6 +790,8 @@ public int getDamage(ItemStack stack) {
int max = getMaxEnergyStored(stack);
if(energy > 0) {
int damage = ((max - energy) * 100) / max;
if(damage == 0 && max-energy > 0)
damage = 1;
super.setDamage(stack, damage);
return damage;
}
Expand Down

0 comments on commit 033c635

Please sign in to comment.