Advertisement
TristanvO

GuiCrafting.java

Apr 10th, 2016
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.53 KB | None | 0 0
  1. package com.tristanvo.mod.gui;
  2.  
  3. import org.lwjgl.opengl.GL11;
  4.  
  5. import cpw.mods.fml.relauncher.Side;
  6. import cpw.mods.fml.relauncher.SideOnly;
  7. import net.minecraft.client.gui.inventory.GuiContainer;
  8. import net.minecraft.client.resources.I18n;
  9. import net.minecraft.entity.player.InventoryPlayer;
  10. import net.minecraft.inventory.ContainerWorkbench;
  11. import net.minecraft.util.ResourceLocation;
  12. import net.minecraft.world.World;
  13.  
  14. @SideOnly(Side.CLIENT)
  15. public class GuiCrafting extends GuiContainer
  16. {
  17.     private static final ResourceLocation moriumWorkbenchGuiTextures = new ResourceLocation("textures/gui/container/morium_workbench.png");
  18.  
  19.     public GuiCrafting(InventoryPlayer inventory, World world, int par3, int par4, int par5)
  20.     {
  21.         super(new ContainerMoriumWorkbench(inventory, world, par3, par4, par5));
  22.     }
  23.  
  24.     protected void drawGuiContainerForegroundLayer(int par1, int par2)
  25.     {
  26.         this.fontRendererObj.drawString(I18n.format("container.crafting", new Object[0]), 28, 6, 4210752);
  27.         this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
  28.     }
  29.  
  30.     protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
  31.     {
  32.         GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  33.         this.mc.getTextureManager().bindTexture(moriumWorkbenchGuiTextures);
  34.         int k = (this.width - this.xSize) / 2;
  35.         int l = (this.height - this.ySize) / 2;
  36.         this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement