Advertisement
Guest User

Untitled

a guest
Feb 15th, 2014
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.60 KB | None | 0 0
  1. package pirate.common;
  2. import net.minecraft.client.gui.inventory.GuiContainer;
  3. import net.minecraft.client.resources.I18n;
  4. import net.minecraft.entity.player.InventoryPlayer;
  5. import net.minecraft.inventory.IInventory;
  6. import net.minecraft.util.ResourceLocation;
  7. import org.lwjgl.opengl.GL11;
  8.  
  9.  
  10. public class GuiBigChest extends GuiContainer{
  11.     public static ResourceLocation texture = new ResourceLocation("modtutoriel", "textures/gui/container/bigChest.png");
  12.         private TileEntityBigChest bigChest;
  13.         private IInventory playerInventory;
  14.         public GuiBigChest(InventoryPlayer inventory, TileEntityBigChest tileEntity)
  15.         {
  16.             super(new ContainerBigChest(inventory, tileEntity));
  17.             this.bigChest = tileEntity;
  18.             this.playerInventory = inventory;
  19.             this.ySize = 230;
  20.         }
  21.        
  22.          protected void drawGuiContainerForegroundLayer(int par1, int par2)
  23.          {
  24.              this.fontRenderer.drawString(this.playerInventory.isInvNameLocalized() ? this.playerInventory.getInvName() : I18n.getString(this.playerInventory.getInvName()), 8, 129, 0);
  25.              this.fontRenderer.drawString(this.bigChest.isInvNameLocalized() ? this.bigChest.getInvName() : I18n.getString(this.bigChest.getInvName()), 8, 7, 0);
  26.          }
  27.      
  28.         @Override
  29.         protected void drawGuiContainerBackgroundLayer(float f, int i, int j)
  30.         {
  31.              GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  32.              this.mc.getTextureManager().bindTexture(texture);
  33.              int x = (this.width - this.xSize) / 2;
  34.              int y = (this.height - this.ySize) / 2;
  35.              this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
  36.         }
  37.      }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement