forked from RepoMirrors/kami-blue
optimize static imports module manager
This commit is contained in:
parent
a0ac2e9ea7
commit
82574ecaf7
|
@ -6,6 +6,7 @@ import club.minnced.discord.rpc.DiscordRichPresence;
|
|||
import me.zeroeightsix.kami.module.modules.misc.DiscordSettings;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.APP_ID;
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* @author S-B99
|
||||
|
@ -41,7 +42,7 @@ public class DiscordPresence {
|
|||
while (!Thread.currentThread().isInterrupted()) {
|
||||
try {
|
||||
DiscordPresence.rpc.Discord_RunCallbacks();
|
||||
discordSettings = ((DiscordSettings) KamiMod.MODULE_MANAGER.getModule(DiscordSettings.class));
|
||||
discordSettings = ((DiscordSettings) MODULE_MANAGER.getModule(DiscordSettings.class));
|
||||
String separator = " | ";
|
||||
details = discordSettings.getLine(discordSettings.line1Setting.getValue()) + separator + discordSettings.getLine(discordSettings.line3Setting.getValue());
|
||||
state = discordSettings.getLine(discordSettings.line2Setting.getValue()) + separator + discordSettings.getLine(discordSettings.line4Setting.getValue());
|
||||
|
@ -55,7 +56,7 @@ public class DiscordPresence {
|
|||
}
|
||||
}
|
||||
private static void setRpcFromSettings() {
|
||||
discordSettings = ((DiscordSettings) KamiMod.MODULE_MANAGER.getModule(DiscordSettings.class));
|
||||
discordSettings = ((DiscordSettings) MODULE_MANAGER.getModule(DiscordSettings.class));
|
||||
details = discordSettings.getLine(discordSettings.line1Setting.getValue()) + " " + discordSettings.getLine(discordSettings.line3Setting.getValue());
|
||||
state = discordSettings.getLine(discordSettings.line2Setting.getValue()) + " " + discordSettings.getLine(discordSettings.line4Setting.getValue());
|
||||
DiscordPresence.presence.details = details;
|
||||
|
|
|
@ -184,7 +184,7 @@ public class KamiMod {
|
|||
log.info("Settings loaded");
|
||||
|
||||
// custom names aren't known at compile-time
|
||||
//KamiMod.MODULE_MANAGER.updateLookup(); // generate the lookup table after settings are loaded to make custom module names work
|
||||
//MODULE_MANAGER.updateLookup(); // generate the lookup table after settings are loaded to make custom module names work
|
||||
|
||||
new RichPresence();
|
||||
log.info("Rich Presence Users init!\n");
|
||||
|
@ -278,7 +278,7 @@ public class KamiMod {
|
|||
if (!Files.exists(outputFile))
|
||||
Files.createFile(outputFile);
|
||||
Configuration.saveConfiguration(outputFile);
|
||||
KamiMod.MODULE_MANAGER.getModules().forEach(Module::destroy);
|
||||
MODULE_MANAGER.getModules().forEach(Module::destroy);
|
||||
}
|
||||
|
||||
public static boolean isFilenameValid(String file) {
|
||||
|
|
|
@ -16,6 +16,8 @@ import java.util.List;
|
|||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
public abstract class Command {
|
||||
|
||||
protected String label;
|
||||
|
@ -58,8 +60,8 @@ public abstract class Command {
|
|||
}
|
||||
|
||||
public static void sendDisableMessage(Class clazz) {
|
||||
sendErrorMessage("Error: The " + KamiMod.MODULE_MANAGER.getModule(clazz).getName() + " module is only for configuring the GUI element. In order to show the GUI element you need to hit the pin in the upper left of the GUI element");
|
||||
KamiMod.MODULE_MANAGER.getModule(clazz).enable();
|
||||
sendErrorMessage("Error: The " + MODULE_MANAGER.getModule(clazz).getName() + " module is only for configuring the GUI element. In order to show the GUI element you need to hit the pin in the upper left of the GUI element");
|
||||
MODULE_MANAGER.getModule(clazz).enable();
|
||||
}
|
||||
|
||||
public static void sendRawChatMessage(String message) {
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package me.zeroeightsix.kami.command.commands;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.command.syntax.ChunkBuilder;
|
||||
import me.zeroeightsix.kami.module.modules.chat.AutoReply;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* @author S-B99
|
||||
* Created by S-B99 on 17/02/20
|
||||
|
@ -17,7 +18,7 @@ public class AutoReplyCommand extends Command {
|
|||
|
||||
@Override
|
||||
public void call(String[] args) {
|
||||
AutoReply autoReply = (AutoReply) KamiMod.MODULE_MANAGER.getModule(AutoReply.class);
|
||||
AutoReply autoReply = (AutoReply) MODULE_MANAGER.getModule(AutoReply.class);
|
||||
if (autoReply == null) {
|
||||
Command.sendErrorMessage("&cThe AutoReply module is not available for some reason. Make sure the name you're calling is correct and that you have the module installed!!");
|
||||
return;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.command.commands;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.command.syntax.ChunkBuilder;
|
||||
import me.zeroeightsix.kami.command.syntax.parsers.ModuleParser;
|
||||
|
@ -11,6 +10,8 @@ import me.zeroeightsix.kami.setting.Settings;
|
|||
import me.zeroeightsix.kami.setting.builder.SettingBuilder;
|
||||
import me.zeroeightsix.kami.util.Wrapper;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 12/11/2017.
|
||||
*/
|
||||
|
@ -56,7 +57,7 @@ public class BindCommand extends Command {
|
|||
}
|
||||
|
||||
try {
|
||||
Module m = KamiMod.MODULE_MANAGER.getModule(module);
|
||||
Module m = MODULE_MANAGER.getModule(module);
|
||||
if (rkey == null) {
|
||||
sendChatMessage(m.getName() + " is bound to &b" + m.getBindName());
|
||||
return;
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package me.zeroeightsix.kami.command.commands;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.command.syntax.ChunkBuilder;
|
||||
import me.zeroeightsix.kami.module.modules.chat.CustomChat;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* @author S-B99
|
||||
* Created by S-B99 on 17/02/20
|
||||
|
@ -17,7 +18,7 @@ public class CustomChatCommand extends Command {
|
|||
|
||||
@Override
|
||||
public void call(String[] args) {
|
||||
CustomChat cC = (CustomChat) KamiMod.MODULE_MANAGER.getModule(CustomChat.class);
|
||||
CustomChat cC = (CustomChat) MODULE_MANAGER.getModule(CustomChat.class);
|
||||
if (cC == null) {
|
||||
Command.sendErrorMessage("&cThe CustomChat module is not available for some reason. Make sure the name you're calling is correct and that you have the module installed!!");
|
||||
return;
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package me.zeroeightsix.kami.command.commands;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.command.syntax.ChunkBuilder;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* @author S-B99
|
||||
* Created by S-B99 on 17/02/20
|
||||
|
@ -20,7 +21,7 @@ public class DescriptionCommand extends Command {
|
|||
for (String s : args) {
|
||||
if (s == null)
|
||||
continue;
|
||||
Module module = KamiMod.MODULE_MANAGER.getModule(s);
|
||||
Module module = MODULE_MANAGER.getModule(s);
|
||||
Command.sendChatMessage(module.getChatName() + "Description: &7" + module.getDescription());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,8 @@ import me.zeroeightsix.kami.command.Command;
|
|||
import me.zeroeightsix.kami.command.syntax.ChunkBuilder;
|
||||
import me.zeroeightsix.kami.module.modules.chat.DiscordNotifs;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* @author S-B99
|
||||
* Created by S-B99 on 26/03/20
|
||||
|
@ -16,7 +18,7 @@ public class DiscordNotifsCommand extends Command {
|
|||
|
||||
@Override
|
||||
public void call(String[] args) {
|
||||
DiscordNotifs df = (DiscordNotifs) KamiMod.MODULE_MANAGER.getModule(DiscordNotifs.class);
|
||||
DiscordNotifs df = (DiscordNotifs) MODULE_MANAGER.getModule(DiscordNotifs.class);
|
||||
if (args[0] != null && !args[0].equals("")) {
|
||||
df.url.setValue(args[0]);
|
||||
Command.sendChatMessage(df.getChatName() + "Set URL to \"" + args[0] + "\"!");
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.command.commands;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.command.syntax.ChunkBuilder;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
|
@ -12,6 +11,8 @@ import java.util.List;
|
|||
import java.util.concurrent.atomic.AtomicReference;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* @author S-B99
|
||||
* Updated by S-B99 on 07/02/20
|
||||
|
@ -25,7 +26,7 @@ public class EnabledCommand extends Command {
|
|||
@Override
|
||||
public void call(String[] args) {
|
||||
AtomicReference<String> enabled = new AtomicReference<>("");
|
||||
List<Module> mods = new ArrayList<>(KamiMod.MODULE_MANAGER.getModules());
|
||||
List<Module> mods = new ArrayList<>(MODULE_MANAGER.getModules());
|
||||
|
||||
String f = "";
|
||||
if (args[0] != null) f = "(filter: " + args[0] + ")";
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
package me.zeroeightsix.kami.command.commands;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.command.syntax.ChunkBuilder;
|
||||
import me.zeroeightsix.kami.module.modules.hidden.FixGui;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* @author S-B99
|
||||
*/
|
||||
|
@ -16,7 +17,7 @@ public class FixGuiCommand extends Command {
|
|||
|
||||
@Override
|
||||
public void call(String[] args) {
|
||||
FixGui fixGui = (FixGui) KamiMod.MODULE_MANAGER.getModule(FixGui.class);
|
||||
FixGui fixGui = (FixGui) MODULE_MANAGER.getModule(FixGui.class);
|
||||
if (fixGui.isEnabled()) {
|
||||
fixGui.disable();
|
||||
Command.sendChatMessage("[" + getLabel() + "] Disabled");
|
||||
|
|
|
@ -7,6 +7,8 @@ import me.zeroeightsix.kami.module.Module;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* @author S-B99
|
||||
* Updated by S-B99 on 18/03/20
|
||||
|
@ -23,7 +25,7 @@ public class GenerateWebsiteCommand extends Command {
|
|||
|
||||
@Override
|
||||
public void call(String[] args) {
|
||||
List<Module> mods = new ArrayList<>(KamiMod.MODULE_MANAGER.getModules());
|
||||
List<Module> mods = new ArrayList<>(MODULE_MANAGER.getModules());
|
||||
String[] modCategories = new String[]{"Chat", "Combat", "Client", "Misc", "Movement", "Player", "Render", "Utils"};
|
||||
List<String> modCategoriesList = new ArrayList<>(java.util.Arrays.asList(modCategories));
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import me.zeroeightsix.kami.module.modules.ClickGUI;
|
|||
|
||||
import java.util.Arrays;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
import static me.zeroeightsix.kami.KamiMod.WEBSITE_LINK;
|
||||
|
||||
/**
|
||||
|
@ -46,7 +47,7 @@ public class HelpCommand extends Command {
|
|||
if (args[0] == null) {
|
||||
Command.sendStringChatMessage(new String[]{
|
||||
"KAMI Blue " + KamiMod.MODVER,
|
||||
"&7Press &r" + KamiMod.MODULE_MANAGER.getModule(ClickGUI.class).getBindName() + "&7 to open GUI",
|
||||
"&7Press &r" + MODULE_MANAGER.getModule(ClickGUI.class).getBindName() + "&7 to open GUI",
|
||||
"&7see &b" + WEBSITE_LINK + "&7 for a full version of the faq",
|
||||
commandPrefix + "description&7 to see the description of a module",
|
||||
commandPrefix + "commands&7 to view all available commands",
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package me.zeroeightsix.kami.command.commands;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.command.syntax.ChunkBuilder;
|
||||
import me.zeroeightsix.kami.command.syntax.parsers.ModuleParser;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.module.ModuleManager;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
public class RenameModuleCommand extends Command {
|
||||
|
||||
public RenameModuleCommand() {
|
||||
|
@ -22,7 +23,7 @@ public class RenameModuleCommand extends Command {
|
|||
}
|
||||
|
||||
try {
|
||||
Module module = KamiMod.MODULE_MANAGER.getModule(args[0]);
|
||||
Module module = MODULE_MANAGER.getModule(args[0]);
|
||||
String name = args.length == 1 ? module.getOriginalName() : args[1];
|
||||
|
||||
if (!(name.matches("[a-zA-Z]+"))) {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.command.commands;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.command.syntax.ChunkBuilder;
|
||||
import me.zeroeightsix.kami.command.syntax.parsers.ModuleParser;
|
||||
|
@ -11,6 +10,8 @@ import me.zeroeightsix.kami.setting.Setting;
|
|||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 18/11/2017.
|
||||
* Updated by S-B99 on 24/02/20
|
||||
|
@ -33,7 +34,7 @@ public class SetCommand extends Command {
|
|||
return;
|
||||
}
|
||||
|
||||
Module m = KamiMod.MODULE_MANAGER.getModule(args[0]);
|
||||
Module m = MODULE_MANAGER.getModule(args[0]);
|
||||
if (m == null) {
|
||||
Command.sendChatMessage("Unknown module &b" + args[0] + "&r!");
|
||||
return;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.command.commands;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.command.syntax.ChunkBuilder;
|
||||
import me.zeroeightsix.kami.command.syntax.parsers.ModuleParser;
|
||||
|
@ -11,6 +10,8 @@ import me.zeroeightsix.kami.setting.impl.EnumSetting;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 11/12/2017.
|
||||
*/
|
||||
|
@ -30,7 +31,7 @@ public class SettingsCommand extends Command {
|
|||
}
|
||||
|
||||
try {
|
||||
Module m = KamiMod.MODULE_MANAGER.getModule(args[0]);
|
||||
Module m = MODULE_MANAGER.getModule(args[0]);
|
||||
List<Setting> settings = m.settingList;
|
||||
String[] result = new String[settings.size()];
|
||||
for (int i = 0; i < settings.size(); i++) {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.command.commands;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.command.syntax.ChunkBuilder;
|
||||
import me.zeroeightsix.kami.command.syntax.parsers.ModuleParser;
|
||||
|
@ -10,6 +9,8 @@ import net.minecraft.util.math.Vec3d;
|
|||
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Robeart is cool and made potentia
|
||||
* Updated by d1gress/Qther on 8/12/2019.
|
||||
|
@ -34,7 +35,7 @@ public class TeleportCommand extends Command {
|
|||
public void call(String[] args) {
|
||||
if (args[0].equalsIgnoreCase("stop")) {
|
||||
Command.sendChatMessage("Teleport Cancelled!");
|
||||
KamiMod.MODULE_MANAGER.getModule(Teleport.class).disable();
|
||||
MODULE_MANAGER.getModule(Teleport.class).disable();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -50,7 +51,7 @@ public class TeleportCommand extends Command {
|
|||
final double y = args[1].equals("~") ? mc.player.posY : args[1].charAt(0) == '~' ? Double.parseDouble(args[1].substring(1)) + mc.player.posY : Double.parseDouble(args[1]);
|
||||
final double z = args[2].equals("~") ? mc.player.posZ : args[2].charAt(0) == '~' ? Double.parseDouble(args[2].substring(1)) + mc.player.posZ : Double.parseDouble(args[2]);
|
||||
Teleport.finalPos = new Vec3d(x, y, z);
|
||||
KamiMod.MODULE_MANAGER.getModule(Teleport.class).enable();
|
||||
MODULE_MANAGER.getModule(Teleport.class).enable();
|
||||
Command.sendChatMessage("\n&aTeleporting to \n&cX: &b" + df.format(x) + "&a, \n&cY: &b" + df.format(y) + "&a, \n&cZ: &b" + df.format(z) + "\n&aat &b" + df.format(Teleport.blocksPerTeleport) + "&c blocks per teleport.");
|
||||
} catch (NullPointerException e) {
|
||||
Command.sendErrorMessage("Null Pointer Exception Caught!");
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package me.zeroeightsix.kami.command.commands;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.command.syntax.ChunkBuilder;
|
||||
import me.zeroeightsix.kami.command.syntax.parsers.ModuleParser;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.module.ModuleManager;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 17/11/2017.
|
||||
*/
|
||||
|
@ -26,7 +27,7 @@ public class ToggleCommand extends Command {
|
|||
return;
|
||||
}
|
||||
try {
|
||||
Module m = KamiMod.MODULE_MANAGER.getModule(args[0]);
|
||||
Module m = MODULE_MANAGER.getModule(args[0]);
|
||||
m.toggle();
|
||||
Command.sendChatMessage(m.getName() + (m.isEnabled() ? " &aenabled" : " &cdisabled"));
|
||||
} catch (ModuleManager.ModuleNotFoundException x) {
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
package me.zeroeightsix.kami.command.commands;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.command.syntax.ChunkBuilder;
|
||||
import me.zeroeightsix.kami.module.modules.render.XRay;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 20kdc on 17/02/2020.
|
||||
* Updated by S-B99 on 17/02/20
|
||||
|
@ -19,7 +20,7 @@ public class XRayCommand extends Command {
|
|||
|
||||
@Override
|
||||
public void call(String[] args) {
|
||||
XRay xr = (XRay) KamiMod.MODULE_MANAGER.getModule(XRay.class);
|
||||
XRay xr = (XRay) MODULE_MANAGER.getModule(XRay.class);
|
||||
if (xr == null) {
|
||||
Command.sendErrorMessage("&cThe module is not available for some reason. Make sure the name you're calling is correct and that you have the module installed!!");
|
||||
return;
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package me.zeroeightsix.kami.command.syntax.parsers;
|
||||
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.syntax.SyntaxChunk;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
public class ModuleParser extends AbstractParser {
|
||||
|
||||
@Override
|
||||
|
@ -12,7 +12,7 @@ public class ModuleParser extends AbstractParser {
|
|||
if (chunkValue == null)
|
||||
return getDefaultChunk(thisChunk);
|
||||
|
||||
Module chosen = KamiMod.MODULE_MANAGER.getModules().stream()
|
||||
Module chosen = MODULE_MANAGER.getModules().stream()
|
||||
.filter(module -> module.getName().toLowerCase().startsWith(chunkValue.toLowerCase()))
|
||||
.findFirst()
|
||||
.orElse(null);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.command.syntax.parsers;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.syntax.SyntaxChunk;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.module.ModuleManager;
|
||||
|
@ -9,6 +8,8 @@ import me.zeroeightsix.kami.setting.Setting;
|
|||
import java.util.HashMap;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
public class ValueParser extends AbstractParser {
|
||||
|
||||
private int moduleIndex;
|
||||
|
@ -21,7 +22,7 @@ public class ValueParser extends AbstractParser {
|
|||
if (moduleIndex > values.length - 1 || chunkValue == null) return getDefaultChunk(thisChunk);
|
||||
String module = values[moduleIndex];
|
||||
try {
|
||||
Module m = KamiMod.MODULE_MANAGER.getModule(module);
|
||||
Module m = MODULE_MANAGER.getModule(module);
|
||||
HashMap<String, Setting<?>> possibilities = new HashMap<>();
|
||||
|
||||
for (Setting<?> v : m.settingList) {
|
||||
|
|
|
@ -31,6 +31,8 @@ import net.minecraftforge.fml.common.gameevent.TickEvent;
|
|||
import org.lwjgl.input.Keyboard;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 11/11/2017.
|
||||
* Updated by Qther on 18/02/20
|
||||
|
@ -70,19 +72,19 @@ public class ForgeEventProcessor {
|
|||
@SubscribeEvent
|
||||
public void onTick(TickEvent.ClientTickEvent event) {
|
||||
if (Wrapper.getPlayer() == null) return;
|
||||
KamiMod.MODULE_MANAGER.onUpdate();
|
||||
MODULE_MANAGER.onUpdate();
|
||||
KamiMod.getInstance().getGuiManager().callTick(KamiMod.getInstance().getGuiManager());
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onWorldRender(RenderWorldLastEvent event) {
|
||||
if (event.isCanceled()) return;
|
||||
KamiMod.MODULE_MANAGER.onWorldRender(event);
|
||||
MODULE_MANAGER.onWorldRender(event);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onRenderPre(RenderGameOverlayEvent.Pre event) {
|
||||
if (event.getType() == RenderGameOverlayEvent.ElementType.BOSSINFO && KamiMod.MODULE_MANAGER.isModuleEnabled(BossStack.class)) {
|
||||
if (event.getType() == RenderGameOverlayEvent.ElementType.BOSSINFO && MODULE_MANAGER.isModuleEnabled(BossStack.class)) {
|
||||
event.setCanceled(true);
|
||||
}
|
||||
}
|
||||
|
@ -96,12 +98,12 @@ public class ForgeEventProcessor {
|
|||
target = RenderGameOverlayEvent.ElementType.HEALTHMOUNT;
|
||||
|
||||
if (event.getType() == target) {
|
||||
KamiMod.MODULE_MANAGER.onRender();
|
||||
MODULE_MANAGER.onRender();
|
||||
GL11.glPushMatrix();
|
||||
UIRenderer.renderAndUpdateFrames();
|
||||
GL11.glPopMatrix();
|
||||
KamiTessellator.releaseGL();
|
||||
} else if (event.getType() == RenderGameOverlayEvent.ElementType.BOSSINFO && KamiMod.MODULE_MANAGER.isModuleEnabled(BossStack.class)) {
|
||||
} else if (event.getType() == RenderGameOverlayEvent.ElementType.BOSSINFO && MODULE_MANAGER.isModuleEnabled(BossStack.class)) {
|
||||
BossStack.render(event);
|
||||
}
|
||||
}
|
||||
|
@ -109,14 +111,14 @@ public class ForgeEventProcessor {
|
|||
@SubscribeEvent(priority = EventPriority.NORMAL, receiveCanceled = true)
|
||||
public void onKeyInput(InputEvent.KeyInputEvent event) {
|
||||
if (!Keyboard.getEventKeyState()) return;
|
||||
CommandConfig commandConfig = (CommandConfig) KamiMod.MODULE_MANAGER.getModule(CommandConfig.class);
|
||||
CommandConfig commandConfig = (CommandConfig) MODULE_MANAGER.getModule(CommandConfig.class);
|
||||
if ( commandConfig.isEnabled()
|
||||
&& (commandConfig.prefixChat.getValue())
|
||||
&& ("" + Keyboard.getEventCharacter()).equalsIgnoreCase(Command.getCommandPrefix())
|
||||
&& !(Minecraft.getMinecraft().player.isSneaking())) {
|
||||
Minecraft.getMinecraft().displayGuiScreen(new GuiChat(Command.getCommandPrefix()));
|
||||
} else {
|
||||
KamiMod.MODULE_MANAGER.onBind(Keyboard.getEventKey());
|
||||
MODULE_MANAGER.onBind(Keyboard.getEventKey());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@ import org.lwjgl.input.Mouse;
|
|||
|
||||
import java.io.IOException;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
import static org.lwjgl.opengl.GL11.GL_TEXTURE_2D;
|
||||
import static org.lwjgl.opengl.GL11.glEnable;
|
||||
|
||||
|
@ -95,7 +96,7 @@ public class DisplayGuiScreen extends GuiScreen {
|
|||
|
||||
@Override
|
||||
protected void keyTyped(char typedChar, int keyCode) throws IOException {
|
||||
if (KamiMod.MODULE_MANAGER.getModule(ClickGUI.class).getBind().isDown(keyCode) || keyCode == Keyboard.KEY_ESCAPE) {
|
||||
if (MODULE_MANAGER.getModule(ClickGUI.class).getBind().isDown(keyCode) || keyCode == Keyboard.KEY_ESCAPE) {
|
||||
mc.displayGuiScreen(lastScreen);
|
||||
} else {
|
||||
gui.handleKeyDown(keyCode);
|
||||
|
|
|
@ -39,6 +39,7 @@ import java.text.DecimalFormat;
|
|||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
import static me.zeroeightsix.kami.util.InfoCalculator.cardinalToAxis;
|
||||
|
||||
/**
|
||||
|
@ -66,7 +67,7 @@ public class KamiGUI extends GUI {
|
|||
@Override
|
||||
public void initializeGUI() {
|
||||
HashMap<Module.Category, Pair<Scrollpane, SettingsPanel>> categoryScrollpaneHashMap = new HashMap<>();
|
||||
for (Module module : KamiMod.MODULE_MANAGER.getModules()) {
|
||||
for (Module module : MODULE_MANAGER.getModules()) {
|
||||
if (module.getCategory().isHidden()) continue;
|
||||
Module.Category moduleCategory = module.getCategory();
|
||||
if (!categoryScrollpaneHashMap.containsKey(moduleCategory)) {
|
||||
|
@ -236,7 +237,7 @@ public class KamiGUI extends GUI {
|
|||
Label information = new Label("");
|
||||
information.setShadow(true);
|
||||
information.addTickListener(() -> {
|
||||
InfoOverlay info = ((InfoOverlay) KamiMod.MODULE_MANAGER.getModule(InfoOverlay.class));;
|
||||
InfoOverlay info = ((InfoOverlay) MODULE_MANAGER.getModule(InfoOverlay.class));;
|
||||
information.setText("");
|
||||
info.infoContents().forEach(information::addLine);
|
||||
});
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.gui.kami.component;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.gui.rgui.component.AbstractComponent;
|
||||
import me.zeroeightsix.kami.gui.rgui.component.Component;
|
||||
import me.zeroeightsix.kami.gui.rgui.component.container.use.Frame;
|
||||
|
@ -13,6 +12,8 @@ import org.lwjgl.input.Keyboard;
|
|||
|
||||
import java.util.*;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 11/08/2017.
|
||||
*/
|
||||
|
@ -32,7 +33,7 @@ public class TabGUI extends AbstractComponent implements EventListener {
|
|||
for (Module.Category category : Module.Category.values())
|
||||
tabMap.put(category, new Tab(category.getName()));
|
||||
|
||||
ArrayList<Module> features = new ArrayList<>(KamiMod.MODULE_MANAGER.getModules());
|
||||
ArrayList<Module> features = new ArrayList<>(MODULE_MANAGER.getModules());
|
||||
|
||||
for (Module feature : features)
|
||||
if (feature.getCategory() != null && !feature.getCategory().isHidden())
|
||||
|
|
|
@ -14,6 +14,7 @@ import java.util.List;
|
|||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
import static me.zeroeightsix.kami.util.ColourConverter.toF;
|
||||
import static org.lwjgl.opengl.GL11.GL_BLEND;
|
||||
import static org.lwjgl.opengl.GL11.glDisable;
|
||||
|
@ -31,14 +32,14 @@ public class KamiActiveModulesUI extends AbstractComponentUI<me.zeroeightsix.kam
|
|||
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
||||
|
||||
FontRenderer renderer = Wrapper.getFontRenderer();
|
||||
List<Module> mods = KamiMod.MODULE_MANAGER.getModules().stream()
|
||||
List<Module> mods = MODULE_MANAGER.getModules().stream()
|
||||
.filter(Module::isEnabled)
|
||||
.filter(Module::isOnArray)
|
||||
.sorted(Comparator.comparing(module -> renderer.getStringWidth(module.getName() + (module.getHudInfo() == null ? "" : module.getHudInfo() + " ")) * (component.sort_up ? -1 : 1)))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
final int[] y = {2};
|
||||
activeMods = (ActiveModules) KamiMod.MODULE_MANAGER.getModule(ActiveModules.class);
|
||||
activeMods = (ActiveModules) MODULE_MANAGER.getModule(ActiveModules.class);
|
||||
|
||||
if (component.getParent().getY() < 26 && Wrapper.getPlayer().getActivePotionEffects().size() > 0 && component.getParent().getOpacity() == 0)
|
||||
y[0] = Math.max(component.getParent().getY(), 26 - component.getParent().getY());
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.gui.kami.theme.kami;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.gui.kami.RenderHelper;
|
||||
import me.zeroeightsix.kami.gui.kami.component.SettingsPanel;
|
||||
import me.zeroeightsix.kami.gui.rgui.render.AbstractComponentUI;
|
||||
|
@ -8,6 +7,8 @@ import me.zeroeightsix.kami.gui.rgui.render.font.FontRenderer;
|
|||
import me.zeroeightsix.kami.module.modules.experimental.GUIColour;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 16/12/2017.
|
||||
*/
|
||||
|
@ -18,11 +19,11 @@ public class KamiSettingsPanelUI extends AbstractComponentUI<SettingsPanel> {
|
|||
super.renderComponent(component, fontRenderer);
|
||||
|
||||
GL11.glLineWidth(2.0F);
|
||||
float red = (float) (Integer) ((GUIColour) KamiMod.MODULE_MANAGER.getModule(GUIColour.class)).red.getValue() / 255.0F;
|
||||
float green = (float) (Integer) ((GUIColour) KamiMod.MODULE_MANAGER.getModule(GUIColour.class)).green.getValue() / 255.0F;
|
||||
float blue = (float) (Integer) ((GUIColour) KamiMod.MODULE_MANAGER.getModule(GUIColour.class)).blue.getValue() / 255.0F;
|
||||
float alpha = (float) (Integer) ((GUIColour) KamiMod.MODULE_MANAGER.getModule(GUIColour.class)).alpha.getValue() / 255.0F;
|
||||
if (KamiMod.MODULE_MANAGER.getModule(GUIColour.class).isEnabled()) {
|
||||
float red = (float) ((GUIColour) MODULE_MANAGER.getModule(GUIColour.class)).red.getValue() / 255.0F;
|
||||
float green = (float) ((GUIColour) MODULE_MANAGER.getModule(GUIColour.class)).green.getValue() / 255.0F;
|
||||
float blue = (float) ((GUIColour) MODULE_MANAGER.getModule(GUIColour.class)).blue.getValue() / 255.0F;
|
||||
float alpha = (float) ((GUIColour) MODULE_MANAGER.getModule(GUIColour.class)).alpha.getValue() / 255.0F;
|
||||
if (MODULE_MANAGER.getModule(GUIColour.class).isEnabled()) {
|
||||
GL11.glColor4f(red, green, blue, alpha);
|
||||
} else {
|
||||
GL11.glColor4f(0.17F, 0.17F, 0.18F, 0.9F);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.mixin.client;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.module.modules.movement.Velocity;
|
||||
import me.zeroeightsix.kami.module.modules.player.LiquidInteract;
|
||||
import net.minecraft.block.BlockLiquid;
|
||||
|
@ -15,6 +14,8 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 16/12/2017.
|
||||
* Updated by S-B99 on 17/03/20
|
||||
|
@ -24,7 +25,7 @@ public class MixinBlockLiquid {
|
|||
|
||||
@Inject(method = "modifyAcceleration", at = @At("HEAD"), cancellable = true)
|
||||
public void modifyAcceleration(World worldIn, BlockPos pos, Entity entityIn, Vec3d motion, CallbackInfoReturnable<Vec3d> returnable) {
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(Velocity.class)) {
|
||||
if (MODULE_MANAGER.isModuleEnabled(Velocity.class)) {
|
||||
returnable.setReturnValue(motion);
|
||||
returnable.cancel();
|
||||
}
|
||||
|
@ -32,6 +33,6 @@ public class MixinBlockLiquid {
|
|||
|
||||
@Inject(method = "canCollideCheck", at = @At("HEAD"), cancellable = true)
|
||||
public void canCollideCheck(final IBlockState blockState, final boolean b, final CallbackInfoReturnable<Boolean> callbackInfoReturnable) {
|
||||
callbackInfoReturnable.setReturnValue(KamiMod.MODULE_MANAGER.isModuleEnabled(LiquidInteract.class) || (b && (int) blockState.getValue((IProperty) BlockLiquid.LEVEL) == 0));
|
||||
callbackInfoReturnable.setReturnValue(MODULE_MANAGER.isModuleEnabled(LiquidInteract.class) || (b && (int) blockState.getValue((IProperty) BlockLiquid.LEVEL) == 0));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.mixin.client;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.module.modules.movement.NoSlowDown;
|
||||
import net.minecraft.block.BlockSoulSand;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
@ -12,6 +11,8 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 16/12/2017.
|
||||
*/
|
||||
|
@ -21,7 +22,7 @@ public class MixinBlockSoulSand {
|
|||
@Inject(method = "onEntityCollision", at = @At("HEAD"), cancellable = true)
|
||||
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn, CallbackInfo info) {
|
||||
// If noslowdown is on, just don't do anything else in this method (slow the player)
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(NoSlowDown.class) && ((NoSlowDown) KamiMod.MODULE_MANAGER.getModule(NoSlowDown.class)).soulSand.getValue()) info.cancel();
|
||||
if (MODULE_MANAGER.isModuleEnabled(NoSlowDown.class) && ((NoSlowDown) MODULE_MANAGER.getModule(NoSlowDown.class)).soulSand.getValue()) info.cancel();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.mixin.client;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.module.modules.movement.NoSlowDown;
|
||||
import net.minecraft.block.BlockWeb;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
|
@ -12,6 +11,8 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* @see MixinBlockSoulSand
|
||||
* @author 086
|
||||
|
@ -22,7 +23,7 @@ public class MixinBlockWeb {
|
|||
@Inject(method = "onEntityCollision", at = @At("HEAD"), cancellable = true)
|
||||
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn, CallbackInfo info) {
|
||||
// If noslowdown is on, just don't do anything else in this method (slow the player)
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(NoSlowDown.class) && ((NoSlowDown) KamiMod.MODULE_MANAGER.getModule(NoSlowDown.class)).cobweb.getValue()) info.cancel();
|
||||
if (MODULE_MANAGER.isModuleEnabled(NoSlowDown.class) && ((NoSlowDown) MODULE_MANAGER.getModule(NoSlowDown.class)).cobweb.getValue()) info.cancel();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.mixin.client;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.module.modules.misc.FakeVanillaClient;
|
||||
import net.minecraft.network.EnumConnectionState;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
|
@ -11,6 +10,8 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 9/04/2018.
|
||||
*/
|
||||
|
@ -28,7 +29,7 @@ public class MixinC00Handshake {
|
|||
|
||||
@Inject(method = "writePacketData", at = @At(value = "HEAD"), cancellable = true)
|
||||
public void writePacketData(PacketBuffer buf, CallbackInfo info) {
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(FakeVanillaClient.class)) {
|
||||
if (MODULE_MANAGER.isModuleEnabled(FakeVanillaClient.class)) {
|
||||
info.cancel();
|
||||
buf.writeVarInt(protocolVersion);
|
||||
buf.writeString(ip);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.mixin.client;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.module.modules.render.XRay;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
@ -10,6 +9,8 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 20kdc on 15/02/2020.
|
||||
*/
|
||||
|
@ -18,7 +19,7 @@ public class MixinChunkCache {
|
|||
|
||||
@Inject(method = "getBlockState", at = @At("RETURN"), cancellable = true)
|
||||
public void getState(BlockPos pos, CallbackInfoReturnable<IBlockState> info) {
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(XRay.class))
|
||||
if (MODULE_MANAGER.isModuleEnabled(XRay.class))
|
||||
info.setReturnValue(XRay.transform(info.getReturnValue()));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.mixin.client;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.module.modules.movement.EntitySpeed;
|
||||
import net.minecraft.entity.passive.EntityLlama;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
@ -8,6 +7,8 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 15/10/2018.
|
||||
*/
|
||||
|
@ -16,7 +17,7 @@ public class MixinEntityLlama {
|
|||
|
||||
@Inject(method = "canBeSteered", at = @At("RETURN"), cancellable = true)
|
||||
public void canBeSteered(CallbackInfoReturnable<Boolean> returnable) {
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(EntitySpeed.class)) returnable.setReturnValue(true);
|
||||
if (MODULE_MANAGER.isModuleEnabled(EntitySpeed.class)) returnable.setReturnValue(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.mixin.client;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.module.modules.movement.EntitySpeed;
|
||||
import net.minecraft.entity.passive.EntityPig;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
@ -8,6 +7,8 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 16/12/2017.
|
||||
*/
|
||||
|
@ -16,7 +17,7 @@ public class MixinEntityPig {
|
|||
|
||||
@Inject(method = "canBeSteered", at = @At("HEAD"), cancellable = true)
|
||||
public void canBeSteered(CallbackInfoReturnable<Boolean> returnable) {
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(EntitySpeed.class)) {
|
||||
if (MODULE_MANAGER.isModuleEnabled(EntitySpeed.class)) {
|
||||
returnable.setReturnValue(true);
|
||||
returnable.cancel();
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
|||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 12/12/2017.
|
||||
*/
|
||||
|
@ -33,13 +35,13 @@ public abstract class MixinEntityPlayerSP extends EntityPlayer {
|
|||
@SuppressWarnings("UnnecessaryReturnStatement")
|
||||
@Redirect(method = "onLivingUpdate", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/entity/EntityPlayerSP;closeScreen()V"))
|
||||
public void closeScreen(EntityPlayerSP entityPlayerSP) {
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(PortalChat.class)) return;
|
||||
if (MODULE_MANAGER.isModuleEnabled(PortalChat.class)) return;
|
||||
}
|
||||
|
||||
@SuppressWarnings("UnnecessaryReturnStatement")
|
||||
@Redirect(method = "onLivingUpdate", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/Minecraft;displayGuiScreen(Lnet/minecraft/client/gui/GuiScreen;)V"))
|
||||
public void closeScreen(Minecraft minecraft, GuiScreen screen) {
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(PortalChat.class)) return;
|
||||
if (MODULE_MANAGER.isModuleEnabled(PortalChat.class)) return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -47,7 +49,7 @@ public abstract class MixinEntityPlayerSP extends EntityPlayer {
|
|||
*/
|
||||
@Inject(method = "displayGUIChest", at = @At("HEAD"), cancellable = true)
|
||||
public void onDisplayGUIChest(IInventory chestInventory, CallbackInfo ci) {
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(BeaconSelector.class)) {
|
||||
if (MODULE_MANAGER.isModuleEnabled(BeaconSelector.class)) {
|
||||
if (chestInventory instanceof IInteractionObject) {
|
||||
if ("minecraft:beacon".equals(((IInteractionObject)chestInventory).getGuiID())) {
|
||||
Minecraft.getMinecraft().displayGuiScreen(new BeaconGui(this.inventory, chestInventory));
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package me.zeroeightsix.kami.mixin.client;
|
||||
|
||||
import com.google.common.base.Predicate;
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.module.modules.misc.CameraClip;
|
||||
import me.zeroeightsix.kami.module.modules.player.Freecam;
|
||||
import me.zeroeightsix.kami.module.modules.player.NoEntityTrace;
|
||||
|
@ -31,6 +30,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 11/12/2017.
|
||||
*/
|
||||
|
@ -41,7 +42,7 @@ public class MixinEntityRenderer {
|
|||
|
||||
@Redirect(method = "orientCamera", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/multiplayer/WorldClient;rayTraceBlocks(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/RayTraceResult;"))
|
||||
public RayTraceResult rayTraceBlocks(WorldClient world, Vec3d start, Vec3d end) {
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(CameraClip.class))
|
||||
if (MODULE_MANAGER.isModuleEnabled(CameraClip.class))
|
||||
return null;
|
||||
else
|
||||
return world.rayTraceBlocks(start, end);
|
||||
|
@ -87,7 +88,7 @@ public class MixinEntityRenderer {
|
|||
public boolean noclipIsSpectator(AbstractClientPlayer acp) {
|
||||
// [WebringOfTheDamned]
|
||||
// Freecam doesn't actually use spectator mode, but it can go through walls, and only spectator mode is "allowed to" go through walls as far as the renderer is concerned
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(Freecam.class))
|
||||
if (MODULE_MANAGER.isModuleEnabled(Freecam.class))
|
||||
return true;
|
||||
return acp.isSpectator();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.mixin.client;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.module.modules.player.Freecam;
|
||||
import net.minecraft.client.renderer.culling.Frustum;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
|
@ -9,6 +8,8 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 20kdc on 14/02/2020.
|
||||
*/
|
||||
|
@ -20,7 +21,7 @@ public abstract class MixinFrustum {
|
|||
// [WebringOfTheDamned]
|
||||
// This is used because honestly the Mojang frustrum bounding box thing is a mess.
|
||||
// This & MixinEntityRenderer get it working on OptiFine, but MixinVisGraph is necessary on Vanilla.
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(Freecam.class))
|
||||
if (MODULE_MANAGER.isModuleEnabled(Freecam.class))
|
||||
info.setReturnValue(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.mixin.client;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.module.modules.movement.EntitySpeed;
|
||||
import me.zeroeightsix.kami.util.Wrapper;
|
||||
import net.minecraft.client.model.ModelBoat;
|
||||
|
@ -11,6 +10,8 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 15/12/2017.
|
||||
*/
|
||||
|
@ -19,7 +20,7 @@ public class MixinModelBoat {
|
|||
|
||||
@Inject(method = "render", at = @At("HEAD"))
|
||||
public void render(Entity entityIn, float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scale, CallbackInfo info) {
|
||||
if (Wrapper.getPlayer().getRidingEntity() == entityIn && KamiMod.MODULE_MANAGER.isModuleEnabled(EntitySpeed.class)) {
|
||||
if (Wrapper.getPlayer().getRidingEntity() == entityIn && MODULE_MANAGER.isModuleEnabled(EntitySpeed.class)) {
|
||||
GlStateManager.color(1, 1, 1, EntitySpeed.getOpacity());
|
||||
GlStateManager.enableBlend();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.mixin.client;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.module.modules.render.Chams;
|
||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
|
@ -11,6 +10,8 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* @author 086
|
||||
*/
|
||||
|
@ -19,7 +20,7 @@ public class MixinRenderLiving {
|
|||
|
||||
@Inject(method = "doRender", at = @At("HEAD"))
|
||||
private void injectChamsPre(EntityLiving entity, double x, double y, double z, float entityYaw, float partialTicks, CallbackInfo info) {
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(Chams.class) && Chams.renderChams(entity)) {
|
||||
if (MODULE_MANAGER.isModuleEnabled(Chams.class) && Chams.renderChams(entity)) {
|
||||
GL11.glEnable(32823);
|
||||
GL11.glPolygonOffset(1.0f, -1000000.0f);
|
||||
}
|
||||
|
@ -27,7 +28,7 @@ public class MixinRenderLiving {
|
|||
|
||||
@Inject(method = "doRender", at = @At("RETURN"))
|
||||
private <S extends EntityLivingBase> void injectChamsPost(EntityLiving entity, double x, double y, double z, float entityYaw, float partialTicks, CallbackInfo info) {
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(Chams.class) && Chams.renderChams(entity)) {
|
||||
if (MODULE_MANAGER.isModuleEnabled(Chams.class) && Chams.renderChams(entity)) {
|
||||
GL11.glPolygonOffset(1.0f, 1000000.0f);
|
||||
GL11.glDisable(32823);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.mixin.client;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.module.modules.render.Nametags;
|
||||
import net.minecraft.client.entity.AbstractClientPlayer;
|
||||
import net.minecraft.client.renderer.entity.RenderPlayer;
|
||||
|
@ -9,6 +8,8 @@ import org.spongepowered.asm.mixin.injection.At;
|
|||
import org.spongepowered.asm.mixin.injection.Inject;
|
||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 19/12/2017.
|
||||
*/
|
||||
|
@ -17,7 +18,7 @@ public class MixinRenderPlayer {
|
|||
|
||||
@Inject(method = "renderEntityName", at = @At("HEAD"), cancellable = true)
|
||||
public void renderLivingLabel(AbstractClientPlayer entityIn, double x, double y, double z, String name, double distanceSq, CallbackInfo info) {
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(Nametags.class)) info.cancel();
|
||||
if (MODULE_MANAGER.isModuleEnabled(Nametags.class)) info.cancel();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.mixin.client;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.module.modules.player.Freecam;
|
||||
import net.minecraft.client.renderer.chunk.VisGraph;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
@ -12,6 +11,8 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
|
|||
import java.util.EnumSet;
|
||||
import java.util.Set;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 20kdc on 14/02/2020, but really 15/02/2020 because this is basically being recycled
|
||||
*/
|
||||
|
@ -23,7 +24,7 @@ public class MixinVisGraph {
|
|||
// WebringOfTheDamned
|
||||
// This part prevents the "block-level culling". OptiFine does this for you but vanilla doesn't.
|
||||
// We have to implement this here or else OptiFine causes trouble.
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(Freecam.class))
|
||||
if (MODULE_MANAGER.isModuleEnabled(Freecam.class))
|
||||
callbackInfo.setReturnValue(EnumSet.<EnumFacing>allOf(EnumFacing.class));
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ import net.minecraft.network.play.server.SPacketChat;
|
|||
import java.util.regex.Pattern;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.EVENT_BUS;
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* @author S-B99
|
||||
|
@ -141,8 +142,8 @@ public class DiscordNotifs extends Module {
|
|||
}
|
||||
|
||||
private String getTime() {
|
||||
if (!time.getValue() || KamiMod.MODULE_MANAGER.isModuleEnabled(ChatTimestamp.class)) return "";
|
||||
InfoOverlay info = (InfoOverlay) KamiMod.MODULE_MANAGER.getModule(InfoOverlay.class);
|
||||
if (!time.getValue() || MODULE_MANAGER.isModuleEnabled(ChatTimestamp.class)) return "";
|
||||
InfoOverlay info = (InfoOverlay) MODULE_MANAGER.getModule(InfoOverlay.class);
|
||||
return "[" + TimeUtil.getFinalTime(info.timeUnitSetting.getValue(), info.timeTypeSetting.getValue(), info.doLocale.getValue()) + "] ";
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ package me.zeroeightsix.kami.module.modules.combat;
|
|||
|
||||
import me.zero.alpine.listener.EventHandler;
|
||||
import me.zero.alpine.listener.Listener;
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.event.events.PacketEvent;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.setting.Setting;
|
||||
|
@ -11,6 +10,7 @@ import net.minecraft.entity.Entity;
|
|||
import net.minecraft.init.Items;
|
||||
import net.minecraft.network.play.server.SPacketEntityStatus;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
import static me.zeroeightsix.kami.module.modules.gui.InfoOverlay.getItems;
|
||||
|
||||
/**
|
||||
|
@ -50,7 +50,7 @@ public class AntiChainPop extends Module {
|
|||
private void itemMode() {
|
||||
int old = totems;
|
||||
if (getItems(Items.TOTEM_OF_UNDYING) < old) {
|
||||
Surround surround = (Surround) KamiMod.MODULE_MANAGER.getModule(Surround.class);
|
||||
Surround surround = (Surround) MODULE_MANAGER.getModule(Surround.class);
|
||||
surround.autoDisable.setValue(true);
|
||||
surround.enable();
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ public class AntiChainPop extends Module {
|
|||
}
|
||||
|
||||
private void packetMode() {
|
||||
Surround surround = (Surround) KamiMod.MODULE_MANAGER.getModule(Surround.class);
|
||||
Surround surround = (Surround) MODULE_MANAGER.getModule(Surround.class);
|
||||
surround.autoDisable.setValue(true);
|
||||
surround.enable();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.module.modules.combat;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.module.modules.misc.AutoTool;
|
||||
|
@ -22,6 +21,8 @@ import net.minecraft.util.math.Vec3d;
|
|||
|
||||
import java.util.Iterator;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 12/12/2017.
|
||||
* Updated by hub on 31 October 2019
|
||||
|
@ -142,7 +143,7 @@ public class Aura extends Module {
|
|||
// We want to skip this if switchTo32k.getValue() is true,
|
||||
// because it only accounts for tools and weapons.
|
||||
// Maybe someone could refactor this later? :3
|
||||
if ((!switchMode.getValue().equals(SwitchMode.ONLY32K) || switchMode.getValue().equals(SwitchMode.ALL)) && KamiMod.MODULE_MANAGER.isModuleEnabled(AutoTool.class)) {
|
||||
if ((!switchMode.getValue().equals(SwitchMode.ONLY32K) || switchMode.getValue().equals(SwitchMode.ALL)) && MODULE_MANAGER.isModuleEnabled(AutoTool.class)) {
|
||||
AutoTool.equipBestWeapon();
|
||||
}
|
||||
attack(target);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package me.zeroeightsix.kami.module.modules.combat;
|
||||
|
||||
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.module.modules.player.Freecam;
|
||||
|
@ -26,6 +25,7 @@ import net.minecraft.util.math.AxisAlignedBB;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
import static me.zeroeightsix.kami.util.BlockInteractionHelper.canBeClicked;
|
||||
import static me.zeroeightsix.kami.util.BlockInteractionHelper.faceVectorPacketInstant;
|
||||
|
||||
|
@ -109,7 +109,7 @@ public class AutoFeetPlace extends Module {
|
|||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
if (mc.player == null || KamiMod.MODULE_MANAGER.isModuleEnabled(Freecam.class)) {
|
||||
if (mc.player == null || MODULE_MANAGER.isModuleEnabled(Freecam.class)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -246,8 +246,8 @@ public class AutoFeetPlace extends Module {
|
|||
mc.player.swingArm(EnumHand.MAIN_HAND);
|
||||
mc.rightClickDelayTimer = 4;
|
||||
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(NoBreakAnimation.class)) {
|
||||
((NoBreakAnimation) KamiMod.MODULE_MANAGER.getModule(NoBreakAnimation.class)).resetMining();
|
||||
if (MODULE_MANAGER.isModuleEnabled(NoBreakAnimation.class)) {
|
||||
((NoBreakAnimation) MODULE_MANAGER.getModule(NoBreakAnimation.class)).resetMining();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package me.zeroeightsix.kami.module.modules.combat;
|
|||
|
||||
import me.zero.alpine.listener.EventHandler;
|
||||
import me.zero.alpine.listener.Listener;
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.module.modules.misc.AutoReconnect;
|
||||
import me.zeroeightsix.kami.setting.Setting;
|
||||
|
@ -14,6 +13,8 @@ import net.minecraft.util.text.TextComponentString;
|
|||
import net.minecraftforge.event.entity.EntityJoinWorldEvent;
|
||||
import net.minecraftforge.event.entity.living.LivingDamageEvent;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 9/04/2018.
|
||||
*/
|
||||
|
@ -54,7 +55,7 @@ public class AutoLog extends Module {
|
|||
}
|
||||
|
||||
private void log() {
|
||||
KamiMod.MODULE_MANAGER.getModule(AutoReconnect.class).disable();
|
||||
MODULE_MANAGER.getModule(AutoReconnect.class).disable();
|
||||
shouldLog = true;
|
||||
lastLog = System.currentTimeMillis();
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package me.zeroeightsix.kami.module.modules.combat;
|
||||
|
||||
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.module.modules.player.Freecam;
|
||||
|
@ -35,6 +34,7 @@ import java.util.ArrayList;
|
|||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
import static me.zeroeightsix.kami.util.BlockInteractionHelper.canBeClicked;
|
||||
import static me.zeroeightsix.kami.util.BlockInteractionHelper.faceVectorPacketInstant;
|
||||
|
||||
|
@ -118,7 +118,7 @@ public class AutoTrap extends Module {
|
|||
public void onUpdate() {
|
||||
if (mc.player == null || mc.player.getHealth() <= 0) return;
|
||||
|
||||
if (!activeInFreecam.getValue() && KamiMod.MODULE_MANAGER.isModuleEnabled(Freecam.class)) return;
|
||||
if (!activeInFreecam.getValue() && MODULE_MANAGER.isModuleEnabled(Freecam.class)) return;
|
||||
|
||||
if (firstRun) {
|
||||
if (findObiInHotbar() == -1) {
|
||||
|
@ -260,8 +260,8 @@ public class AutoTrap extends Module {
|
|||
mc.player.connection.sendPacket(new CPacketPlayerDigging(CPacketPlayerDigging.Action.START_DESTROY_BLOCK, neighbour, opposite));
|
||||
}
|
||||
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(NoBreakAnimation.class)) {
|
||||
((NoBreakAnimation) KamiMod.MODULE_MANAGER.getModule(NoBreakAnimation.class)).resetMining();
|
||||
if (MODULE_MANAGER.isModuleEnabled(NoBreakAnimation.class)) {
|
||||
((NoBreakAnimation) MODULE_MANAGER.getModule(NoBreakAnimation.class)).resetMining();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package me.zeroeightsix.kami.module.modules.combat;
|
|||
|
||||
import me.zero.alpine.listener.EventHandler;
|
||||
import me.zero.alpine.listener.Listener;
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.event.events.PacketEvent;
|
||||
import me.zeroeightsix.kami.event.events.RenderEvent;
|
||||
|
@ -38,6 +37,7 @@ import java.util.List;
|
|||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
import static me.zeroeightsix.kami.module.modules.gui.InfoOverlay.getItems;
|
||||
import static me.zeroeightsix.kami.util.ColourConverter.rgbToInt;
|
||||
import static me.zeroeightsix.kami.util.ColourConverter.toF;
|
||||
|
@ -221,7 +221,7 @@ public class CrystalAura extends Module {
|
|||
explode(crystal);
|
||||
}
|
||||
if (sneakEnable.getValue() && mc.player.isSneaking() && holeBlocks != 5) {
|
||||
KamiMod.MODULE_MANAGER.getModule(Surround.class).enable();
|
||||
MODULE_MANAGER.getModule(Surround.class).enable();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package me.zeroeightsix.kami.module.modules.combat;
|
|||
|
||||
import me.zero.alpine.listener.EventHandler;
|
||||
import me.zero.alpine.listener.Listener;
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.event.events.PacketEvent;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.setting.Setting;
|
||||
|
@ -16,6 +15,7 @@ import net.minecraft.network.play.client.CPacketPlayerTryUseItem;
|
|||
import java.util.Comparator;
|
||||
import java.util.Objects;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
import static me.zeroeightsix.kami.module.modules.gui.InfoOverlay.getItems;
|
||||
|
||||
/**
|
||||
|
@ -52,9 +52,9 @@ public class OffhandGap extends Module {
|
|||
return;
|
||||
}
|
||||
if (mc.player.getHeldItemMainhand().getItem() instanceof ItemSword || mc.player.getHeldItemMainhand().getItem() instanceof ItemAxe || passItemCheck()) {
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(AutoTotem.class)) {
|
||||
if (MODULE_MANAGER.isModuleEnabled(AutoTotem.class)) {
|
||||
autoTotemWasEnabled = true;
|
||||
KamiMod.MODULE_MANAGER.getModule(AutoTotem.class).disable();
|
||||
MODULE_MANAGER.getModule(AutoTotem.class).disable();
|
||||
}
|
||||
if (!eatWhileAttacking.getValue()) { /* Save item for later when using preventDesync */
|
||||
usedItem = mc.player.getHeldItemMainhand().getItem();
|
||||
|
@ -77,7 +77,7 @@ public class OffhandGap extends Module {
|
|||
disableGaps();
|
||||
}
|
||||
/* Disable if there are crystals in the range of CrystalAura */
|
||||
crystalAura = (CrystalAura) KamiMod.MODULE_MANAGER.getModule(CrystalAura.class);
|
||||
crystalAura = (CrystalAura) MODULE_MANAGER.getModule(CrystalAura.class);
|
||||
if (crystalCheck.getValue() && crystalAura.isEnabled()) {
|
||||
EntityEnderCrystal crystal = mc.world.loadedEntityList.stream()
|
||||
.filter(entity -> entity instanceof EntityEnderCrystal)
|
||||
|
@ -135,9 +135,9 @@ public class OffhandGap extends Module {
|
|||
}
|
||||
|
||||
private void disableGaps() {
|
||||
if (autoTotemWasEnabled != KamiMod.MODULE_MANAGER.isModuleEnabled(AutoTotem.class)) {
|
||||
if (autoTotemWasEnabled != MODULE_MANAGER.isModuleEnabled(AutoTotem.class)) {
|
||||
moveGapsToInventory(gaps);
|
||||
KamiMod.MODULE_MANAGER.getModule(AutoTotem.class).enable();
|
||||
MODULE_MANAGER.getModule(AutoTotem.class).enable();
|
||||
autoTotemWasEnabled = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.module.modules.combat;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.module.modules.player.Freecam;
|
||||
|
@ -25,6 +24,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* @author hub
|
||||
|
@ -60,7 +60,7 @@ public class Surround extends Module {
|
|||
}
|
||||
|
||||
public void onUpdate() {
|
||||
if (!this.isDisabled() && mc.player != null && !KamiMod.MODULE_MANAGER.isModuleEnabled(Freecam.class)) {
|
||||
if (mc.player != null && !MODULE_MANAGER.isModuleEnabled(Freecam.class)) {
|
||||
if (offsetStep == 0) {
|
||||
basePos = (new BlockPos(mc.player.getPositionVector())).down();
|
||||
playerHotbarSlot = mc.player.inventory.currentItem;
|
||||
|
@ -200,8 +200,8 @@ public class Surround extends Module {
|
|||
if (placeAnimation.getValue()) mc.player.connection.sendPacket(new CPacketAnimation(mc.player.getActiveHand()));
|
||||
placeBlockExecute(blockPos);
|
||||
}
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(NoBreakAnimation.class)) {
|
||||
((NoBreakAnimation) KamiMod.MODULE_MANAGER.getModule(NoBreakAnimation.class)).resetMining();
|
||||
if (MODULE_MANAGER.isModuleEnabled(NoBreakAnimation.class)) {
|
||||
((NoBreakAnimation) MODULE_MANAGER.getModule(NoBreakAnimation.class)).resetMining();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ package me.zeroeightsix.kami.module.modules.experimental;
|
|||
|
||||
import me.zero.alpine.listener.EventHandler;
|
||||
import me.zero.alpine.listener.Listener;
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.event.events.PacketEvent;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
|
@ -30,6 +29,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
import static me.zeroeightsix.kami.module.modules.combat.CrystalAura.getPlayerPos;
|
||||
import static me.zeroeightsix.kami.util.EntityUtil.calculateLookAt;
|
||||
|
||||
|
@ -93,7 +93,7 @@ public class HoleFiller extends Module {
|
|||
|
||||
entities.addAll(mc.world.playerEntities.stream().filter(entityPlayer -> !Friends.isFriend(entityPlayer.getName())).collect(Collectors.toList()));
|
||||
int range = (int) Math.ceil(distance.getValue());
|
||||
CrystalAura ca = (CrystalAura) KamiMod.MODULE_MANAGER.getModule(CrystalAura.class);
|
||||
CrystalAura ca = (CrystalAura) MODULE_MANAGER.getModule(CrystalAura.class);
|
||||
blockPosList = ca.getSphere(getPlayerPos(), range, range, false, true, 0);
|
||||
for (Entity p : entities) {
|
||||
List<BlockPos> maybe = ca.getSphere(p.getPosition(), range, range, false, true, 0);
|
||||
|
@ -159,8 +159,8 @@ public class HoleFiller extends Module {
|
|||
mc.player.connection.sendPacket(new CPacketHeldItemChange(obiSlot));
|
||||
lookAtPacket(p.x, p.y, p.z, mc.player);
|
||||
BlockInteractionHelper.placeBlockScaffold(p);
|
||||
if (KamiMod.MODULE_MANAGER.isModuleEnabled(NoBreakAnimation.class)) {
|
||||
((NoBreakAnimation) KamiMod.MODULE_MANAGER.getModule(NoBreakAnimation.class)).resetMining();
|
||||
if (MODULE_MANAGER.isModuleEnabled(NoBreakAnimation.class)) {
|
||||
((NoBreakAnimation) MODULE_MANAGER.getModule(NoBreakAnimation.class)).resetMining();
|
||||
}
|
||||
resetRotation();
|
||||
mc.player.connection.sendPacket(new CPacketHeldItemChange(oldSlot));
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.module.modules.gui;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.setting.Setting;
|
||||
import me.zeroeightsix.kami.setting.Settings;
|
||||
|
@ -9,6 +8,7 @@ import net.minecraft.util.text.TextFormatting;
|
|||
|
||||
import java.awt.*;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
import static me.zeroeightsix.kami.command.Command.sendDisableMessage;
|
||||
import static me.zeroeightsix.kami.util.ColourConverter.rgbToInt;
|
||||
import static me.zeroeightsix.kami.util.ColourTextFormatting.colourEnumMap;
|
||||
|
@ -76,7 +76,7 @@ public class ActiveModules extends Module {
|
|||
}
|
||||
|
||||
private TextFormatting infoGetSetting(boolean isOne) {
|
||||
InfoOverlay infoOverlay = (InfoOverlay) KamiMod.MODULE_MANAGER.getModule(InfoOverlay.class);
|
||||
InfoOverlay infoOverlay = (InfoOverlay) MODULE_MANAGER.getModule(InfoOverlay.class);
|
||||
if (isOne) return setToText(infoOverlay.firstColour.getValue());
|
||||
else return setToText(infoOverlay.secondColour.getValue());
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package me.zeroeightsix.kami.module.modules.gui;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.setting.Setting;
|
||||
import me.zeroeightsix.kami.setting.Settings;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
import static me.zeroeightsix.kami.command.Command.sendErrorMessage;
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@ public class CommandConfig extends Module {
|
|||
public void onDisable() { sendDisableMessage(this.getClass()); }
|
||||
|
||||
private void sendDisableMessage(Class clazz) {
|
||||
sendErrorMessage("Error: The " + KamiMod.MODULE_MANAGER.getModule(clazz).getName() + " module is only for configuring command options, disabling it doesn't do anything.");
|
||||
KamiMod.MODULE_MANAGER.getModule(clazz).enable();
|
||||
sendErrorMessage("Error: The " + MODULE_MANAGER.getModule(clazz).getName() + " module is only for configuring command options, disabling it doesn't do anything.");
|
||||
MODULE_MANAGER.getModule(clazz).enable();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.module.modules.hidden;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.module.modules.combat.Aura;
|
||||
|
@ -35,6 +34,7 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
import static me.zeroeightsix.kami.module.modules.combat.CrystalAura.getPlayerPos;
|
||||
import static me.zeroeightsix.kami.util.BlockInteractionHelper.*;
|
||||
|
||||
|
@ -61,7 +61,7 @@ public class Auto32k extends Module {
|
|||
@Override
|
||||
protected void onEnable() {
|
||||
|
||||
if (isDisabled() || mc.player == null || KamiMod.MODULE_MANAGER.isModuleEnabled(Freecam.class)) {
|
||||
if (isDisabled() || mc.player == null || MODULE_MANAGER.isModuleEnabled(Freecam.class)) {
|
||||
disable();
|
||||
return;
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ public class Auto32k extends Module {
|
|||
|
||||
int range = (int) Math.ceil(placeRange.getValue());
|
||||
|
||||
CrystalAura crystalAura = (CrystalAura) KamiMod.MODULE_MANAGER.getModule(CrystalAura.class);
|
||||
CrystalAura crystalAura = (CrystalAura) MODULE_MANAGER.getModule(CrystalAura.class);
|
||||
List<BlockPos> placeTargetList = crystalAura.getSphere(getPlayerPos(), range, range, false, true, 0);
|
||||
Map<BlockPos, Double> placeTargetMap = new HashMap<>();
|
||||
|
||||
|
@ -238,7 +238,7 @@ public class Auto32k extends Module {
|
|||
@Override
|
||||
public void onUpdate() {
|
||||
|
||||
if (isDisabled() || mc.player == null || KamiMod.MODULE_MANAGER.isModuleEnabled(Freecam.class)) {
|
||||
if (isDisabled() || mc.player == null || MODULE_MANAGER.isModuleEnabled(Freecam.class)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ public class Auto32k extends Module {
|
|||
if (swapReady) {
|
||||
mc.playerController.windowClick(((GuiContainer) mc.currentScreen).inventorySlots.windowId, 0, swordSlot - 32, ClickType.SWAP, mc.player);
|
||||
if (autoEnableHitAura.getValue()) {
|
||||
KamiMod.MODULE_MANAGER.getModule(Aura.class).enable();
|
||||
MODULE_MANAGER.getModule(Aura.class).enable();
|
||||
}
|
||||
disable();
|
||||
}
|
||||
|
@ -377,7 +377,7 @@ public class Auto32k extends Module {
|
|||
//@Override
|
||||
//protected void onDisable() {
|
||||
// if (autoEnableHitAura.getValue()) {
|
||||
// KamiMod.MODULE_MANAGER.getModuleByName("Aura").disable();
|
||||
// MODULE_MANAGER.getModuleByName("Aura").disable();
|
||||
// }
|
||||
//}
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.module.modules.hidden;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.module.modules.capes.Capes;
|
||||
|
@ -19,6 +18,8 @@ import java.io.IOException;
|
|||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* @author S-B99
|
||||
* Horribly designed class for uh, running things only once.
|
||||
|
@ -34,29 +35,29 @@ public class RunConfig extends Module {
|
|||
private Setting<Boolean> shouldInfoMsg = register(Settings.b("420e", false));
|
||||
|
||||
public void onEnable() {
|
||||
KamiMod.MODULE_MANAGER.getModule(ActiveModules.class).enable();
|
||||
KamiMod.MODULE_MANAGER.getModule(CommandConfig.class).enable();
|
||||
KamiMod.MODULE_MANAGER.getModule(InfoOverlay.class).enable();
|
||||
KamiMod.MODULE_MANAGER.getModule(InventoryViewer.class).enable();
|
||||
MODULE_MANAGER.getModule(ActiveModules.class).enable();
|
||||
MODULE_MANAGER.getModule(CommandConfig.class).enable();
|
||||
MODULE_MANAGER.getModule(InfoOverlay.class).enable();
|
||||
MODULE_MANAGER.getModule(InventoryViewer.class).enable();
|
||||
|
||||
if (!hasRunCapes.getValue()) {
|
||||
KamiMod.MODULE_MANAGER.getModule(Capes.class).enable();
|
||||
MODULE_MANAGER.getModule(Capes.class).enable();
|
||||
hasRunCapes.setValue(true);
|
||||
}
|
||||
if (!hasRunDiscordSettings.getValue()) {
|
||||
KamiMod.MODULE_MANAGER.getModule(DiscordSettings.class).enable();
|
||||
MODULE_MANAGER.getModule(DiscordSettings.class).enable();
|
||||
hasRunDiscordSettings.setValue(true);
|
||||
}
|
||||
if (!hasRunFixGui.getValue()) {
|
||||
KamiMod.MODULE_MANAGER.getModule(FixGui.class).enable();
|
||||
MODULE_MANAGER.getModule(FixGui.class).enable();
|
||||
hasRunFixGui.setValue(true);
|
||||
}
|
||||
if (!hasRunTabFriends.getValue()) {
|
||||
KamiMod.MODULE_MANAGER.getModule(TabFriends.class).enable();
|
||||
MODULE_MANAGER.getModule(TabFriends.class).enable();
|
||||
hasRunTabFriends.setValue(true);
|
||||
}
|
||||
if (!hasRunCustomChat.getValue()) {
|
||||
KamiMod.MODULE_MANAGER.getModule(CustomChat.class).enable();
|
||||
MODULE_MANAGER.getModule(CustomChat.class).enable();
|
||||
hasRunCustomChat.setValue(true);
|
||||
}
|
||||
if (!hasRun420.getValue()) {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package me.zeroeightsix.kami.module.modules.misc;
|
||||
|
||||
import com.mojang.realmsclient.gui.ChatFormatting;
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.module.modules.combat.CrystalAura;
|
||||
|
@ -29,6 +28,7 @@ import net.minecraft.util.math.Vec3d;
|
|||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
import static me.zeroeightsix.kami.util.BlockInteractionHelper.*;
|
||||
|
||||
/**
|
||||
|
@ -392,7 +392,7 @@ public class AutoSpawner extends Module {
|
|||
return;
|
||||
}
|
||||
|
||||
CrystalAura crystalAura = (CrystalAura) KamiMod.MODULE_MANAGER.getModule(CrystalAura.class);
|
||||
CrystalAura crystalAura = (CrystalAura) MODULE_MANAGER.getModule(CrystalAura.class);
|
||||
List<BlockPos> blockPosList = crystalAura.getSphere(mc.player.getPosition().down(), placeRange.getValue(), placeRange.getValue().intValue(), false, true, 0);
|
||||
|
||||
boolean noPositionInArea = true;
|
||||
|
|
|
@ -2,7 +2,6 @@ package me.zeroeightsix.kami.module.modules.movement;
|
|||
|
||||
import me.zero.alpine.listener.EventHandler;
|
||||
import me.zero.alpine.listener.Listener;
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.module.modules.render.Pathfind;
|
||||
import me.zeroeightsix.kami.setting.Setting;
|
||||
|
@ -10,6 +9,7 @@ import me.zeroeightsix.kami.setting.Settings;
|
|||
import net.minecraft.pathfinding.PathPoint;
|
||||
import net.minecraftforge.client.event.InputUpdateEvent;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
import static me.zeroeightsix.kami.util.EntityUtil.calculateLookAt;
|
||||
|
||||
/**
|
||||
|
@ -34,7 +34,7 @@ public class AutoWalk extends Module {
|
|||
event.getMovementInput().moveForward = 1;
|
||||
if (mc.player.isInWater() || mc.player.isInLava()) mc.player.movementInput.jump = true;
|
||||
else if (mc.player.collidedHorizontally && mc.player.onGround) mc.player.jump();
|
||||
if (!KamiMod.MODULE_MANAGER.isModuleEnabled(Pathfind.class) || Pathfind.points.isEmpty()) return;
|
||||
if (!MODULE_MANAGER.isModuleEnabled(Pathfind.class) || Pathfind.points.isEmpty()) return;
|
||||
PathPoint next = Pathfind.points.get(0);
|
||||
lookAt(next);
|
||||
break;
|
||||
|
@ -47,7 +47,7 @@ public class AutoWalk extends Module {
|
|||
mc.player.rotationPitch = (float) v[1];
|
||||
}
|
||||
|
||||
private static enum AutoWalkMode {
|
||||
private enum AutoWalkMode {
|
||||
FORWARD, BACKWARDS, PATH
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,6 @@ package me.zeroeightsix.kami.module.modules.movement;
|
|||
|
||||
import me.zero.alpine.listener.EventHandler;
|
||||
import me.zero.alpine.listener.Listener;
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.event.KamiEvent;
|
||||
import me.zeroeightsix.kami.event.events.AddCollisionBoxToListEvent;
|
||||
import me.zeroeightsix.kami.event.events.PacketEvent;
|
||||
|
@ -18,6 +17,8 @@ import net.minecraft.util.math.AxisAlignedBB;
|
|||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 11/12/2017.
|
||||
*/
|
||||
|
@ -28,7 +29,7 @@ public class Jesus extends Module {
|
|||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
if (!KamiMod.MODULE_MANAGER.isModuleEnabled(Freecam.class)) {
|
||||
if (!MODULE_MANAGER.isModuleEnabled(Freecam.class)) {
|
||||
if (EntityUtil.isInWater(mc.player) && !mc.player.isSneaking()) {
|
||||
mc.player.motionY = 0.1;
|
||||
if (mc.player.getRidingEntity() != null && !(mc.player.getRidingEntity() instanceof EntityBoat)) {
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package me.zeroeightsix.kami.module.modules.movement;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* Created by 086 on 23/08/2017.
|
||||
* Updated by S-B99 on 06/03/20
|
||||
|
@ -13,7 +14,7 @@ public class Sprint extends Module {
|
|||
@Override
|
||||
public void onUpdate() {
|
||||
if (mc.player == null) return;
|
||||
if (KamiMod.MODULE_MANAGER.getModule(ElytraFlight.class).isEnabled() && (mc.player.isElytraFlying() || mc.player.capabilities.isFlying)) return;
|
||||
if (MODULE_MANAGER.getModule(ElytraFlight.class).isEnabled() && (mc.player.isElytraFlying() || mc.player.capabilities.isFlying)) return;
|
||||
try {
|
||||
if (!mc.player.collidedHorizontally && mc.player.moveForward > 0)
|
||||
mc.player.setSprinting(true);
|
||||
|
|
|
@ -2,7 +2,6 @@ package me.zeroeightsix.kami.module.modules.player;
|
|||
|
||||
import me.zero.alpine.listener.EventHandler;
|
||||
import me.zero.alpine.listener.Listener;
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.setting.Setting;
|
||||
import me.zeroeightsix.kami.setting.Settings;
|
||||
|
@ -19,6 +18,7 @@ import net.minecraft.util.math.BlockPos;
|
|||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraftforge.client.event.InputUpdateEvent;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
import static me.zeroeightsix.kami.util.BlockInteractionHelper.*;
|
||||
|
||||
/**
|
||||
|
@ -68,7 +68,7 @@ public class Scaffold extends Module {
|
|||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
if (mc.player == null || KamiMod.MODULE_MANAGER.isModuleEnabled(Freecam.class)) return;
|
||||
if (mc.player == null || MODULE_MANAGER.isModuleEnabled(Freecam.class)) return;
|
||||
shouldSlow = false;
|
||||
|
||||
Vec3d vec3d = EntityUtil.getInterpolatedPos(mc.player, ticks.getValue());
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package me.zeroeightsix.kami.module.modules.render;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.event.events.RenderEvent;
|
||||
import me.zeroeightsix.kami.module.Module;
|
||||
import me.zeroeightsix.kami.module.modules.combat.CrystalAura;
|
||||
|
@ -17,6 +16,7 @@ import java.awt.*;
|
|||
import java.util.List;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
import static me.zeroeightsix.kami.module.modules.combat.CrystalAura.getPlayerPos;
|
||||
|
||||
|
||||
|
@ -76,7 +76,7 @@ public class HoleESP extends Module {
|
|||
|
||||
int range = (int) Math.ceil(renderDistance.getValue());
|
||||
|
||||
CrystalAura crystalAura = (CrystalAura) KamiMod.MODULE_MANAGER.getModule(CrystalAura.class);
|
||||
CrystalAura crystalAura = (CrystalAura) MODULE_MANAGER.getModule(CrystalAura.class);
|
||||
List<BlockPos> blockPosList = crystalAura.getSphere(getPlayerPos(), range, range, false, true, 0);
|
||||
|
||||
for (BlockPos pos : blockPosList) {
|
||||
|
|
|
@ -1,15 +1,16 @@
|
|||
package me.zeroeightsix.kami.util;
|
||||
|
||||
import me.zeroeightsix.kami.KamiMod;
|
||||
import me.zeroeightsix.kami.command.Command;
|
||||
import me.zeroeightsix.kami.module.modules.gui.CommandConfig;
|
||||
|
||||
import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER;
|
||||
|
||||
/**
|
||||
* @author S-B99
|
||||
*/
|
||||
public class CommandUtil {
|
||||
public static void runAliases(Command command) {
|
||||
if (!((CommandConfig) KamiMod.MODULE_MANAGER.getModule(CommandConfig.class)).aliasInfo.getValue()) return;
|
||||
if (!((CommandConfig) MODULE_MANAGER.getModule(CommandConfig.class)).aliasInfo.getValue()) return;
|
||||
int amount = command.getAliases().size();
|
||||
if (amount > 0) {
|
||||
Command.sendChatMessage("'" + command.getLabel() + "' has " + grammar1(amount) + "alias" + grammar2(amount));
|
||||
|
|
Loading…
Reference in New Issue