Advertisement
Guest User

Untitled

a guest
Sep 27th, 2016
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. package LiamsGhost;
  2.  
  3. import cpw.mods.fml.common.FMLCommonHandler;
  4. import cpw.mods.fml.common.eventhandler.EventBus;
  5. import cpw.mods.fml.common.eventhandler.SubscribeEvent;
  6. import cpw.mods.fml.common.gameevent.InputEvent.KeyInputEvent;
  7. import LiamsGhost.gui.GuiScreenMods;
  8. import LiamsGhost.mods.Mod;
  9. import LiamsGhost.mods.ModAimbot;
  10. import LiamsGhost.mods.ModAutoclicker;
  11. import LiamsGhost.mods.ModHUD;
  12. import LiamsGhost.mods.ModSTap;
  13. import LiamsGhost.mods.ModVelocity;
  14. import LiamsGhost.mods.ModWTap;
  15. import java.util.ArrayList;
  16. import net.minecraft.client.Minecraft;
  17. import org.lwjgl.input.Keyboard;
  18.  
  19. public class LiamsGhost
  20. {
  21. private static ArrayList<Mod> mods = new ArrayList();
  22. private GuiScreenMods gui;
  23.  
  24. static
  25. {
  26. mods.add(new ModHUD());
  27. mods.add(new ModAutoclicker());
  28. mods.add(new ModAimbot());
  29. mods.add(new ModWTap());
  30. mods.add(new ModVelocity());
  31. mods.add(new ModSTap());
  32. }
  33.  
  34. public LiamsGhost()
  35. {
  36. this.gui = new GuiScreenMods(this);
  37. FMLCommonHandler.instance().bus().register(this);
  38. }
  39.  
  40. public void destroy()
  41. {
  42. FMLCommonHandler.instance().bus().unregister(this);
  43. for (Mod mod : mods) {
  44. mod.setEnabled(false);
  45. }
  46. }
  47.  
  48. public static ArrayList<Mod> getMods()
  49. {
  50. return mods;
  51. }
  52.  
  53. @SubscribeEvent
  54. public void onKeyInput(InputEvent.KeyInputEvent event)
  55. {
  56. if (!Keyboard.getEventKeyState()) {
  57. return;
  58. }
  59. if (Keyboard.getEventKey() == 157)
  60. {
  61. Minecraft.func_71410_x().func_147108_a(this.gui);
  62. return;
  63. }
  64. for (Mod mod : mods) {
  65. if (mod.getKeybind() == Keyboard.getEventKey())
  66. {
  67. mod.setEnabled(!mod.isEnabled());
  68. return;
  69. }
  70. }
  71. }
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement