package electroblob.wizardry.client; import net.minecraft.client.gui.inventory.GuiContainer; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.client.resources.I18n; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.ContainerWorkbench; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; /** Crafting table GUI that doesn't require a crafting table container object. */ public class GuiPortableCrafting extends GuiContainer { private static final ResourceLocation craftingTableGuiTextures = new ResourceLocation( "textures/gui/container/crafting_table.png"); public GuiPortableCrafting(InventoryPlayer p_i1084_1_, World p_i1084_2_, BlockPos pos){ super(new ContainerWorkbench(p_i1084_1_, p_i1084_2_, pos)); } /** * Draw the foreground layer for the GuiContainer (everything in front of the items) */ protected void drawGuiContainerForegroundLayer(int p_146979_1_, int p_146979_2_){ this.fontRenderer.drawString(I18n.format("container.crafting"), 28, 6, 4210752); this.fontRenderer.drawString(I18n.format("container.inventory"), 8, this.ySize - 96 + 2, 4210752); } protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_){ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(craftingTableGuiTextures); int k = (this.width - this.xSize) / 2; int l = (this.height - this.ySize) / 2; this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize); } }