diff --git a/src/main/java/techreborn/client/gui/GuiCentrifuge.java b/src/main/java/techreborn/client/gui/GuiCentrifuge.java index 43fe039fc..c9413aca7 100644 --- a/src/main/java/techreborn/client/gui/GuiCentrifuge.java +++ b/src/main/java/techreborn/client/gui/GuiCentrifuge.java @@ -11,8 +11,7 @@ import techreborn.tiles.TileCentrifuge; public class GuiCentrifuge extends GuiContainer { - private static final ResourceLocation texture = new ResourceLocation( - "techreborn", "textures/gui/industrial_centrifuge.png"); + private static final ResourceLocation texture = new ResourceLocation("techreborn", "textures/gui/industrial_centrifuge.png"); TileCentrifuge centrifuge; @@ -23,12 +22,36 @@ public class GuiCentrifuge extends GuiContainer { centrifuge = tileCentrifuge; } + @Override + public void initGui() { + this.buttonList.clear(); + int k = (this.width - this.xSize) / 2; + int l = (this.height - this.ySize) / 2; + this.buttonList.add(new GuiButton(0, k + 4, l + 4, 20, 20, "R")); + super.initGui(); + } + @Override protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) { this.mc.getTextureManager().bindTexture(texture); int k = (this.width - this.xSize) / 2; int l = (this.height - this.ySize) / 2; this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); + + int j = 0; + + if(centrifuge.crafter.currentRecipe != null) { + j = this.centrifuge.crafter.currentTickTime * 11 / this.centrifuge.crafter.currentRecipe.tickTime(); + } + this.drawTexturedModalRect(k + 83, l + 23 + 10 - j, 177, 15 + 10 - j, 10, j); + this.drawTexturedModalRect(k + 98, l + 38, 177, 51, j, 10); + this.drawTexturedModalRect(k + 83, l + 53, 177, 39, 10, j); + this.drawTexturedModalRect(k + 68 + 10 - j, l + 38, 177 + 10 - j, 27, j, 10); + + j = (int)this.centrifuge.energy.getEnergyStored() * 12 / this.centrifuge.energy.getCapacity(); + if(j > 0) { + this.drawTexturedModalRect(k + 9, l + 32 + 12 - j, 176, 12 - j, 14, j + 2); + } } protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_) { @@ -38,14 +61,4 @@ public class GuiCentrifuge extends GuiContainer { this.fontRendererObj.drawString(namePt2, 98, 14, 4210752); this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752); } - - @Override - public void initGui() { - - this.buttonList.clear(); - int k = (this.width - this.xSize) / 2; - int l = (this.height - this.ySize) / 2; - this.buttonList.add(new GuiButton(0, k + 4, l + 4, 20, 20, "R")); - super.initGui(); - } } diff --git a/src/main/resources/assets/techreborn/textures/gui/industrial_centrifuge.png b/src/main/resources/assets/techreborn/textures/gui/industrial_centrifuge.png index 746999419..29f4daff5 100644 Binary files a/src/main/resources/assets/techreborn/textures/gui/industrial_centrifuge.png and b/src/main/resources/assets/techreborn/textures/gui/industrial_centrifuge.png differ