Advertisement
MightyDanp

eotGuiCore

Jul 7th, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. package com.mightydanp.eot.core.client.gui;
  2.  
  3. import net.minecraft.client.Minecraft;
  4. import net.minecraft.entity.player.EntityPlayer;
  5. import net.minecraft.world.World;
  6.  
  7. import com.mightydanp.eot.core.client.gui.container.ContainterEotInventory;
  8. import com.mightydanp.eot.core.client.gui.inventory.TileEntityEotInventory;
  9. import com.mightydanp.eot.core.client.gui.screen.GuiEotInventory;
  10. import com.mightydanp.eot.core.handler.eotGuiHandler;
  11. import com.mightydanp.eot.lib.GuiIds;
  12.  
  13. import cpw.mods.fml.common.network.IGuiHandler;
  14.  
  15. public class eotGuiCore extends eotGuiHandler{
  16. public static TileEntityEotInventory tileEntityEotInventory = new TileEntityEotInventory();
  17.  
  18. @Override
  19. public void initialize() {
  20. registerGuiHandler();
  21. }
  22.  
  23. @Override
  24. protected void registerGuiHandler() {
  25. super.registerGuiHandler();
  26. eotGuiHandler.registerClientGuiHandler(GuiIds.eotInventory, this);
  27. }
  28.  
  29. @Override
  30. public Object getServerGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z){
  31. if (ID == GuiIds.eotInventory){
  32. return new ContainterEotInventory(player.inventory, tileEntityEotInventory);
  33. }
  34. return null;
  35.  
  36. }
  37.  
  38. @Override
  39. public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
  40.  
  41. if (ID == GuiIds.eotInventory) {
  42. eotGuiCore.tileEntityEotInventory.init(Minecraft.getMinecraft().thePlayer);
  43. return new GuiEotInventory(player.inventory, tileEntityEotInventory);
  44. }
  45. return null;
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement