Advertisement
Guest User

Gui

a guest
Mar 21st, 2017
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. package mod.brandy.client.gui;
  2.  
  3. import net.minecraft.client.Minecraft;
  4. import net.minecraft.entity.player.EntityPlayer;
  5. import net.minecraft.world.World;
  6. import net.minecraftforge.client.event.RenderGameOverlayEvent;
  7. import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
  8. import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
  9. import net.minecraftforge.fml.common.gameevent.TickEvent;
  10. import net.minecraftforge.fml.common.network.IGuiHandler;
  11.  
  12. public class BrandyGuiHandler implements IGuiHandler
  13. {
  14. public static final int calculatorGUI = 0;
  15. public static final int clickerGUI = 1;
  16. public static final int clickerCountGUI = 2;
  17. public static final int dclockGUI = 3;
  18. public static final int dclockDisplayGUI = 4;
  19. public static final int dcompassGUI = 5;
  20. public static final int dcompassDisplayGUI = 6;
  21.  
  22. @SubscribeEvent
  23. public void onRenderGui(RenderGameOverlayEvent.Post event)
  24. {
  25. if (event.getType() == ElementType.ALL)
  26. {
  27. new GuiClickerCount(Minecraft.getMinecraft());
  28.  
  29. if(GuiDClock.display == true)
  30. {
  31. new GuiDClockDisplay(Minecraft.getMinecraft());
  32. }
  33. if(GuiDCompass.display == true)
  34. {
  35. new GuiDCompassDisplay(Minecraft.getMinecraft());
  36. }
  37. }
  38.  
  39. }
  40.  
  41. @SubscribeEvent
  42. public void onPlayerTick(TickEvent.PlayerTickEvent event)
  43. {
  44.  
  45. }
  46.  
  47. @Override
  48. public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
  49. {
  50. return null;
  51. }
  52.  
  53. @Override
  54. public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z)
  55. {
  56. if (ID == calculatorGUI){
  57. return new GuiCalculator();
  58. }
  59. else if (ID == clickerGUI){
  60. return new GuiClicker();
  61. }
  62. else if (ID == clickerCountGUI){
  63. return new GuiClickerCount(Minecraft.getMinecraft());
  64. }
  65. else if (ID == dclockGUI){
  66. return new GuiDClock();
  67. }
  68. else if (ID == dclockDisplayGUI){
  69. return new GuiDClockDisplay(Minecraft.getMinecraft());
  70. }
  71. else if (ID == dcompassGUI){
  72. return new GuiDCompass();
  73. }
  74. else if (ID == dcompassDisplayGUI){
  75. return new GuiDCompassDisplay(Minecraft.getMinecraft());
  76. }
  77. return null;
  78. }
  79.  
  80. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement