Guest User

GuiMoriumWorkbench.java

a guest
Apr 21st, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.23 KB | None | 0 0
  1. package com.tristanvo.mod;
  2.  
  3. import org.lwjgl.opengl.GL11;
  4.  
  5. import net.minecraft.client.Minecraft;
  6. import net.minecraft.client.gui.inventory.GuiContainer;
  7. import net.minecraft.entity.player.InventoryPlayer;
  8. import net.minecraft.util.ResourceLocation;
  9. import net.minecraft.util.StatCollector;
  10. import net.minecraft.world.World;
  11.  
  12. public class GuiMoriumWorkbench extends GuiContainer {
  13.  
  14.     private ResourceLocation texture = new ResourceLocation(Reference.MOD_ID + ":" + "textures/gui/morium_workbench.png");
  15.    
  16.     public GuiMoriumWorkbench(InventoryPlayer player, World world, int x, int y, int z) {
  17.         super(new ContainerMoriumWorkbench(player, world, x, y, z));
  18.        
  19.         this.xSize = 176;
  20.         this.ySize = 166;
  21.     }
  22.    
  23.    
  24.     public void onGuiClosed() {
  25.         super.onGuiClosed();
  26.     }
  27.     protected void drawGuiContainerForegroundLayer(int i, int j) {
  28.         this.fontRendererObj.drawString(StatCollector.translateToLocal("Work Bench"), 100, 5, 0x000000);
  29.     }
  30.    
  31.     @Override
  32.     protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
  33.         GL11.glColor4f(1F, 1F, 1F, 1F);
  34.        
  35.         Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
  36.        
  37.         drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
  38.     }
  39.  
  40. }
Add Comment
Please, Sign In to add comment