Guest User

GuiForge

a guest
Mar 9th, 2015
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. public class GuiForge extends GuiContainer
  2. {
  3. public static final ResourceLocation texture = new ResourceLocation(SkyrimMain.modid, "textures/gui/Forge.png");
  4.  
  5. public TileEntityForge forge;
  6.  
  7. public GuiForge(InventoryPlayer inventoryPlayer, TileEntityForge entity)
  8. {
  9. super(new ContainerForge(inventoryPlayer, entity));
  10.  
  11. this.forge = entity;
  12.  
  13. this.xSize = 176;
  14. this.ySize = 166;
  15. }
  16.  
  17. public void drawGuiContainerForegroundLayer(int par1, int par2)
  18. {
  19. String name = this.forge.isInvNameLocalized() ? this.forge.getInvName() : I18n.getString(this.forge.getInvName());
  20.  
  21. this.fontRenderer.drawString(name, this.xSize / 2 - this.fontRenderer.getStringWidth(name) / 2, 6, 4210752);
  22.  
  23. this.fontRenderer.drawString(I18n.getString("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
  24. }
  25.  
  26. public void drawGuiContainerBackgroundLayer(float f, int i, int j)
  27. {
  28. GL11.glColor4f(1F, 1F, 1F, 1F);
  29.  
  30. Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
  31.  
  32. drawTexturedModalRect(guiLeft, guiTop, 0, 0, xSize, ySize);
  33. }
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment