package com.yolp900.itsjustacharm.client.guis; import com.yolp900.itsjustacharm.reference.LibGuis; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.inventory.Container; import org.lwjgl.opengl.GL11; public abstract class ModGuiContainer extends GuiContainer { private LibGuis gui; public ModGuiContainer(Container inventory, LibGuis gui, int width, int height) { super(inventory); this.gui = gui; this.xSize = width; this.ySize = height; } @Override protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(gui.getBackground()); drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize); drawGuiContainerBackground(partialTicks, mouseX, mouseY); } protected abstract void drawGuiContainerBackground(float partialTicks, int mouseX, int mouseY); @Override protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { drawGuiContainerForeground(mouseX, mouseY); } protected abstract void drawGuiContainerForeground(int mouseX, int mouseY); }