GuiAllocator.java (1257B)
1 package ambos.simpletech.gui; 2 3 import net.minecraft.client.gui.GuiContainer; 4 import net.minecraft.core.player.inventory.InventoryPlayer; 5 import org.lwjgl.opengl.GL11; 6 7 import ambos.simpletech.block.entity.TileEntityAllocator; 8 import ambos.simpletech.player.inventory.ContainerAllocator; 9 10 public class GuiAllocator extends GuiContainer { 11 private final TileEntityAllocator allocatorInv; 12 13 public GuiAllocator(InventoryPlayer playerInventory, TileEntityAllocator allocator) { 14 super(new ContainerAllocator(playerInventory, allocator)); 15 this.allocatorInv = allocator; 16 } 17 18 @Override 19 protected void drawGuiContainerForegroundLayer() { 20 this.fontRenderer.drawString("Allocator", 60, 6, 4210752); 21 this.fontRenderer.drawString("Inventory", 8, this.ySize - 96 + 2, 4210752); 22 } 23 24 @Override 25 protected void drawGuiContainerBackgroundLayer(float f) { 26 int i = this.mc.renderEngine.getTexture("/assets/simpletech/gui/allocator.png"); 27 28 GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f); 29 30 this.mc.renderEngine.bindTexture(i); 31 32 int j = (this.width - this.xSize) / 2; 33 int k = (this.height - this.ySize) / 2; 34 35 this.drawTexturedModalRect(j, k, 0, 0, this.xSize, this.ySize); 36 } 37 }