Guest User

GuiHandler

a guest
Mar 8th, 2015
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. public class GuiHandler implements IGuiHandler
  2. {
  3. public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
  4. {
  5. TileEntity entity = world.getBlockTileEntity(x, y, z);
  6.  
  7. if(entity != null)
  8. {
  9. switch(ID)
  10. {
  11. case SkyrimMain.guiIdForge:
  12. if(entity instanceof TileEntityForge)
  13. {
  14. return new ContainerForge(player.inventory, (TileEntityForge) entity);
  15. }
  16. }
  17. }
  18.  
  19. return null;
  20. }
  21.  
  22. public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
  23. {
  24. TileEntity entity = world.getBlockTileEntity(x, y, z);
  25.  
  26. if(entity != null)
  27. {
  28. switch(ID)
  29. {
  30. case SkyrimMain.guiIdForge:
  31. if(entity instanceof TileEntityForge)
  32. {
  33. return new GuiForge(player.inventory, (TileEntityForge) entity);
  34. }
  35.  
  36. }
  37. }
  38.  
  39. return null;
  40. }
  41.  
  42. }
Advertisement
Add Comment
Please, Sign In to add comment