Should fix tablet durability/energy bar being inverted, closes #1241.

Also always show bar for hover boots.
This commit is contained in:
Florian Nücke 2015-06-25 11:57:06 +02:00
parent 4f4564fb29
commit a60f1c76f1
2 changed files with 3 additions and 1 deletions

View File

@ -61,6 +61,8 @@ class HoverBoots extends ItemArmor(ItemArmor.ArmorMaterial.DIAMOND, 0, 3) with t
else null
}
override def showDurabilityBar(stack: ItemStack): Boolean = true
override def getDurabilityForDisplay(stack: ItemStack): Double = {
val data = new HoverBootsData(stack)
1 - data.charge / Settings.get.bufferHoverBoots

View File

@ -92,7 +92,7 @@ class Tablet(val parent: Delegator) extends traits.Delegate with CustomModel wit
if (stack.hasTagCompound) {
val data = new TabletData()
data.load(stack.getTagCompound)
data.energy / data.maxEnergy
1 - data.energy / data.maxEnergy
}
else 1.0
}