Guest User

Untitled

a guest
Jul 13th, 2016
81
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package ed.enderdeath.mod.common;
  2.  
  3. import cpw.mods.fml.common.network.IGuiHandler;
  4. import ed.enderdeath.mod.AnvilDragon.ContainerDragonAnvil;
  5. import ed.enderdeath.mod.AnvilDragon.GuiAnvilDragon;
  6. import ed.enderdeath.mod.BaieMachine.ContainerMachineTuto;
  7. import ed.enderdeath.mod.BaieMachine.GuiMachineTuto;
  8. import ed.enderdeath.mod.BaieMachine.TileEntityMachineTuto;
  9. import ed.enderdeath.mod.Extractor.ContainerAlloyer;
  10. import ed.enderdeath.mod.Extractor.GuiAlloyer;
  11. import ed.enderdeath.mod.Extractor.TileEntityAlloyer;
  12. import net.minecraft.entity.player.EntityPlayer;
  13. import net.minecraft.tileentity.TileEntity;
  14. import net.minecraft.world.World;
  15.  
  16. public class GuiHandler implements IGuiHandler
  17. {
  18. public static final int guiCraftingTableID = 3;
  19.  
  20. @Override
  21. public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
  22. {
  23. TileEntity tile = world.getTileEntity(x, y, z);
  24. if(tile instanceof TileEntityAlloyer)
  25. {
  26. return new ContainerAlloyer((TileEntityAlloyer)tile, player.inventory);
  27. }
  28.  
  29. if(tile instanceof TileEntityMachineTuto)
  30. {
  31. return new ContainerMachineTuto((TileEntityMachineTuto)tile, player.inventory);
  32. }
  33.  
  34. if(ID == guiCraftingTableID)
  35. {
  36. System.out.println("Test getServerGuiElement");
  37. return new ContainerDragonAnvil(player.inventory, world, x, y, z);
  38. }
  39. return null;
  40. }
  41.  
  42. @Override
  43. public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
  44. {
  45.  
  46. TileEntity tile = world.getTileEntity(x, y, z);
  47. if(tile instanceof TileEntityAlloyer)
  48. {
  49. return new GuiAlloyer((TileEntityAlloyer)tile, player.inventory);
  50. }
  51. if(tile instanceof TileEntityMachineTuto)
  52. {
  53. return new GuiMachineTuto((TileEntityMachineTuto)tile, player.inventory);
  54. }
  55. if(ID == guiCraftingTableID)
  56. {
  57. System.out.println("Test getClientGuiElement");
  58. return new GuiAnvilDragon(player.inventory, world, x,y,z);
  59. }
  60. return null;
  61. }
  62.  
  63. }
RAW Paste Data