Advertisement
MightyDanp

eotGuiCore

Jul 14th, 2015
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. package com.mightydanp.eot.core.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.gui.container.ContainterEotInventory;
  8. import com.mightydanp.eot.core.gui.inventory.EotInventory;
  9. import com.mightydanp.eot.core.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 EotInventory eotInventory = new EotInventory();
  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, eotInventory);
  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.eotInventory.init(Minecraft.getMinecraft().thePlayer);
  43. return new GuiEotInventory(player.inventory, eotInventory);
  44. }
  45. return null;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement