Posted January 16, 20187 yr I'm having problems knowing what else I should do in order to let JEI know that my GUI is wider so it knows not to render on top. The GUI Code: public class GuiFactory extends GuiContainer { protected int xSize = 256; protected int ySize = 220; private static final ResourceLocation FACTORY_GUI_BACKGROUND = new ResourceLocation(ModInfo.MODID + ":textures/gui/container/factory_base.png"); public GuiFactory(Container inventorySlotsIn) { super(inventorySlotsIn); } /** * Draws the screen and all the components in it. */ @Override public void drawScreen(int par1, int par2, float par3) { this.drawDefaultBackground(); // This makes the background go darker super.drawScreen(par1, par2, par3); } /** * Draw the background layer for the GuiContainer (everything behind the items) */ @Override protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(FACTORY_GUI_BACKGROUND); int k = (this.width - this.xSize) / 2; int l = (this.height - this.ySize) / 2; this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); int i1; } /** * Draw the foreground layer for the GuiContainer (everything in front of the * items) */ @Override protected void drawGuiContainerForegroundLayer(int par1, int par2) { this.fontRenderer.drawString(I18n.format("container.inventory"), -26, this.ySize - 122, 4210752); } } Edited January 16, 20187 yr by American2050
January 16, 20187 yr Author SOLVED: I moved protected int xSize = 256; protected int ySize = 220; into the constructor and fixed My bad.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.