TristanvO

GuiCrafting.java

Apr 10th, 2016
95
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 com.tristanvo.mod.blocks.moriumWorkbench;
  6.  
  7. import cpw.mods.fml.relauncher.Side;
  8. import cpw.mods.fml.relauncher.SideOnly;
  9. import net.minecraft.client.gui.inventory.GuiContainer;
  10. import net.minecraft.client.resources.I18n;
  11. import net.minecraft.entity.player.InventoryPlayer;
  12. import net.minecraft.inventory.ContainerWorkbench;
  13. import net.minecraft.util.ResourceLocation;
  14. import net.minecraft.world.World;
  15.  
  16. @SideOnly(Side.CLIENT)
  17. public class GuiCrafting extends GuiContainer
  18. {
  19.     private static final ResourceLocation moriumWorkbenchGuiTextures = new ResourceLocation("textures/gui/container/morium_workbench.png");
  20.  
  21.     public GuiCrafting(InventoryPlayer inventory, moriumWorkbench te)
  22.     {
  23.         super(new ContainerModTileEntity(inventory, te));
  24.     }
  25.  
  26.  
  27.     protected void drawGuiContainerForegroundLayer(int par1, int par2)
  28.     {
  29.         this.fontRendererObj.drawString(I18n.format("container.crafting", new Object[0]), 28, 6, 4210752);
  30.         this.fontRendererObj.drawString(I18n.format("container.inventory", new Object[0]), 8, this.ySize - 96 + 2, 4210752);
  31.     }
  32.  
  33.     protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
  34.     {
  35.         GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  36.         this.mc.getTextureManager().bindTexture(moriumWorkbenchGuiTextures);
  37.         int k = (this.width - this.xSize) / 2;
  38.         int l = (this.height - this.ySize) / 2;
  39.         this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
  40.     }
  41. }
Add Comment
Please, Sign In to add comment