Skip to content

Commit

Permalink
Fix MachineInterfaceScreen being rendered too dark
Browse files Browse the repository at this point in the history
Throw out un-needed methods for background rendering
  • Loading branch information
BluSunrize committed Apr 25, 2024
1 parent d24967c commit 0db6595
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,14 @@ protected void init()
this.guiTop = (this.height-this.ySize)/2;
}

protected abstract void drawGuiContainerBackgroundLayer(GuiGraphics graphics, int mouseX, int mouseY, float partialTick);

protected abstract void drawGuiContainerForegroundLayer(GuiGraphics graphics, int mouseX, int mouseY, float partialTick);

@Override
public void render(GuiGraphics graphics, int mx, int my, float partial)
{
// Background texture
drawGuiContainerBackgroundLayer(graphics, mx, my, partial);

// Buttons
// Background & widgets
super.render(graphics, mx, my, partial);

// Foreground
// Additional foreground elements
drawGuiContainerForegroundLayer(graphics, mx, my, partial);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ private void sendInputColor(DyeColor col)
}

@Override
protected void drawGuiContainerBackgroundLayer(GuiGraphics graphics, int mouseX, int mouseY, float partialTick)
public void renderBackground(GuiGraphics graphics, int mouseX, int mouseY, float partialTick)
{
if(availableChecks==null)
graphics.blit(TEXTURE, guiLeft, guiTop+(ySize-74)/2, 112, 80, xSize, 106);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ public void sendConfig(String key, int value)
PacketDistributor.SERVER.noArg().send(new MessageBlockEntitySync(blockEntity, message));
}

@Override
protected void drawGuiContainerBackgroundLayer(GuiGraphics graphics, int mouseX, int mouseY, float partialTick)
{

}

@Override
protected void drawGuiContainerForegroundLayer(GuiGraphics graphics, int mouseX, int mouseY, float partialTick)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,6 @@ private void sendConfig(String key, int value)
PacketDistributor.SERVER.noArg().send(new MessageBlockEntitySync(blockEntity, message));
}

@Override
protected void drawGuiContainerBackgroundLayer(GuiGraphics graphics, int mouseX, int mouseY, float partialTick)
{

}

@Override
protected void drawGuiContainerForegroundLayer(GuiGraphics graphics, int mouseX, int mouseY, float partialTick)
{
Expand Down

0 comments on commit 0db6595

Please sign in to comment.