Guest User

Untitled

a guest
Jun 25th, 2017
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.36 KB | None | 0 0
  1. package com.walkingdead.walkingdeadmod.items.backpack;
  2.  
  3. import org.lwjgl.input.Keyboard;
  4. import org.lwjgl.opengl.GL11;
  5.  
  6. import net.minecraft.client.gui.GuiButton;
  7. import net.minecraft.client.gui.inventory.GuiContainer;
  8. import net.minecraft.entity.player.EntityPlayer;
  9. import net.minecraft.item.ItemStack;
  10. import net.minecraft.nbt.NBTTagCompound;
  11. import net.minecraft.nbt.NBTTagList;
  12. import net.minecraft.server.MinecraftServer;
  13. import net.minecraft.util.ResourceLocation;
  14. import net.minecraft.world.World;
  15. import net.minecraftforge.fml.common.FMLCommonHandler;
  16.  
  17.  
  18. public class GuiWindow extends GuiContainer{
  19.     private final InventoryItem inventory;
  20.    
  21.    
  22.     public GuiWindow(ContainerModTileEntity containerItem) {
  23.         super(containerItem);
  24.         this.inventory = containerItem.inventory;
  25.         this.xSize = 176;
  26.         this.ySize = 166;
  27.     }
  28.  
  29.     private static final ResourceLocation texture = new ResourceLocation("textures/gui/container/dispenser.png");
  30.  
  31.     protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
  32.         int posX = (this.width) / 2;
  33.         int posY = (this.height) / 2;
  34.        
  35.         GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  36.  
  37.         this.mc.renderEngine.bindTexture(texture);
  38.         int k = (this.width - this.xSize) / 2;
  39.         int l = (this.height - this.ySize) / 2;
  40.         this.drawTexturedModalRect(k, l, 0, 0, this.xSize, this.ySize);
  41.  
  42.         zLevel = 100.0F;
  43.  
  44.     }
  45.  
  46.  
  47.     public void updateScreen() {
  48.         super.updateScreen();
  49.         int posX = (this.width) / 2;
  50.         int posY = (this.height) / 2;
  51.  
  52.     }
  53.  
  54.     @Override
  55.     protected void keyTyped(char par1, int par2) throws java.io.IOException {
  56.  
  57.         super.keyTyped(par1, par2);
  58.  
  59.     }
  60.  
  61.     protected void drawGuiContainerForegroundLayer(int par1, int par2) {
  62.         int posX = (this.width) / 2;
  63.         int posY = (this.height) / 2;
  64.  
  65.     }
  66.  
  67.     public void onGuiClosed() {
  68.         super.onGuiClosed();
  69.         Keyboard.enableRepeatEvents(false);
  70.     }
  71.    
  72.    
  73.  
  74.     public void initGui() {
  75.         super.initGui();
  76.         this.guiLeft = (this.width - 176) / 2;
  77.         this.guiTop = (this.height - 166) / 2;
  78.         Keyboard.enableRepeatEvents(true);
  79.         this.buttonList.clear();
  80.         int posX = (this.width) / 2;
  81.         int posY = (this.height) / 2;
  82.  
  83.     }
  84.  
  85.     protected void actionPerformed(GuiButton button) {
  86.         MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
  87.         World world = server.worlds[0];
  88.  
  89.     }
  90.  
  91.     public boolean doesGuiPauseGame() {
  92.         return false;
  93.     }
  94.  
  95. }
Add Comment
Please, Sign In to add comment