From c56ac8bcd7ccb3607b5550fdd9f57eadee76f79f Mon Sep 17 00:00:00 2001 From: lothrazar Date: Sun, 13 Oct 2024 21:51:41 -0700 Subject: [PATCH] fixed visual rendering and text errors inside of import/export cables using the operation remote --- gradle.properties | 2 +- .../com/lothrazar/storagenetwork/api/OpCompareType.java | 2 +- .../block/cable/export/ScreenCableExportFilter.java | 9 ++------- .../block/cable/inputfilter/ScreenCableImportFilter.java | 9 ++------- .../block/cable/linkfilter/ScreenCableFilter.java | 4 +--- .../block/collection/ScreenCollectionFilter.java | 4 +--- src/main/resources/assets/storagenetwork/lang/en_us.json | 3 ++- 7 files changed, 10 insertions(+), 23 deletions(-) diff --git a/gradle.properties b/gradle.properties index 15292e9f..aba442b9 100644 --- a/gradle.properties +++ b/gradle.properties @@ -13,7 +13,7 @@ org.gradle.daemon=false mod_id=storagenetwork curse_id=268495 -mod_version=1.11.3-SNAPSHOT +mod_version=1.11.3 diff --git a/src/main/java/com/lothrazar/storagenetwork/api/OpCompareType.java b/src/main/java/com/lothrazar/storagenetwork/api/OpCompareType.java index 5bc730a2..d821ff8c 100644 --- a/src/main/java/com/lothrazar/storagenetwork/api/OpCompareType.java +++ b/src/main/java/com/lothrazar/storagenetwork/api/OpCompareType.java @@ -39,7 +39,7 @@ public String word() { return "eq"; case GREATER: default: - return "greater"; + return "more"; } } } diff --git a/src/main/java/com/lothrazar/storagenetwork/block/cable/export/ScreenCableExportFilter.java b/src/main/java/com/lothrazar/storagenetwork/block/cable/export/ScreenCableExportFilter.java index 5e4086db..8941b317 100644 --- a/src/main/java/com/lothrazar/storagenetwork/block/cable/export/ScreenCableExportFilter.java +++ b/src/main/java/com/lothrazar/storagenetwork/block/cable/export/ScreenCableExportFilter.java @@ -17,7 +17,6 @@ import com.lothrazar.storagenetwork.registry.PacketRegistry; import com.lothrazar.storagenetwork.util.SsnConsts; import com.lothrazar.storagenetwork.util.UtilTileEntity; -import com.mojang.blaze3d.systems.RenderSystem; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; @@ -169,9 +168,7 @@ private void drawTooltips(GuiGraphics ms, final int mouseX, final int mouseY) { @Override protected void renderBg(GuiGraphics ms, float partialTicks, int mouseX, int mouseY) { - // minecraft.getTextureManager().bind(texture); - // RenderSystem.setShader(GameRenderer::getPositionTexShader); - // RenderSystem.setShaderTexture(0, texture); + int xCenter = (width - imageWidth) / 2; int yCenter = (height - imageHeight) / 2; ms.blit(texture, xCenter, yCenter, 0, 0, imageWidth, imageHeight); @@ -200,9 +197,7 @@ protected void renderBg(GuiGraphics ms, float partialTicks, int mouseX, int mous operationItemSlot = new ItemSlotNetwork(this, containerCableLink.cap.operationStack, x, y, size, leftPos, topPos, false); if (this.isOperationMode()) { operationItemSlot.drawSlot(ms, font, mouseX, mouseY); - // RenderSystem.setShader(GameRenderer::getPositionTexShader); - RenderSystem.setShaderTexture(0, ClientEventRegistry.SLOT); - ms.blit(texture, x - 1, y - 1, 0, 0, size, size, size, size); + ms.blit(ClientEventRegistry.SLOT, x - 1, y - 1, 0, 0, size, size, size, size); } } diff --git a/src/main/java/com/lothrazar/storagenetwork/block/cable/inputfilter/ScreenCableImportFilter.java b/src/main/java/com/lothrazar/storagenetwork/block/cable/inputfilter/ScreenCableImportFilter.java index 4af65076..2d4c8f85 100644 --- a/src/main/java/com/lothrazar/storagenetwork/block/cable/inputfilter/ScreenCableImportFilter.java +++ b/src/main/java/com/lothrazar/storagenetwork/block/cable/inputfilter/ScreenCableImportFilter.java @@ -16,7 +16,6 @@ import com.lothrazar.storagenetwork.registry.PacketRegistry; import com.lothrazar.storagenetwork.util.SsnConsts; import com.lothrazar.storagenetwork.util.UtilTileEntity; -import com.mojang.blaze3d.systems.RenderSystem; import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; @@ -176,9 +175,7 @@ private void drawTooltips(GuiGraphics ms, final int mouseX, final int mouseY) { @Override protected void renderBg(GuiGraphics ms, float partialTicks, int mouseX, int mouseY) { - // RenderSystem.setShader(GameRenderer::getPositionTexShader); - // RenderSystem.setShaderTexture(0, texture); - // this.txtHeight.ren + int xCenter = (width - imageWidth) / 2; int yCenter = (height - imageHeight) / 2; ms.blit(texture, xCenter, yCenter, 0, 0, imageWidth, imageHeight); @@ -208,9 +205,7 @@ protected void renderBg(GuiGraphics ms, float partialTicks, int mouseX, int mous operationItemSlot = new ItemSlotNetwork(this, containerCableLink.cap.operationStack, x, y, size, leftPos, topPos, false); if (this.isOperationMode()) { operationItemSlot.drawSlot(ms, font, mouseX, mouseY); - // RenderSystem.setShader(GameRenderer::getPositionTexShader); - RenderSystem.setShaderTexture(0, ClientEventRegistry.SLOT); - ms.blit(texture, x - 1, y - 1, 0, 0, size, size, size, size); + ms.blit(ClientEventRegistry.SLOT, x - 1, y - 1, 0, 0, size, size, size, size); } } diff --git a/src/main/java/com/lothrazar/storagenetwork/block/cable/linkfilter/ScreenCableFilter.java b/src/main/java/com/lothrazar/storagenetwork/block/cable/linkfilter/ScreenCableFilter.java index 8ac614af..862a394b 100644 --- a/src/main/java/com/lothrazar/storagenetwork/block/cable/linkfilter/ScreenCableFilter.java +++ b/src/main/java/com/lothrazar/storagenetwork/block/cable/linkfilter/ScreenCableFilter.java @@ -138,9 +138,7 @@ public void drawGradient(GuiGraphics ms, int x, int y, int x2, int y2, int u, in @Override protected void renderBg(GuiGraphics ms, float partialTicks, int mouseX, int mouseY) { - // minecraft.getTextureManager().bind(texture); - // RenderSystem.setShader(GameRenderer::getPositionTexShader); - // RenderSystem.setShaderTexture(0, texture); + int xCenter = (width - imageWidth) / 2; int yCenter = (height - imageHeight) / 2; ms.blit(texture, xCenter, yCenter, 0, 0, imageWidth, imageHeight); diff --git a/src/main/java/com/lothrazar/storagenetwork/block/collection/ScreenCollectionFilter.java b/src/main/java/com/lothrazar/storagenetwork/block/collection/ScreenCollectionFilter.java index cc6af9bc..1b6e2d90 100644 --- a/src/main/java/com/lothrazar/storagenetwork/block/collection/ScreenCollectionFilter.java +++ b/src/main/java/com/lothrazar/storagenetwork/block/collection/ScreenCollectionFilter.java @@ -56,9 +56,7 @@ public void render(GuiGraphics ms, int mouseX, int mouseY, float partialTicks) { @Override protected void renderBg(GuiGraphics ms, float partialTicks, int mouseX, int mouseY) { - // minecraft.getTextureManager().bind(texture); - // RenderSystem.setShader(GameRenderer::getPositionTexShader); - // RenderSystem.setShaderTexture(0, texture); + int xCenter = (width - imageWidth) / 2; int yCenter = (height - imageHeight) / 2; ms.blit(texture, xCenter, yCenter, 0, 0, imageWidth, imageHeight); diff --git a/src/main/resources/assets/storagenetwork/lang/en_us.json b/src/main/resources/assets/storagenetwork/lang/en_us.json index 33d1dca8..af6cdffd 100644 --- a/src/main/resources/assets/storagenetwork/lang/en_us.json +++ b/src/main/resources/assets/storagenetwork/lang/en_us.json @@ -171,9 +171,10 @@ - "gui.storagenetwork.operate.tooltip":"Operations disabled if the logic check fails", + "gui.storagenetwork.operate.tooltip":"If the logic check passes, the cable operates", "gui.storagenetwork.operate.tooltip.more":"Item count must be more than value", "gui.storagenetwork.operate.tooltip.less":"Item count must be less than value", + "gui.storagenetwork.operate.tooltip.eq":"Item count must be equal", "processing.buttons.toggle.true": "Always Active", "processing.buttons.toggle.false": "Only process the requested number",