Advertisement
JoshuaGaming-_-

Untitled

Nov 27th, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. package mods.natura.gui;
  2.  
  3. import mods.natura.blocks.tech.NetherrackFurnaceLogic;
  4. import net.minecraft.entity.player.EntityPlayer;
  5. import net.minecraft.world.World;
  6. import cpw.mods.fml.common.network.IGuiHandler;
  7.  
  8. public class NGuiHandler implements IGuiHandler
  9. {
  10. public static final int craftingGui = 1;
  11. public static final int furnaceGui = 2;
  12.  
  13. @Override
  14. public Object getClientGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z)
  15. {
  16. if (ID == craftingGui)
  17. {
  18. return new WorkbenchGui(player.inventory, world);
  19. }
  20. if (ID == furnaceGui)
  21. {
  22. return new FurnaceGui(player.inventory, (NetherrackFurnaceLogic) world.getTileEntity(x, y, z));
  23. }
  24. return null;
  25. }
  26.  
  27. @Override
  28. public Object getServerGuiElement (int ID, EntityPlayer player, World world, int x, int y, int z)
  29. {
  30. if (ID == craftingGui)
  31. {
  32. return new WorkbenchContainer(player.inventory, world);
  33. }
  34. if (ID == furnaceGui)
  35. {
  36. return new FurnaceContainer(player.inventory, (NetherrackFurnaceLogic) world.getTileEntity(x, y, z));
  37. }
  38. return null;
  39. }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement