mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-13 17:04:24 +00:00
Fix damage-display calculation. #1082
This commit is contained in:
1 parent
82ca44bb66
commit
033c635ca3
1 file changed
+2
@@ -790,6 +790,8 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IMo
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user