Advertisement
Guest User

nix

a guest
Jul 10th, 2015
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 4.24 KB | None | 0 0
  1. Cake.java:
  2.  
  3. package me.plankins.cake;
  4.  
  5. import me.plankins.cake.module.ModuleManager;
  6.  
  7. import org.lwjgl.opengl.Display;
  8.  
  9. public class Cake {
  10.    
  11.     public static String Client_Name = "Cake-Client";
  12.     public static Double Client_Version = 1.0;
  13.    
  14.     public static final Cake theClient = new Cake();
  15.    
  16.     public static ModuleManager moduleManager;
  17.    
  18.     public static void StartClient(){
  19.         moduleManager = new ModuleManager();
  20.         Display.setTitle(Client_Name + " " + Client_Version);
  21.     }
  22.  
  23.     public static String getClient_Name() {
  24.         return Client_Name;
  25.     }
  26.  
  27.     public static void setClient_Name(String client_Name) {
  28.         Client_Name = client_Name;
  29.     }
  30.    
  31.     public static double getClient_Version() {
  32.         return Client_Version;
  33.     }
  34.    
  35.     public static void setClient_Version(double client_Version) {
  36.         Client_Version = client_Version;
  37.     }
  38.    
  39.    
  40.  
  41. }
  42.  
  43.  
  44.  
  45. Wrapper.java:
  46.  
  47. package me.plankins.cake.utils;
  48.  
  49.  
  50. import net.minecraft.client.Minecraft;
  51.  
  52.  
  53.  
  54. import net.minecraft.client.gui.FontRenderer;
  55.  
  56. public class Wrapper {
  57.  
  58.     public static Minecraft mc =Minecraft.getMinecraft();
  59.     public static FontRenderer fr = Minecraft.getMinecraft().fontRendererObj;
  60. }
  61.  
  62.  
  63.  
  64.  
  65.  
  66. Category.java:
  67.  
  68. package me.plankins.cake.module;
  69.  
  70. public enum Category {
  71.  
  72.     COMBAT,WORLD,PLAYER,RENDER,GUI
  73. }
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80. ModuleManager.java:
  81.  
  82. package me.plankins.cake.module;
  83.  
  84. import java.util.ArrayList;
  85.  
  86. import me.plankins.cake.modules.*;
  87.  
  88. public class ModuleManager {
  89.  
  90.     public static ArrayList<Module> activeModules = new ArrayList<Module>();
  91.  
  92.     public ModuleManager() {
  93.         this.activeModules.add(new Sprint());
  94.         this.activeModules.add(new FullBright());
  95.         this.activeModules.add(new KillAura());
  96.         this.activeModules.add(new Flight());
  97.         this.activeModules.add(new Aimbot());
  98.         this.activeModules.add(new FastPlace());
  99.     //  this.activeModules.add(new Gui());
  100.     //  this.activeModules.add(new XRay());
  101.     }
  102.  
  103.     public static ArrayList<Module> getModules() {
  104.         return activeModules;
  105.     }
  106.  
  107.     public Module getModule(Class<? extends Module> clazz) {
  108.         for (Module mod : getModules()) {
  109.             if (mod.getClass() == clazz) {
  110.                 return mod;
  111.             }
  112.         }
  113.         return null;
  114.     }
  115.  
  116. }
  117.  
  118.  
  119.  
  120.  
  121.  
  122. Module.java
  123.  
  124. package me.plankins.cake.module;
  125.  
  126. public class Module {
  127.  
  128.     private String name;
  129.     private int bind;
  130.     private Category category;
  131.     private boolean isEnabled;
  132.     private String act;
  133.  
  134.     public Module(String name, int bind, Category category) {
  135.         this.name = name;
  136.         this.bind = bind;
  137.         this.category = category;
  138.     }
  139.  
  140.     public String getAct() {
  141.         return act;
  142.     }
  143.    
  144.     public String getName() {
  145.         return name;
  146.     }
  147.  
  148.     public int getBind() {
  149.         return bind;
  150.     }
  151.  
  152.     public Category getCategory() {
  153.         return category;
  154.     }
  155.  
  156.     public boolean getState() {
  157.         return isEnabled;
  158.     }
  159.  
  160.     public void setState(boolean state) {
  161.         this.onToggle();
  162.         if (state) {
  163.             this.onEnable();
  164.             this.isEnabled = true;
  165.         } else {
  166.             this.onDisable();
  167.             this.isEnabled = false;
  168.         }
  169.     }
  170.  
  171.     public void toggleModule() {
  172.         this.setState(!this.getState());
  173.     }
  174.  
  175.     public void onToggle() {
  176.     }
  177.  
  178.     public void onEnable() {
  179.     }
  180.  
  181.     public void onDisable() {
  182.     }
  183.  
  184.     public void onUpdate() {
  185.     }
  186.  
  187.     public void onRender() {
  188.     }
  189.  
  190.     public final boolean isCategory(Category s) {
  191.         if (s == category)
  192.             return true;
  193.         return false;
  194.     }
  195.  
  196. }
  197.  
  198.  
  199.  
  200.  
  201.  
  202. GuiIngameHook.java:
  203.  
  204.  
  205. package me.plankins.cake.ui;
  206.  
  207. import me.plankins.cake.Cake;
  208. import me.plankins.cake.module.Module;
  209. import me.plankins.cake.utils.Wrapper;
  210. import net.minecraft.client.Minecraft;
  211. import net.minecraft.client.gui.GuiIngame;
  212.  
  213. public class GuiIngameHook extends GuiIngame {
  214.  
  215.    
  216.  
  217.     public GuiIngameHook(Minecraft mcIn) {
  218.         super(mcIn);
  219.     }
  220.    
  221.    
  222.    
  223.     public void func_175180_a(float p_175180_1_){
  224.         super.func_175180_a(p_175180_1_);
  225.        
  226.         Wrapper.fr.drawString(Cake.Client_Name + " " + Cake.Client_Version, 1, 1, 0xffffffff);
  227.         renderArrayList();
  228.     }
  229.        
  230.        
  231.     private void renderArrayList() {
  232.         int yCount = 13;
  233.         for(Module m : Cake.theClient.moduleManager.activeModules){
  234.             m.onRender();
  235.            
  236.            
  237.                 Wrapper.fr.drawString(m.getName() + " " + "[" +  m.getState() + "]", 3, yCount, 0x58FAF4);
  238.                
  239.                 yCount += 13;
  240.            
  241.         }
  242.        
  243.        
  244.        
  245.        
  246.        
  247.     }
  248.    
  249. }
  250.  
  251.  
  252. Dann hab ich auch noch die Module. Also z.b. Sprint, FastPlace usw.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement