Skip to content

Commit

Permalink
fixed visual rendering and text errors inside of import/export cables…
Browse files Browse the repository at this point in the history
… using the operation remote
  • Loading branch information
Lothrazar committed Oct 14, 2024
1 parent 8d46526 commit c56ac8b
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 23 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public String word() {
return "eq";
case GREATER:
default:
return "greater";
return "more";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/assets/storagenetwork/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit c56ac8b

Please sign in to comment.