-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Fixed binds - Fixed toggles - Fixed more stuff - Added speed
- Loading branch information
Showing
17 changed files
with
212 additions
and
179 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...n/agalarhack/commands/CommandManager.java → ...n/agalarhack/managers/CommandManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,107 +1,99 @@ | ||
package me.mrhakan.agalarhack.module; | ||
|
||
import net.minecraft.client.Minecraft; | ||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; | ||
import net.minecraftforge.fml.common.gameevent.TickEvent; | ||
import org.lwjgl.input.Keyboard; | ||
|
||
import me.mrhakan.agalarhack.Main; | ||
import me.mrhakan.agalarhack.managers.Settings; | ||
import net.minecraftforge.common.MinecraftForge; | ||
|
||
public class Module { | ||
|
||
public String name, description; | ||
private int key; | ||
protected Minecraft mc = Minecraft.getMinecraft(); | ||
|
||
private String name, displayName; | ||
private Category category; | ||
public boolean toggled; | ||
private boolean toggled; | ||
public Settings settings = new Settings(); | ||
|
||
public Module(String name, String description, Category category) { | ||
super(); | ||
this.name = name; | ||
this.description = description; | ||
this.category = category; | ||
this.key = 0; | ||
this.toggled = false; | ||
} | ||
|
||
|
||
|
||
public Module(String name , Category category){ | ||
this.name = name; | ||
this.category = category; | ||
toggled = false; | ||
|
||
} | ||
public void registerSettings() { | ||
settings.addSetting("enabled", false); | ||
settings.addSetting("keybind", String.valueOf(Keyboard.KEY_NONE)); | ||
selfSettings(); | ||
Main.SETTINGS_MANAGER.updateSettings(); | ||
|
||
} | ||
|
||
public String getDescription() { | ||
return description; | ||
} | ||
|
||
public void setDescription(String description) { | ||
this.description = description; | ||
} | ||
|
||
public void setSettings(Settings newSettings) { | ||
settings = newSettings; | ||
} | ||
|
||
public int getKey() { | ||
return key; | ||
} | ||
|
||
public void setKey(int key) { | ||
this.key = key; | ||
} | ||
|
||
public boolean isToggled() { | ||
return toggled; | ||
settings.addSetting("enabled", false); | ||
settings.addSetting("keybind", String.valueOf(Keyboard.KEY_NONE)); | ||
selfSettings(); | ||
Main.SETTINGS_MANAGER.updateSettings(); | ||
|
||
} | ||
|
||
public void setToggled(boolean toggled) { | ||
this.toggled = toggled; | ||
|
||
if(this.toggled) { | ||
this.onEnable(); | ||
}else { | ||
this.onDisable(); | ||
} | ||
public void onEnable() { | ||
MinecraftForge.EVENT_BUS.register(this); | ||
} | ||
|
||
public void onDisable() { | ||
MinecraftForge.EVENT_BUS.unregister(this); | ||
} | ||
@SubscribeEvent | ||
public void gameTickEvent(TickEvent event) { | ||
|
||
if(this.isToggled()) onUpdate(); | ||
|
||
onUpdate(); | ||
} | ||
|
||
public void setSettings(Settings newSettings) { | ||
settings = newSettings; | ||
} | ||
public void onUpdate() { | ||
} | ||
|
||
public void selfSettings() { | ||
|
||
} | ||
|
||
public void onToggle() { | ||
|
||
} | ||
|
||
|
||
public void onToggle() {} | ||
public void toggle() { | ||
toggled = !toggled; | ||
onToggle(); | ||
if (toggled) { | ||
onEnable(); | ||
settings.setSetting("enabled", true); | ||
Main.SETTINGS_MANAGER.updateSettings(); | ||
onToggle(); | ||
if (toggled) { | ||
onEnable(); | ||
settings.setSetting("enabled", true); | ||
Main.SETTINGS_MANAGER.updateSettings(); | ||
|
||
} else { | ||
onDisable(); | ||
settings.setSetting("enabled", false); | ||
Main.SETTINGS_MANAGER.updateSettings(); | ||
} else { | ||
onDisable(); | ||
settings.setSetting("enabled", false); | ||
Main.SETTINGS_MANAGER.updateSettings(); | ||
|
||
} | ||
} | ||
} | ||
|
||
public void onEnable() { | ||
MinecraftForge.EVENT_BUS.register(this); | ||
public Integer getKey(){ | ||
return Integer.parseInt(settings.getSetting("keybind").toString()); | ||
} | ||
|
||
public void onDisable() { | ||
MinecraftForge.EVENT_BUS.unregister(this); | ||
} | ||
|
||
public String getName() { | ||
return this.name; | ||
return name; | ||
} | ||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
public Category getCategory() { | ||
return this.category; | ||
return category; | ||
} | ||
public void setCategory(Category category) { | ||
this.category = category; | ||
} | ||
public boolean isToggled() { | ||
return toggled; | ||
} | ||
public String getDisplayName() { | ||
return displayName == null ? name : displayName; | ||
} | ||
public void setDisplayName(String displayName) { | ||
this.displayName = displayName; | ||
} | ||
} | ||
public void setup() {} | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/me/mrhakan/agalarhack/module/combat/Aura.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package me.mrhakan.agalarhack.module.combat; | ||
|
||
import me.mrhakan.agalarhack.module.Category; | ||
import me.mrhakan.agalarhack.module.Module; | ||
|
||
public class Aura extends Module { | ||
|
||
public Aura() { | ||
super("Aura", Category.COMBAT); | ||
} | ||
|
||
|
||
|
||
} |
12 changes: 0 additions & 12 deletions
12
src/main/java/me/mrhakan/agalarhack/module/combat/AutoCrystal.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.