Topic category: User side tutorials
If you followed this tutorial correctly,
the background should not turn dark when you open the GUI as shown in the image.
Step1
Create your custom GUI and go to the code editor.
Step2
Find that code.
@Override
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
this.renderBackground(guiGraphics, mouseX, mouseY, partialTicks);
super.render(guiGraphics, mouseX, mouseY, partialTicks);
this.renderTooltip(guiGraphics, mouseX, mouseY);
}
@Override
protected void renderBg(GuiGraphics guiGraphics, float partialTicks, int gx, int gy) {
RenderSystem.setShaderColor(1, 1, 1, 1);
RenderSystem.enableBlend();
RenderSystem.defaultBlendFunc();
RenderSystem.disableBlend();
}
Remove the code to make it look like this.
@Override
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
super.render(guiGraphics, mouseX, mouseY, partialTicks);
this.renderTooltip(guiGraphics, mouseX, mouseY);
}
@Override
protected void renderBg(GuiGraphics guiGraphics, float partialTicks, int gx, int gy) {
}
Step3
Go to the last line and add the code.
@Override
public void renderBackground(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) {
}
It should look like the image above.