From ae67838576078b53e749f09c26c7cebcabdd8544 Mon Sep 17 00:00:00 2001 From: Jeremiah Winsley Date: Sat, 31 Dec 2022 12:20:27 -0500 Subject: [PATCH] Fix GUI alignment --- .../machines/base/AbstractMachineMenu.java | 2 +- .../machines/base/AbstractMachineScreen.java | 18 +++++++++--------- .../textures/gui/flux_compactor.png | Bin 1527 -> 1504 bytes .../exmachinis/textures/gui/flux_hammer.png | Bin 1527 -> 1504 bytes .../exmachinis/textures/gui/flux_sieve.png | Bin 1540 -> 1521 bytes 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/main/java/net/permutated/exmachinis/machines/base/AbstractMachineMenu.java b/src/main/java/net/permutated/exmachinis/machines/base/AbstractMachineMenu.java index 224a5af..bc817fb 100644 --- a/src/main/java/net/permutated/exmachinis/machines/base/AbstractMachineMenu.java +++ b/src/main/java/net/permutated/exmachinis/machines/base/AbstractMachineMenu.java @@ -103,7 +103,7 @@ public ItemStack quickMoveStack(Player playerIn, int index) { public void registerHandlerSlots(IItemHandler handler) { int index = 0; - addSlot(new FilteredSlot(handler, index++, 116, 53, stack -> stack.getItem() instanceof UpgradeItem)); + addSlot(new FilteredSlot(handler, index++, 116, 54, stack -> stack.getItem() instanceof UpgradeItem)); if (enableMeshSlot) { addSlot(new FilteredSlot(handler, index++, 80, 36, ExNihiloAPI::isMeshItem)); } diff --git a/src/main/java/net/permutated/exmachinis/machines/base/AbstractMachineScreen.java b/src/main/java/net/permutated/exmachinis/machines/base/AbstractMachineScreen.java index 53b21b5..607a37e 100644 --- a/src/main/java/net/permutated/exmachinis/machines/base/AbstractMachineScreen.java +++ b/src/main/java/net/permutated/exmachinis/machines/base/AbstractMachineScreen.java @@ -40,17 +40,17 @@ protected void renderBg(PoseStack matrixStack, float partialTicks, int mouseX, i // render work status texture if (this.menu.getWorkStatus() == WorkStatus.WORKING) { - this.blit(matrixStack, relX + 116, relY + 35, 224, 0, 16, 16); + this.blit(matrixStack, relX + 116, relY + 36, 224, 0, 16, 16); } else if(this.menu.getWorkStatus() == WorkStatus.REDSTONE_DISABLED) { - this.blit(matrixStack, relX + 116, relY + 35, 240, 0, 16, 16); + this.blit(matrixStack, relX + 116, relY + 36, 240, 0, 16, 16); } else { - this.blit(matrixStack, relX + 116, relY + 35, 208, 0, 16, 16); + this.blit(matrixStack, relX + 116, relY + 36, 208, 0, 16, 16); } // texture offset - addon texture float energyFraction = this.menu.dataHolder.getEnergyFraction(); - var energyHolder = new TextureHolder(152, 17, 176, 0, 16, 52); + var energyHolder = new TextureHolder(152, 18, 176, 0, 16, 52); blit(matrixStack, relX + energyHolder.progressOffsetX(), relY + energyHolder.progressHeightOffset(energyFraction), @@ -62,7 +62,7 @@ protected void renderBg(PoseStack matrixStack, float partialTicks, int mouseX, i // work progress float workFraction = this.menu.dataHolder.getWorkFraction(); - var progressHolder = new TextureHolder(134, 17, 192, 0, 16, 52); + var progressHolder = new TextureHolder(134, 18, 192, 0, 16, 52); blit(matrixStack, relX + progressHolder.progressOffsetX(), relY + progressHolder.progressHeightOffset(workFraction), @@ -77,25 +77,25 @@ protected void renderBg(PoseStack matrixStack, float partialTicks, int mouseX, i protected void renderTooltip(PoseStack stack, int x, int y) { super.renderTooltip(stack, x, y); - if (this.isHovering(116, 35, 16, 16, x, y)) { + if (this.isHovering(116, 36, 16, 16, x, y)) { this.renderComponentTooltip(stack, List.of(this.menu.getWorkStatus().getTranslation()), x, y, this.font); } - if (this.isHovering(152, 17, 16, 52, x, y)) { + if (this.isHovering(152, 18, 16, 52, x, y)) { this.renderComponentTooltip(stack, List.of( translateTooltip("fluxBar"), translateTooltip("fluxData", this.menu.dataHolder.getEnergy(), this.menu.dataHolder.getMaxEnergy()) ), x, y, this.font); } - if (this.isHovering(134, 17, 16, 52, x, y)) { + if (this.isHovering(134, 18, 16, 52, x, y)) { this.renderComponentTooltip(stack, List.of( translateTooltip("workBar"), translateTooltip("workData", this.menu.dataHolder.getWork(), this.menu.dataHolder.getMaxWork()) ), x, y, this.font); } - if (this.isHovering(116, 53, 16, 16, x, y) && shouldShowSlotTooltip()) { + if (this.isHovering(116, 54, 16, 16, x, y) && shouldShowSlotTooltip()) { this.renderComponentTooltip(stack, List.of(translateTooltip("upgradeSlot")), x, y, this.font); } diff --git a/src/main/resources/assets/exmachinis/textures/gui/flux_compactor.png b/src/main/resources/assets/exmachinis/textures/gui/flux_compactor.png index 758a61b750b68e451f02c904f369b9b8cceda167..89db085b9030de0992e34033a6be4a10f5018cfc 100644 GIT binary patch literal 1504 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G!U;i$lZxy-8q?;3=FKZJY5_^ zD(1YsyFXhxUFP`5=S>Tfmj`f^oSL-%;LI&4+1-vaji;XDy7$YSkign6`|9s2^!88r^yWFg``v$+Z?}Jq-1x)N@cQ-ZPyhU>2@s61 z7pnYN_qoaDN%6ido1d}g<>kG5TzKH%v(J^4|Nc})>WDS}Ir;V1$;Z2P9=JVk)tWQ+ zY*%?}rv7`=KbP_6mv0aMzkC0>+upqHU-Q@f5q~c9er3J?_0juF&41@Jz1jS7!oRPR zkAGcuwEoP)din1CB8&~^WHxQs9r5Qk-+%jd28Z@C-46?O{{^uyuqA$b7kD@3O|3qN zXSMZp(|tv8=J4)+-a7w+%xri$WS&o8-S<-S&@w%-|J#=Toh8HQz`iZ^?fq|W96l%C z7W=u;{-^!k+KBc4Z+@#}Vz7;f|Ir@zCtL5^KEB`AEm<4-a-%-z->YB2XX*MP>!N%W zmjc6u#(n?z9qzL*MD6;$cHiTzf8*>ydHJ__D@*_QK7aeJvYa7p zbL8odOMRAK-V~$9ZuhOi_uRa&@BO~`zc;H{4CeYp-#z&BX=!q4Yd#V=m980#FKRw6`m@b#z`78a*V;(Ev zVEvQ2U|n49wr=s+ChFzqBI3_hawx^i-k5WF*5m0{emxe!6D9CaL`34m^?W(!GS4ow zw+5Qg=kSat(XZHDVLjg+S!<@5#y>2}SYGvKlMw4bD>f@nuxy_1T>pk6<=lhkHw0JM zm$4Y7e<*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