From dbfbde152b684b22aec7b884c384b0cb7f539752 Mon Sep 17 00:00:00 2001 From: cubk Date: Mon, 19 Aug 2024 09:50:57 +0800 Subject: [PATCH] done --- .../java/net/moran/loratadine/Loratadine.java | 151 +++++++++--------- .../moran/loratadine/event/EventHandler.java | 2 - .../loratadine/event/impl/AttackEvent.java | 10 +- .../loratadine/event/impl/MotionEvent.java | 26 ++- .../loratadine/event/impl/PacketEvent.java | 28 ++-- .../impl/helper/CustomKeyboardInput.java | 4 +- .../net/moran/loratadine/modules/Module.java | 36 ++--- .../modules/impl/combat/KillAura.java | 6 +- .../modules/impl/movement/NoSlow.java | 2 - .../modules/impl/player/ChestStealer.java | 20 +-- .../net/moran/loratadine/setting/Setting.java | 24 ++- .../loratadine/setting/impl/ModeSetting.java | 4 +- .../setting/impl/NumberSetting.java | 8 +- .../net/moran/loratadine/utils/ByteUtil.java | 3 +- .../net/moran/loratadine/utils/HWIDUtil.java | 2 - .../moran/loratadine/utils/NetworkUtils.java | 2 +- .../moran/loratadine/utils/SystemUtils.java | 2 - .../utils/helper/ReflectionHelper.java | 4 +- .../loratadine/utils/item/InventoryUtils.java | 8 +- .../loratadine/utils/math/MathUtils.java | 4 +- .../moran/loratadine/utils/misc/WebUtils.java | 2 - .../loratadine/utils/player/BlockUtils.java | 6 +- .../loratadine/utils/player/MoveUtils.java | 4 +- .../loratadine/utils/render/ColorUtils.java | 4 +- .../loratadine/utils/render/GLUtils.java | 6 +- .../loratadine/utils/unsafe/UnsafeUtils.java | 6 +- .../loratadine/utils/vector/Vector3d.java | 14 +- 27 files changed, 184 insertions(+), 204 deletions(-) diff --git a/src/main/java/net/moran/loratadine/Loratadine.java b/src/main/java/net/moran/loratadine/Loratadine.java index 3a1dfa3..bdd1bbe 100644 --- a/src/main/java/net/moran/loratadine/Loratadine.java +++ b/src/main/java/net/moran/loratadine/Loratadine.java @@ -1,9 +1,7 @@ package net.moran.loratadine; -import cn.lzq.injection.Fucker; import com.google.gson.JsonObject; import com.google.gson.JsonParser; -import dev.annotations.JNICInclude; import java.io.File; import java.io.IOException; import java.lang.management.ManagementFactory; @@ -13,7 +11,7 @@ import java.util.ArrayList; import java.util.Base64; import java.util.List; -import lombok.Generated; + import net.minecraft.client.Minecraft; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.fml.ModList; @@ -29,7 +27,6 @@ import net.moran.loratadine.utils.unsafe.UnsafeUtils; @Mod("loratadine") -@JNICInclude public class Loratadine { public static Loratadine INSTANCE = new Loratadine(); public static String CLIENT_NAME = "Loratadine"; @@ -41,61 +38,61 @@ public class Loratadine { private Minecraft minecraft; public Loratadine() { - File index = new File(System.getProperty("user.home"), ".moran"); - if (index.exists()) { - File data = new File(index, "data.ini"); - String readData = ""; - if (data.exists()) { - try { - readData = Files.readAllLines(data.toPath()).get(0); - } catch (IOException var7) { - } - } else { - System.out.println("Error o1?"); - } - - readData = CryptUtil.RSA.decryptByPrivateKey( - Base64.getDecoder().decode(readData), - "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC4xVR6yFhaTWnfe9SUy2YAIY+SqdB/WOCgsMcN4A0YwbfrZjlvBCRKxlJ32yDTF8tN/HBaOo/lpHX3VRwhpvQ0yL5IFBBSUY4JIc2utIuVdLc3ZaLDuhuh08hOrvrHCWlFi523mJvB4Xzi+6hau6FFs7qfp/SRfGK2tjS7sA7oqky3PVH3nBV+X6f3rI7/a3POFqboSwdm0jnqTvEpNr75H1gy47/V7L2oAgGIBspFvqLj8VgtKNX8clVTva9UTlnLtKG+rDf1nCr6fiRDotXP+QnD1kzVEl6Xndw8pdXpBQo/GsUdIixAdBN5mW/wz/4tdPbK9jmh7CFWqbEM6IPZAgMBAAECggEBAIn0q9LQ60bhLf9y0ZIXG51VcYEr0USD85OG6dhuRNkLKmtT8+XzzbUWxlQ/BA8YYO9lX+2+c9oeJQX6QfrOUN9oUso2UMllowsmdg/PNbjtYC64cAJ7Xk5BdflppEwftr36NFP0Wbc0yK4g/95e4VbNjrXODUji+kE5Yb4RAdCssbzd3Z5ftqK1U9eB5ASKgYuo3w9bkG6du7iFnGI+BeSHOkjVLzY2ETIq9oPknMTQAif1JzXvLGH2OefqTF8To8kkxn17BrJncBzwmExkrCPOxqc2DoMrCeuN/x28GbYxS40f+9cGBC0EtGg0rK7O4uMivAqATA8YBl3p8AMuYUECgYEA2dB227WxQjsoqHhe0qa2Aq1YIJRsFJmfiwW3D8VMAzvJTSmuSjKT2ttHhI7wWVbKxqksugpwsCb0K+omXSPSaqf5MvtXy/4lbWzmfG4bALlDmuu11EDqm8nj6tXzYHuyXBg5Cff+lqmLaEtU0CoArmKFZ0gIeWn57OoxeR0EyG0CgYEA2SneiTH2xO+R3uN+Od/3ukxdSJzZvRzFpCqhBVKeXroGFlYTlBcLwIp+YduLFbSFNCThy1e8YkPj2MT/yYIJXWEA5Cwv4dylKg7ACcnJFHldQTEq4jY6EP6HTnxhrvGAy1UXTJJuVvsfqEm9U5Ar8lfUK+R3uugBKPIQ5E6SXZ0CgYBEfO8SsLPW7oEfUBIIzJDIkLb4L5M4ewGWlip0lAYNsjvevm9mNzcUhwSa4tMiVE8YXlOJAAVk7iqysEJ14PClxsFtzWhS5Uvhd2+Vyo1FEfv294zJ+8uJRtcanUGUofB4UsmEn+z2dMM3/Q/jEIH8U1A9JII9oxwJ6a26tmwtlQKBgCFTLIQvN6gm/2KN1Iv7E5/yIgqHj15W8PltVUJk2Eq/DzoUQXLjSnlkh1pq/1/4UMycsE2tDAqkUm2sZXg9zUQYI7PgGAT4AByBIPUfkwziRu4/Jk6KdcSv2oGv0qmvA82wJCArBGWyqbwAfN467JOG6NdHexwiiDMJWpA+gnV9AoGBAJBk+33lsD9NEyRHdwnTXaoNHreifNux8XdH24YqaAdVCkym1RBtbD4DoNC2aZVFlRfrWP3alQQ98jzqm80HRRic1uqqvdOgAxDzCa+ZOBm4UgiWtbsfDRlZHvuJxd+j0jn0hBbLZJCkUCxBqutTHjnp8lscv2u1Q4nfSftDnKIz" - ); - JsonObject jsonObject = (JsonObject)JsonParser.parseString(readData); - String kookId = jsonObject.get("a").getAsString(); - String password = jsonObject.get("aa").getAsString(); - Fucker.init(); - Fucker.loginUsername = kookId; - Fucker.loginPassword = password; - if (jsonObject.has("b")) { - Fucker.requestText = CryptUtil.Base64Crypt.decrypt(jsonObject.get("b").getAsString()); - } - - this.init(); - } else { - System.out.println("Error o2!"); - } +// File index = new File(System.getProperty("user.home"), ".moran"); +// if (index.exists()) { +// File data = new File(index, "data.ini"); +// String readData = ""; +// if (data.exists()) { +// try { +// readData = Files.readAllLines(data.toPath()).get(0); +// } catch (IOException var7) { +// } +// } else { +// System.out.println("Error o1?"); +// } +// +// readData = CryptUtil.RSA.decryptByPrivateKey( +// Base64.getDecoder().decode(readData), +// "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC4xVR6yFhaTWnfe9SUy2YAIY+SqdB/WOCgsMcN4A0YwbfrZjlvBCRKxlJ32yDTF8tN/HBaOo/lpHX3VRwhpvQ0yL5IFBBSUY4JIc2utIuVdLc3ZaLDuhuh08hOrvrHCWlFi523mJvB4Xzi+6hau6FFs7qfp/SRfGK2tjS7sA7oqky3PVH3nBV+X6f3rI7/a3POFqboSwdm0jnqTvEpNr75H1gy47/V7L2oAgGIBspFvqLj8VgtKNX8clVTva9UTlnLtKG+rDf1nCr6fiRDotXP+QnD1kzVEl6Xndw8pdXpBQo/GsUdIixAdBN5mW/wz/4tdPbK9jmh7CFWqbEM6IPZAgMBAAECggEBAIn0q9LQ60bhLf9y0ZIXG51VcYEr0USD85OG6dhuRNkLKmtT8+XzzbUWxlQ/BA8YYO9lX+2+c9oeJQX6QfrOUN9oUso2UMllowsmdg/PNbjtYC64cAJ7Xk5BdflppEwftr36NFP0Wbc0yK4g/95e4VbNjrXODUji+kE5Yb4RAdCssbzd3Z5ftqK1U9eB5ASKgYuo3w9bkG6du7iFnGI+BeSHOkjVLzY2ETIq9oPknMTQAif1JzXvLGH2OefqTF8To8kkxn17BrJncBzwmExkrCPOxqc2DoMrCeuN/x28GbYxS40f+9cGBC0EtGg0rK7O4uMivAqATA8YBl3p8AMuYUECgYEA2dB227WxQjsoqHhe0qa2Aq1YIJRsFJmfiwW3D8VMAzvJTSmuSjKT2ttHhI7wWVbKxqksugpwsCb0K+omXSPSaqf5MvtXy/4lbWzmfG4bALlDmuu11EDqm8nj6tXzYHuyXBg5Cff+lqmLaEtU0CoArmKFZ0gIeWn57OoxeR0EyG0CgYEA2SneiTH2xO+R3uN+Od/3ukxdSJzZvRzFpCqhBVKeXroGFlYTlBcLwIp+YduLFbSFNCThy1e8YkPj2MT/yYIJXWEA5Cwv4dylKg7ACcnJFHldQTEq4jY6EP6HTnxhrvGAy1UXTJJuVvsfqEm9U5Ar8lfUK+R3uugBKPIQ5E6SXZ0CgYBEfO8SsLPW7oEfUBIIzJDIkLb4L5M4ewGWlip0lAYNsjvevm9mNzcUhwSa4tMiVE8YXlOJAAVk7iqysEJ14PClxsFtzWhS5Uvhd2+Vyo1FEfv294zJ+8uJRtcanUGUofB4UsmEn+z2dMM3/Q/jEIH8U1A9JII9oxwJ6a26tmwtlQKBgCFTLIQvN6gm/2KN1Iv7E5/yIgqHj15W8PltVUJk2Eq/DzoUQXLjSnlkh1pq/1/4UMycsE2tDAqkUm2sZXg9zUQYI7PgGAT4AByBIPUfkwziRu4/Jk6KdcSv2oGv0qmvA82wJCArBGWyqbwAfN467JOG6NdHexwiiDMJWpA+gnV9AoGBAJBk+33lsD9NEyRHdwnTXaoNHreifNux8XdH24YqaAdVCkym1RBtbD4DoNC2aZVFlRfrWP3alQQ98jzqm80HRRic1uqqvdOgAxDzCa+ZOBm4UgiWtbsfDRlZHvuJxd+j0jn0hBbLZJCkUCxBqutTHjnp8lscv2u1Q4nfSftDnKIz" +// ); +// JsonObject jsonObject = (JsonObject)JsonParser.parseString(readData); +// String kookId = jsonObject.get("a").getAsString(); +// String password = jsonObject.get("aa").getAsString(); +// Fucker.init(); +// Fucker.loginUsername = kookId; +// Fucker.loginPassword = password; +// if (jsonObject.has("b")) { +// Fucker.requestText = CryptUtil.Base64Crypt.decrypt(jsonObject.get("b").getAsString()); +// } +// +// } else { +// System.out.println("Error o2!"); +// } + this.init(); } public void init() { try { System.setProperty("java.awt.headless", "false"); - RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean(); - - for (String s : runtimeMxBean.getInputArguments()) { - if (x(s, "Xbootclasspath").equals("true")) { - System.exit(0); - - while (true) { - UnsafeUtils.freeMemory(Long.MAX_VALUE); - } - } - } - - if (SystemUtils.isServiceExist("HTTPDebuggerPro")) { - System.exit(0); - - while (true) { - UnsafeUtils.freeMemory(Long.MAX_VALUE); - } - } +// RuntimeMXBean runtimeMxBean = ManagementFactory.getRuntimeMXBean(); +// +// for (String s : runtimeMxBean.getInputArguments()) { +// if (x(s, "Xbootclasspath").equals("true")) { +// System.exit(0); +// +// while (true) { +// UnsafeUtils.freeMemory(Long.MAX_VALUE); +// } +// } +// } +// +// if (SystemUtils.isServiceExist("HTTPDebuggerPro")) { +// System.exit(0); +// +// while (true) { +// UnsafeUtils.freeMemory(Long.MAX_VALUE); +// } +// } INSTANCE = this; this.minecraft = this.get_mc_Instance(); @@ -109,19 +106,19 @@ public void init() { this.removeModInfo(); ReflectionUtil.init(); } catch (Exception var5) { - this.minecraft = null; - this.eventManager = null; - this.eventManager.register(null); - this.eventHandler = null; - this.moduleManager = null; - this.commandManager = null; - this.moduleManager.init(); - MinecraftForge.EVENT_BUS.register(null); - MinecraftForge.EVENT_BUS.register(null); - ReflectionUtil.init(); - Fucker.init(); - UnsafeUtils.freeMemory(Long.MAX_VALUE); - var5.printStackTrace(); +// this.minecraft = null; +// this.eventManager = null; +// this.eventManager.register(null); +// this.eventHandler = null; +// this.moduleManager = null; +// this.commandManager = null; +// this.moduleManager.init(); +// MinecraftForge.EVENT_BUS.register(null); +// MinecraftForge.EVENT_BUS.register(null); +// ReflectionUtil.init(); +// Fucker.init(); +// UnsafeUtils.freeMemory(Long.MAX_VALUE); +// var5.printStackTrace(); } } @@ -212,52 +209,52 @@ public static String x(String s, String t) { return String.valueOf(status); } - @Generated + public void setEventManager(EventManager eventManager) { this.eventManager = eventManager; } - @Generated + public void setEventHandler(Object eventHandler) { this.eventHandler = eventHandler; } - @Generated + public void setModuleManager(ModuleManager moduleManager) { this.moduleManager = moduleManager; } - @Generated + public void setCommandManager(CommandManager commandManager) { this.commandManager = commandManager; } - @Generated + public void setMinecraft(Minecraft minecraft) { this.minecraft = minecraft; } - @Generated + public EventManager getEventManager() { return this.eventManager; } - @Generated + public Object getEventHandler() { return this.eventHandler; } - @Generated + public ModuleManager getModuleManager() { return this.moduleManager; } - @Generated + public CommandManager getCommandManager() { return this.commandManager; } - @Generated + public Minecraft getMinecraft() { return this.minecraft; } diff --git a/src/main/java/net/moran/loratadine/event/EventHandler.java b/src/main/java/net/moran/loratadine/event/EventHandler.java index d17d53e..b24cd0f 100644 --- a/src/main/java/net/moran/loratadine/event/EventHandler.java +++ b/src/main/java/net/moran/loratadine/event/EventHandler.java @@ -1,6 +1,5 @@ package net.moran.loratadine.event; -import cn.lzq.injection.Fucker; import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.game.ServerGamePacketListener; import net.minecraftforge.client.event.RenderLevelLastEvent; @@ -99,7 +98,6 @@ private void loaded() { } else if (!this.loaded) { this.loaded = true; NetworkUtils.init(); - new ByteUtil(Fucker.channel).online(mc.player.getScoreboardName()); } } diff --git a/src/main/java/net/moran/loratadine/event/impl/AttackEvent.java b/src/main/java/net/moran/loratadine/event/impl/AttackEvent.java index e10deb3..0826871 100644 --- a/src/main/java/net/moran/loratadine/event/impl/AttackEvent.java +++ b/src/main/java/net/moran/loratadine/event/impl/AttackEvent.java @@ -1,6 +1,6 @@ package net.moran.loratadine.event.impl; -import lombok.Generated; + import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.player.Player; import net.moran.loratadine.event.CancellableEvent; @@ -14,13 +14,13 @@ public AttackEvent(Player player, Entity target) { this.target = target; } - @Generated - public Player getPlayer() { + + public Player getPlayer() { return this.player; } - @Generated - public Entity getTarget() { + + public Entity getTarget() { return this.target; } } diff --git a/src/main/java/net/moran/loratadine/event/impl/MotionEvent.java b/src/main/java/net/moran/loratadine/event/impl/MotionEvent.java index bef7fec..018777f 100644 --- a/src/main/java/net/moran/loratadine/event/impl/MotionEvent.java +++ b/src/main/java/net/moran/loratadine/event/impl/MotionEvent.java @@ -1,23 +1,21 @@ package net.moran.loratadine.event.impl; -import lombok.Generated; + import net.moran.loratadine.event.Event; public class MotionEvent implements Event { - private Event.Side side; + private Side side; + - @Generated - public Event.Side getSide() { - return this.side; - } + public MotionEvent(Side side) { + this.side = side; + } - @Generated - public void setSide(Event.Side side) { - this.side = side; - } + public Event.Side getSide() { + return this.side; + } - @Generated - public MotionEvent(Event.Side side) { - this.side = side; - } + public void setSide(Side side) { + this.side = side; + } } diff --git a/src/main/java/net/moran/loratadine/event/impl/PacketEvent.java b/src/main/java/net/moran/loratadine/event/impl/PacketEvent.java index b5c7dc7..5ac7dfd 100644 --- a/src/main/java/net/moran/loratadine/event/impl/PacketEvent.java +++ b/src/main/java/net/moran/loratadine/event/impl/PacketEvent.java @@ -1,27 +1,27 @@ package net.moran.loratadine.event.impl; -import lombok.Generated; + import net.minecraft.network.protocol.Packet; import net.moran.loratadine.event.CancellableEvent; import net.moran.loratadine.event.Event; public class PacketEvent extends CancellableEvent { - private final Event.Side side; - private final Packet packet; + private final Side side; + private final Packet packet; - @Generated - public PacketEvent(Event.Side side, Packet packet) { - this.side = side; - this.packet = packet; - } - @Generated - public Event.Side getSide() { - return this.side; - } + public PacketEvent(Side side, Packet packet) { + this.side = side; + this.packet = packet; + } + + + public Event.Side getSide() { + return this.side; + } + - @Generated - public Packet getPacket() { + public Packet getPacket() { return this.packet; } } diff --git a/src/main/java/net/moran/loratadine/event/impl/helper/CustomKeyboardInput.java b/src/main/java/net/moran/loratadine/event/impl/helper/CustomKeyboardInput.java index 0384a74..4adf3ef 100644 --- a/src/main/java/net/moran/loratadine/event/impl/helper/CustomKeyboardInput.java +++ b/src/main/java/net/moran/loratadine/event/impl/helper/CustomKeyboardInput.java @@ -1,6 +1,6 @@ package net.moran.loratadine.event.impl.helper; -import lombok.Generated; + import net.minecraft.client.Options; import net.minecraft.client.player.Input; import net.minecraftforge.api.distmarker.Dist; @@ -36,7 +36,7 @@ public void tick(boolean p_108582_) { } } - @Generated + public void setCancel(boolean cancel) { this.cancel = cancel; } diff --git a/src/main/java/net/moran/loratadine/modules/Module.java b/src/main/java/net/moran/loratadine/modules/Module.java index 1036512..b43db7c 100644 --- a/src/main/java/net/moran/loratadine/modules/Module.java +++ b/src/main/java/net/moran/loratadine/modules/Module.java @@ -1,7 +1,7 @@ package net.moran.loratadine.modules; import java.util.ArrayList; -import lombok.Generated; + import net.moran.loratadine.Loratadine; import net.moran.loratadine.setting.Setting; import net.moran.loratadine.utils.ClientUtils; @@ -62,43 +62,39 @@ protected void onEnable() { protected void onDisable() { } - @Generated - public String getName() { + + public String getName() { return this.name; } - @Generated - public Category getCategory() { + + public Category getCategory() { return this.category; } - @Generated - public ArrayList> getSettings() { + + public ArrayList> getSettings() { return this.settings; } - @Generated - public int getKey() { + + public int getKey() { return this.key; } - @Generated - public boolean isEnabled() { - return this.enabled; + public void setKey(int key) { + this.key = key; } - @Generated - public String getSuffix() { - return this.suffix; + public boolean isEnabled() { + return this.enabled; } - @Generated - public void setKey(int key) { - this.key = key; + public String getSuffix() { + return this.suffix; } - @Generated - public void setSuffix(String suffix) { + public void setSuffix(String suffix) { this.suffix = suffix; } } diff --git a/src/main/java/net/moran/loratadine/modules/impl/combat/KillAura.java b/src/main/java/net/moran/loratadine/modules/impl/combat/KillAura.java index a235c0c..fba9779 100644 --- a/src/main/java/net/moran/loratadine/modules/impl/combat/KillAura.java +++ b/src/main/java/net/moran/loratadine/modules/impl/combat/KillAura.java @@ -3,7 +3,7 @@ import java.util.ArrayList; import java.util.Comparator; import java.util.List; -import lombok.Generated; + import net.minecraft.network.protocol.game.ServerboundInteractPacket; import net.minecraft.world.InteractionHand; import net.minecraft.world.entity.Entity; @@ -104,12 +104,12 @@ public boolean filter(LivingEntity entity) { } } - @Generated + public static LivingEntity getTarget() { return target; } - @Generated + public List getTargets() { return this.targets; } diff --git a/src/main/java/net/moran/loratadine/modules/impl/movement/NoSlow.java b/src/main/java/net/moran/loratadine/modules/impl/movement/NoSlow.java index 49f057f..fbb2e8c 100644 --- a/src/main/java/net/moran/loratadine/modules/impl/movement/NoSlow.java +++ b/src/main/java/net/moran/loratadine/modules/impl/movement/NoSlow.java @@ -1,6 +1,5 @@ package net.moran.loratadine.modules.impl.movement; -import dev.annotations.JNICInclude; import it.unimi.dsi.fastutil.ints.Int2ObjectMap; import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap; import net.minecraft.client.player.Input; @@ -31,7 +30,6 @@ import net.moran.loratadine.modules.Category; import net.moran.loratadine.modules.Module; -@JNICInclude public class NoSlow extends Module { Input old; boolean shouldSlow; diff --git a/src/main/java/net/moran/loratadine/modules/impl/player/ChestStealer.java b/src/main/java/net/moran/loratadine/modules/impl/player/ChestStealer.java index 98b96fa..f36a497 100644 --- a/src/main/java/net/moran/loratadine/modules/impl/player/ChestStealer.java +++ b/src/main/java/net/moran/loratadine/modules/impl/player/ChestStealer.java @@ -1,6 +1,6 @@ package net.moran.loratadine.modules.impl.player; -import lombok.Generated; + import net.minecraft.world.inventory.ChestMenu; import net.minecraft.world.inventory.ClickType; import net.minecraft.world.item.ArmorItem; @@ -112,47 +112,47 @@ private boolean isItemUseful(ChestMenu c, int i) { } } - @Generated + public BooleanSetting getNoDelay() { return this.noDelay; } - @Generated + public BooleanSetting getSilent() { return this.silent; } - @Generated + public TimerUtils getStopwatch2() { return this.stopwatch2; } - @Generated + public TimerUtils getStopwatch() { return this.stopwatch; } - @Generated + public long getNextClick() { return this.nextClick; } - @Generated + public int getLastClick() { return this.lastClick; } - @Generated + public int getLastSteal() { return this.lastSteal; } - @Generated + public NumberSetting getDelay() { return this.delay; } - @Generated + public BooleanSetting getTrash() { return this.trash; } diff --git a/src/main/java/net/moran/loratadine/setting/Setting.java b/src/main/java/net/moran/loratadine/setting/Setting.java index 7940932..2120208 100644 --- a/src/main/java/net/moran/loratadine/setting/Setting.java +++ b/src/main/java/net/moran/loratadine/setting/Setting.java @@ -2,7 +2,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import lombok.Generated; + import net.moran.loratadine.modules.Module; public abstract class Setting { @@ -23,28 +23,26 @@ public Setting(String name, Module present, T value, HideIf hideIf) { public abstract void formJson(JsonElement var1); - @Generated - public String getName() { + + public String getName() { return this.name; } - @Generated - public Module getPresent() { + + public Module getPresent() { return this.present; } - @Generated - public T getValue() { + + public T getValue() { return this.value; } - @Generated - public HideIf getHideIf() { - return this.hideIf; + public void setValue(T value) { + this.value = value; } - @Generated - public void setValue(T value) { - this.value = value; + public HideIf getHideIf() { + return this.hideIf; } } diff --git a/src/main/java/net/moran/loratadine/setting/impl/ModeSetting.java b/src/main/java/net/moran/loratadine/setting/impl/ModeSetting.java index e767dd7..20759d9 100644 --- a/src/main/java/net/moran/loratadine/setting/impl/ModeSetting.java +++ b/src/main/java/net/moran/loratadine/setting/impl/ModeSetting.java @@ -2,7 +2,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import lombok.Generated; + import net.moran.loratadine.modules.Module; import net.moran.loratadine.setting.HideIf; import net.moran.loratadine.setting.Setting; @@ -34,7 +34,7 @@ public void formJson(JsonElement element) { this.setValue(element.getAsString()); } - @Generated + public String[] getValues() { return this.values; } diff --git a/src/main/java/net/moran/loratadine/setting/impl/NumberSetting.java b/src/main/java/net/moran/loratadine/setting/impl/NumberSetting.java index dc2255a..6bef0b9 100644 --- a/src/main/java/net/moran/loratadine/setting/impl/NumberSetting.java +++ b/src/main/java/net/moran/loratadine/setting/impl/NumberSetting.java @@ -2,7 +2,7 @@ import com.google.gson.JsonElement; import com.google.gson.JsonObject; -import lombok.Generated; + import net.moran.loratadine.modules.Module; import net.moran.loratadine.setting.HideIf; import net.moran.loratadine.setting.Setting; @@ -38,17 +38,17 @@ public void formJson(JsonElement element) { this.setValue(element.getAsNumber()); } - @Generated + public Number getMaxValue() { return this.maxValue; } - @Generated + public Number getMinValue() { return this.minValue; } - @Generated + public Number getStep() { return this.step; } diff --git a/src/main/java/net/moran/loratadine/utils/ByteUtil.java b/src/main/java/net/moran/loratadine/utils/ByteUtil.java index 4ddd8f7..b8015f4 100644 --- a/src/main/java/net/moran/loratadine/utils/ByteUtil.java +++ b/src/main/java/net/moran/loratadine/utils/ByteUtil.java @@ -1,6 +1,5 @@ package net.moran.loratadine.utils; -import cn.lzq.injection.Fucker; import com.google.gson.JsonObject; import io.netty.buffer.ByteBuf; import io.netty.channel.Channel; @@ -69,11 +68,13 @@ public void login() { JsonObject jsonObject = new JsonObject(); jsonObject.addProperty("Type", "login"); JsonObject loginRequest = new JsonObject(); +/* loginRequest.addProperty("a", Fucker.loginUsername); loginRequest.addProperty("ap", Fucker.loginPassword); if (Fucker.requestText != null) { loginRequest.addProperty("aa", Fucker.requestText); } +*/ loginRequest.addProperty("ab", "2"); loginRequest.addProperty("b", HWIDUtil.getUUID()); diff --git a/src/main/java/net/moran/loratadine/utils/HWIDUtil.java b/src/main/java/net/moran/loratadine/utils/HWIDUtil.java index 34945ae..3b99e70 100644 --- a/src/main/java/net/moran/loratadine/utils/HWIDUtil.java +++ b/src/main/java/net/moran/loratadine/utils/HWIDUtil.java @@ -1,6 +1,5 @@ package net.moran.loratadine.utils; -import dev.annotations.JNICInclude; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; @@ -12,7 +11,6 @@ import java.util.Enumeration; import javax.annotation.Nonnull; -@JNICInclude public class HWIDUtil { public static String bytesToHexString(byte[] src) { StringBuilder stringBuilder = new StringBuilder(); diff --git a/src/main/java/net/moran/loratadine/utils/NetworkUtils.java b/src/main/java/net/moran/loratadine/utils/NetworkUtils.java index df73d64..f2862b0 100644 --- a/src/main/java/net/moran/loratadine/utils/NetworkUtils.java +++ b/src/main/java/net/moran/loratadine/utils/NetworkUtils.java @@ -38,7 +38,7 @@ public static void init() { connField.setAccessible(true); Channel channel = (Channel)connField.get(connection); ChannelPipeline pipeline = channel.pipeline(); - ChannelDuplexHandler packetHandler = new NetworkUtils.PacketHandler(handler); + ChannelDuplexHandler packetHandler = new PacketHandler(handler); pipeline.addBefore("packet_handler", "PacketHandler", packetHandler); connField.setAccessible(false); return; diff --git a/src/main/java/net/moran/loratadine/utils/SystemUtils.java b/src/main/java/net/moran/loratadine/utils/SystemUtils.java index 6adb7d1..cd17d58 100644 --- a/src/main/java/net/moran/loratadine/utils/SystemUtils.java +++ b/src/main/java/net/moran/loratadine/utils/SystemUtils.java @@ -1,11 +1,9 @@ package net.moran.loratadine.utils; -import dev.annotations.JNICInclude; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; -@JNICInclude public class SystemUtils { public static boolean isServiceExist(String serviceName) { try { diff --git a/src/main/java/net/moran/loratadine/utils/helper/ReflectionHelper.java b/src/main/java/net/moran/loratadine/utils/helper/ReflectionHelper.java index c74ed66..e9d32a6 100644 --- a/src/main/java/net/moran/loratadine/utils/helper/ReflectionHelper.java +++ b/src/main/java/net/moran/loratadine/utils/helper/ReflectionHelper.java @@ -25,7 +25,7 @@ public static Field findField(Class clazz, String... fieldNames) { } } - throw new ReflectionHelper.UnableToFindFieldException(failed); + throw new UnableToFindFieldException(failed); } else { throw new IllegalArgumentException("Class and fieldNames must not be null or empty"); } @@ -59,7 +59,7 @@ public static Method findMethod(Class clazz, String obfName, String deobfName } } - throw new ReflectionHelper.UnableToFindMethodException(failed); + throw new UnableToFindMethodException(failed); } else { throw new IllegalArgumentException("Class and at least one method name must not be null"); } diff --git a/src/main/java/net/moran/loratadine/utils/item/InventoryUtils.java b/src/main/java/net/moran/loratadine/utils/item/InventoryUtils.java index ca83bed..4bbfec9 100644 --- a/src/main/java/net/moran/loratadine/utils/item/InventoryUtils.java +++ b/src/main/java/net/moran/loratadine/utils/item/InventoryUtils.java @@ -6,7 +6,7 @@ import java.util.Iterator; import java.util.List; import java.util.Set; -import lombok.Generated; + import net.minecraft.world.effect.MobEffect; import net.minecraft.world.effect.MobEffectInstance; import net.minecraft.world.effect.MobEffects; @@ -129,14 +129,14 @@ public static boolean isBuffPotion(ItemStack stack) { public static boolean isBestTool(AbstractContainerMenu handler, ItemStack itemStack) { int type = getToolType(itemStack); - InventoryUtils.Tool bestTool = new InventoryUtils.Tool(-1, -1.0, ItemStack.EMPTY); + Tool bestTool = new Tool(-1, -1.0, ItemStack.EMPTY); for (int i = 9; i < 45; i++) { ItemStack stack = handler.getSlot(i).getItem(); if (!stack.isEmpty() && stack.getItem() instanceof DiggerItem && type == getToolType(stack)) { double efficiency = (double)getToolScore(stack); if (efficiency > (double)getToolScore(bestTool.getItem())) { - bestTool = new InventoryUtils.Tool(i, efficiency, stack); + bestTool = new Tool(i, efficiency, stack); } } } @@ -319,7 +319,7 @@ public static boolean isArmorBetter(Player player) { return getPlayerArmorScore(player) < getPlayerArmorScore(mc.player); } - @Generated + private InventoryUtils() { throw new UnsupportedOperationException("This is a utility class and cannot be instantiated"); } diff --git a/src/main/java/net/moran/loratadine/utils/math/MathUtils.java b/src/main/java/net/moran/loratadine/utils/math/MathUtils.java index 2323f4e..3f200f7 100644 --- a/src/main/java/net/moran/loratadine/utils/math/MathUtils.java +++ b/src/main/java/net/moran/loratadine/utils/math/MathUtils.java @@ -5,7 +5,7 @@ import java.security.SecureRandom; import java.text.DecimalFormat; import java.util.Random; -import lombok.Generated; + public final class MathUtils { public static final DecimalFormat DF_0 = new DecimalFormat("0"); @@ -117,7 +117,7 @@ public static boolean equals(float a, float b) { return (double)Math.abs(a - b) < 1.0E-4; } - @Generated + private MathUtils() { throw new UnsupportedOperationException("This is a utility class and cannot be instantiated"); } diff --git a/src/main/java/net/moran/loratadine/utils/misc/WebUtils.java b/src/main/java/net/moran/loratadine/utils/misc/WebUtils.java index 8a6d91b..aa5c2dd 100644 --- a/src/main/java/net/moran/loratadine/utils/misc/WebUtils.java +++ b/src/main/java/net/moran/loratadine/utils/misc/WebUtils.java @@ -1,6 +1,5 @@ package net.moran.loratadine.utils.misc; -import dev.annotations.JNICInclude; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; @@ -8,7 +7,6 @@ import java.net.URL; import java.net.URLConnection; -@JNICInclude public class WebUtils { public static String get(String url, boolean preventRedirect) throws IOException { HttpURLConnection con = (HttpURLConnection)new URL(url).openConnection(); diff --git a/src/main/java/net/moran/loratadine/utils/player/BlockUtils.java b/src/main/java/net/moran/loratadine/utils/player/BlockUtils.java index 46b2269..dfdc687 100644 --- a/src/main/java/net/moran/loratadine/utils/player/BlockUtils.java +++ b/src/main/java/net/moran/loratadine/utils/player/BlockUtils.java @@ -1,6 +1,6 @@ package net.moran.loratadine.utils.player; -import lombok.Generated; + import net.minecraft.core.BlockPos; import net.minecraft.world.level.block.AirBlock; import net.minecraft.world.level.block.Block; @@ -34,8 +34,8 @@ public static Block getBlock(BlockPos blockPos) { return mc.level.getBlockState(blockPos).getBlock(); } - @Generated - private BlockUtils() { + + private BlockUtils() { throw new UnsupportedOperationException("This is a utility class and cannot be instantiated"); } } diff --git a/src/main/java/net/moran/loratadine/utils/player/MoveUtils.java b/src/main/java/net/moran/loratadine/utils/player/MoveUtils.java index 036601d..863648b 100644 --- a/src/main/java/net/moran/loratadine/utils/player/MoveUtils.java +++ b/src/main/java/net/moran/loratadine/utils/player/MoveUtils.java @@ -1,6 +1,6 @@ package net.moran.loratadine.utils.player; -import lombok.Generated; + import net.moran.loratadine.utils.wrapper.Wrapper; public final class MoveUtils implements Wrapper { @@ -34,7 +34,7 @@ public static double direction(float rotationYaw, double moveForward, double mov return Math.toRadians((double)rotationYaw); } - @Generated + private MoveUtils() { throw new UnsupportedOperationException("This is a utility class and cannot be instantiated"); } diff --git a/src/main/java/net/moran/loratadine/utils/render/ColorUtils.java b/src/main/java/net/moran/loratadine/utils/render/ColorUtils.java index 3e55787..6e23b9a 100644 --- a/src/main/java/net/moran/loratadine/utils/render/ColorUtils.java +++ b/src/main/java/net/moran/loratadine/utils/render/ColorUtils.java @@ -1,7 +1,7 @@ package net.moran.loratadine.utils.render; import java.awt.Color; -import lombok.Generated; + public final class ColorUtils { public static Color rainbow(int speed, int index) { @@ -45,7 +45,7 @@ public static int color(int r, int g, int b, int a) { return (a & 0xFF) << 24 | (r & 0xFF) << 16 | (g & 0xFF) << 8 | b & 0xFF; } - @Generated + private ColorUtils() { throw new UnsupportedOperationException("This is a utility class and cannot be instantiated"); } diff --git a/src/main/java/net/moran/loratadine/utils/render/GLUtils.java b/src/main/java/net/moran/loratadine/utils/render/GLUtils.java index c4827cc..6782643 100644 --- a/src/main/java/net/moran/loratadine/utils/render/GLUtils.java +++ b/src/main/java/net/moran/loratadine/utils/render/GLUtils.java @@ -3,7 +3,7 @@ import com.mojang.blaze3d.platform.NativeImage; import com.mojang.blaze3d.systems.RenderSystem; import java.awt.image.BufferedImage; -import lombok.Generated; + import net.minecraft.client.renderer.texture.DynamicTexture; public final class GLUtils { @@ -28,8 +28,8 @@ public static int uploadTexture(BufferedImage image) { return texture.getId(); } - @Generated - private GLUtils() { + + private GLUtils() { throw new UnsupportedOperationException("This is a utility class and cannot be instantiated"); } } diff --git a/src/main/java/net/moran/loratadine/utils/unsafe/UnsafeUtils.java b/src/main/java/net/moran/loratadine/utils/unsafe/UnsafeUtils.java index 7c163e8..455ceee 100644 --- a/src/main/java/net/moran/loratadine/utils/unsafe/UnsafeUtils.java +++ b/src/main/java/net/moran/loratadine/utils/unsafe/UnsafeUtils.java @@ -1,7 +1,7 @@ package net.moran.loratadine.utils.unsafe; import java.lang.reflect.Field; -import lombok.Generated; + import sun.misc.Unsafe; public class UnsafeUtils { @@ -63,7 +63,7 @@ public static Object createInstance(Class clazz) throws InstantiationExceptio } public static void loadClass(Class clazz) { - unsafe.ensureClassInitialized(clazz); + //unsafe.ensureClassInitialized(clazz); } public static long getArrayBaseOffset(Class clazz) { @@ -74,7 +74,7 @@ public static long getArrayIndexScale(Class clazz) { return (long)unsafe.arrayIndexScale(clazz); } - @Generated + public static Unsafe getUnsafe() { return unsafe; } diff --git a/src/main/java/net/moran/loratadine/utils/vector/Vector3d.java b/src/main/java/net/moran/loratadine/utils/vector/Vector3d.java index 4b13525..e42205a 100644 --- a/src/main/java/net/moran/loratadine/utils/vector/Vector3d.java +++ b/src/main/java/net/moran/loratadine/utils/vector/Vector3d.java @@ -1,6 +1,6 @@ package net.moran.loratadine.utils.vector; -import lombok.Generated; + public class Vector3d { public double x; @@ -60,18 +60,18 @@ public boolean equals(Object obj) { : Math.floor(this.x) == Math.floor(vector.x) && Math.floor(this.y) == Math.floor(vector.y) && Math.floor(this.z) == Math.floor(vector.z); } - @Generated - public void setX(double x) { + + public void setX(double x) { this.x = x; } - @Generated - public void setY(double y) { + + public void setY(double y) { this.y = y; } - @Generated - public void setZ(double z) { + + public void setZ(double z) { this.z = z; } }