improve cable performance

This commit is contained in:
Raoul Van den Berge
2015-12-09 21:24:46 +01:00
parent d4f1665605
commit b9c91141f7
5 changed files with 20 additions and 23 deletions

View File

@@ -41,9 +41,9 @@ public class GuiController extends GuiContainer {
int energy = controller.getEnergyStored(null);
int maxEnergy = controller.getMaxEnergyStored(null);
int height = (int) ((float) energy / (float) maxEnergy * (float) barHeight);
int newBarHeight = (int) ((float) energy / (float) maxEnergy * (float) barHeight);
drawTexturedModalRect(barX, barY + barHeight - height, 178, 0, barWidth, height);
drawTexturedModalRect(barX, barY + barHeight - newBarHeight, 178, 0, barWidth, newBarHeight);
fontRendererObj.drawString("Controller", x + 7, y + 7, 4210752);
fontRendererObj.drawString("Inventory", x + 7, y + 96, 4210752);