Guest User

ValaniumChestGui

a guest
Sep 23rd, 2018
69
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import org.lwjgl.opengl.GL11;
  2.  
  3. import fr.fuulys.valamod.gui.container.ValaniumChestContainer;
  4. import fr.fuulys.valamod.tiles.TileValaniumChest;
  5. import net.minecraft.client.gui.inventory.GuiContainer;
  6. import net.minecraft.entity.player.InventoryPlayer;
  7. import net.minecraft.util.ResourceLocation;
  8.  
  9. public class ValaniumChestGui extends GuiContainer {
  10.     private static final ResourceLocation BACKGROUND = new ResourceLocation("valamod",
  11.             "textures/gui/Valanium_chest.png");
  12.  
  13.     public ValaniumChestGui(TileValaniumChest tile, InventoryPlayer inventory) {
  14.         super(new ValaniumChestContainer(tile, inventory));
  15.  
  16.         this.xSize = 250;
  17.         this.ySize = 256;
  18.     }
  19.  
  20.     protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
  21.         GL11.glColor4f(1.0F, 1.5F, 1.0F, 1.0F);
  22.         this.mc.getTextureManager().bindTexture(BACKGROUND);
  23.         int k = (this.width - this.xSize) / 2;
  24.         int l = (this.height - this.ySize) / 2;
  25.         drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
  26.     }
  27. }
RAW Paste Data