Skip to content

Commit e3c43e2

Browse files
committed
Max fix
1 parent 81dc137 commit e3c43e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/scala/com/dyonovan/neotech/api/jei/drawables/GuiComponentPowerBarJEI.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,5 @@ class GuiComponentPowerBarJEI(x: Int, y: Int, width: Int, height: Int, colorFull
3030
super.renderOverlay(xOffset, yOffset, Mouse.getX, Mouse.getY)
3131
}
3232

33-
override def getEnergyPercent(scale: Int): Int = (ticker.getValue * scale) / ticker.getMaxValue
33+
override def getEnergyPercent(scale: Int): Int = Math.max(0, (ticker.getValue * scale) / ticker.getMaxValue)
3434
}

0 commit comments

Comments
 (0)