mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-19 04:06:43 -04:00
Should fix tablet durability/energy bar being inverted, closes #1241.
Also always show bar for hover boots.
This commit is contained in:
parent
4f4564fb29
commit
a60f1c76f1
@ -61,6 +61,8 @@ class HoverBoots extends ItemArmor(ItemArmor.ArmorMaterial.DIAMOND, 0, 3) with t
|
|||||||
else null
|
else null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override def showDurabilityBar(stack: ItemStack): Boolean = true
|
||||||
|
|
||||||
override def getDurabilityForDisplay(stack: ItemStack): Double = {
|
override def getDurabilityForDisplay(stack: ItemStack): Double = {
|
||||||
val data = new HoverBootsData(stack)
|
val data = new HoverBootsData(stack)
|
||||||
1 - data.charge / Settings.get.bufferHoverBoots
|
1 - data.charge / Settings.get.bufferHoverBoots
|
||||||
|
@ -92,7 +92,7 @@ class Tablet(val parent: Delegator) extends traits.Delegate with CustomModel wit
|
|||||||
if (stack.hasTagCompound) {
|
if (stack.hasTagCompound) {
|
||||||
val data = new TabletData()
|
val data = new TabletData()
|
||||||
data.load(stack.getTagCompound)
|
data.load(stack.getTagCompound)
|
||||||
data.energy / data.maxEnergy
|
1 - data.energy / data.maxEnergy
|
||||||
}
|
}
|
||||||
else 1.0
|
else 1.0
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user