From 9260fb46b28ce938858ea2b9dd6f39a5c3f5cb3a Mon Sep 17 00:00:00 2001 From: blackilykat Date: Mon, 4 Nov 2024 22:40:19 +0100 Subject: [PATCH] Add custom chat to gui --- .../commands/CustomChatCommand.java | 2 ++ .../chipmunkmod/commands/SelfCareCommand.java | 19 +++++++----------- .../chipmunkmod/mixin/ChatHudMixin.java | 5 ++--- .../mixin/ClientConnectionMixin.java | 3 +-- .../ElderGuardianAppearanceParticleMixin.java | 2 +- .../chipmunkmod/mixin/FontStorageMixin.java | 6 +++--- .../chipmunkmod/mixin/WorldRendererMixin.java | 4 ++-- .../chipmunkmod/modules/SelfCare.java | 4 ++-- .../chipmunkmod/testclient/gui/Gui.java | 18 ++++++++--------- .../anti_annoyances/AntiChatSpamModule.java | 12 +++++------ .../anti_annoyances/SelfCareModule.java | 2 +- .../modules/fun/CustomChatModule.java | 20 +++++++++++++++++++ .../modules/fun/RainbowNameModule.java | 3 +-- .../AntiParticleKickModule.java | 2 +- .../AntiTextObfuscationLagModule.java | 2 +- .../BlockGuardianParticlesModule.java | 2 +- 16 files changed, 59 insertions(+), 47 deletions(-) create mode 100644 src/main/java/land/chipmunk/chipmunkmod/testclient/modules/fun/CustomChatModule.java diff --git a/src/main/java/land/chipmunk/chipmunkmod/commands/CustomChatCommand.java b/src/main/java/land/chipmunk/chipmunkmod/commands/CustomChatCommand.java index bb1696c..fe47632 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/commands/CustomChatCommand.java +++ b/src/main/java/land/chipmunk/chipmunkmod/commands/CustomChatCommand.java @@ -4,6 +4,7 @@ import com.mojang.brigadier.Command; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.context.CommandContext; import land.chipmunk.chipmunkmod.modules.CustomChat; +import land.chipmunk.chipmunkmod.testclient.modules.fun.CustomChatModule; import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource; import net.minecraft.text.Text; @@ -39,6 +40,7 @@ public class CustomChatCommand { final FabricClientCommandSource source = context.getSource(); final boolean bool = getBool(context, "boolean"); CustomChat.INSTANCE.enabled = bool; + CustomChatModule.INSTANCE.isEnabled = bool; source.sendFeedback(Text.literal("Custom chat is now " + (bool ? "on" : "off"))); return Command.SINGLE_SUCCESS; diff --git a/src/main/java/land/chipmunk/chipmunkmod/commands/SelfCareCommand.java b/src/main/java/land/chipmunk/chipmunkmod/commands/SelfCareCommand.java index 3b2b6a4..d30ef59 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/commands/SelfCareCommand.java +++ b/src/main/java/land/chipmunk/chipmunkmod/commands/SelfCareCommand.java @@ -1,21 +1,16 @@ package land.chipmunk.chipmunkmod.commands; -import com.mojang.authlib.GameProfile; import com.mojang.brigadier.Command; import com.mojang.brigadier.CommandDispatcher; import com.mojang.brigadier.arguments.StringArgumentType; import com.mojang.brigadier.context.CommandContext; -import com.mojang.brigadier.context.SuggestionContext; import land.chipmunk.chipmunkmod.ChipmunkMod; -import land.chipmunk.chipmunkmod.Configuration; import land.chipmunk.chipmunkmod.modules.SelfCare; import land.chipmunk.chipmunkmod.testclient.modules.anti_annoyances.SelfCareModule; import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource; import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.ClientPlayNetworkHandler; import net.minecraft.client.network.PlayerListEntry; -import net.minecraft.client.network.ServerInfo; -import net.minecraft.server.ServerMetadata; import net.minecraft.text.Text; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -73,11 +68,11 @@ public class SelfCareCommand { SelfCare.INSTANCE.hasSkin = false; SelfCare.INSTANCE.skin = skin; if(skin.equals("off")) { - SelfCareModule.instance.skinOption.setOptionValue(false); + SelfCareModule.INSTANCE.skinOption.setOptionValue(false); source.sendFeedback(Text.literal("Disabled skin self care")); } else { - SelfCareModule.instance.skinOption.setOptionValue(true); - SelfCareModule.instance.skinUsernameOption.setOptionValue(skin); + SelfCareModule.INSTANCE.skinOption.setOptionValue(true); + SelfCareModule.INSTANCE.skinUsernameOption.setOptionValue(skin); source.sendFeedback(Text.literal("Skin self care enabled for " + skin + "'s skin")); } @@ -124,22 +119,22 @@ public class SelfCareCommand { switch (type) { case "op" -> { SelfCare.INSTANCE.opEnabled = bool; - SelfCareModule.instance.opOption.setOptionValue(bool); + SelfCareModule.INSTANCE.opOption.setOptionValue(bool); source.sendFeedback(Text.literal("The op self care is now " + (bool ? "enabled" : "disabled"))); } case "gamemode" -> { SelfCare.INSTANCE.gamemodeEnabled = bool; - SelfCareModule.instance.gmcOption.setOptionValue(bool); + SelfCareModule.INSTANCE.gmcOption.setOptionValue(bool); source.sendFeedback(Text.literal("The gamemode self care is now " + (bool ? "enabled" : "disabled"))); } case "cspy" -> { SelfCare.INSTANCE.cspyEnabled = bool; - SelfCareModule.instance.cspyOption.setOptionValue(bool); + SelfCareModule.INSTANCE.cspyOption.setOptionValue(bool); source.sendFeedback(Text.literal("The CommandSpy self care is now " + (bool ? "enabled" : "disabled"))); } case "icu" -> { SelfCare.INSTANCE.icuEnabled = bool; - SelfCareModule.instance.icuOption.setOptionValue(bool); + SelfCareModule.INSTANCE.icuOption.setOptionValue(bool); source.sendFeedback(Text.literal("The iControlU self care is now " + (bool ? "enabled" : "disabled"))); } } diff --git a/src/main/java/land/chipmunk/chipmunkmod/mixin/ChatHudMixin.java b/src/main/java/land/chipmunk/chipmunkmod/mixin/ChatHudMixin.java index 1e72591..3f63edf 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/mixin/ChatHudMixin.java +++ b/src/main/java/land/chipmunk/chipmunkmod/mixin/ChatHudMixin.java @@ -22,7 +22,6 @@ import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import org.spongepowered.asm.mixin.injection.callback.LocalCapture; @Mixin(net.minecraft.client.gui.hud.ChatHud.class) public abstract class ChatHudMixin { @@ -72,7 +71,7 @@ public abstract class ChatHudMixin { @Inject(at = @At("HEAD"), method = "addMessage(Lnet/minecraft/text/Text;Lnet/minecraft/network/message/MessageSignatureData;Lnet/minecraft/client/gui/hud/MessageIndicator;)V", cancellable = true) public void chipmunkmod$generalAddMessageMixin(Text message, MessageSignatureData signatureData, MessageIndicator indicator, CallbackInfo ci) { ChatHudLine chatHudLine = new ChatHudLine(this.client.inGameHud.getTicks(), message, signatureData, indicator); - if(AntiChatSpamModule.instance.isEnabled && message.equals(AntiChatSpamModule.latestPassedThroughMessage)) { + if(AntiChatSpamModule.INSTANCE.isEnabled && message.equals(AntiChatSpamModule.latestPassedThroughMessage)) { AntiChatSpamModule.latestPassedThroughMessage = Text.empty(); customLogChatMessage(chatHudLine); addVisibleMessage(chatHudLine); @@ -102,7 +101,7 @@ public abstract class ChatHudMixin { // if(pattern.pattern().matcher(message.getString()).matches()) ci.cancel(); // } // ChipmunkMod.LOGGER.info("gex3"); - if(AntiChatSpamModule.instance.isEnabled) { + if(AntiChatSpamModule.INSTANCE.isEnabled) { Executor.antiChatSpamService.submit(() -> { try { Debug.debug("started a run or wahever", "AntiChatSpam.addMessage.future"); diff --git a/src/main/java/land/chipmunk/chipmunkmod/mixin/ClientConnectionMixin.java b/src/main/java/land/chipmunk/chipmunkmod/mixin/ClientConnectionMixin.java index 7e27484..e187583 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/mixin/ClientConnectionMixin.java +++ b/src/main/java/land/chipmunk/chipmunkmod/mixin/ClientConnectionMixin.java @@ -1,7 +1,6 @@ package land.chipmunk.chipmunkmod.mixin; import io.netty.channel.ChannelHandlerContext; -import io.netty.handler.codec.DecoderException; import land.chipmunk.chipmunkmod.listeners.Listener; import land.chipmunk.chipmunkmod.listeners.ListenerManager; import land.chipmunk.chipmunkmod.testclient.modules.lag_prevention.AntiParticleKickModule; @@ -56,7 +55,7 @@ public class ClientConnectionMixin { // mabe mabe mabe // lol i had my own im just gonna cop ypaste that :D if(packet instanceof ParticleS2CPacket) { - if(AntiParticleKickModule.instance.isEnabled && ((ParticleS2CPacket) packet).getCount()>1000) { + if(AntiParticleKickModule.INSTANCE.isEnabled && ((ParticleS2CPacket) packet).getCount()>1000) { if(((ParticleS2CPacket) packet).getCount()>1000) Chat.sendGold("ChipmunkMod prevented a particle kick!"); ci.cancel(); } diff --git a/src/main/java/land/chipmunk/chipmunkmod/mixin/ElderGuardianAppearanceParticleMixin.java b/src/main/java/land/chipmunk/chipmunkmod/mixin/ElderGuardianAppearanceParticleMixin.java index 79a435c..2a9de01 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/mixin/ElderGuardianAppearanceParticleMixin.java +++ b/src/main/java/land/chipmunk/chipmunkmod/mixin/ElderGuardianAppearanceParticleMixin.java @@ -15,7 +15,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; public class ElderGuardianAppearanceParticleMixin { @Inject(method = "createParticle(Lnet/minecraft/particle/SimpleParticleType;Lnet/minecraft/client/world/ClientWorld;DDDDDD)Lnet/minecraft/client/particle/Particle;", at = @At("HEAD"), cancellable = true) private void testClient$limitGuardianParticles(SimpleParticleType defaultParticleType, ClientWorld clientWorld, double d, double e, double f, double g, double h, double i, CallbackInfoReturnable cir) { - if(BlockGuardianParticlesModule.instance.isEnabled || SharedVariables.elderGuardianParticleTimer > 0) { + if(BlockGuardianParticlesModule.INSTANCE.isEnabled || SharedVariables.elderGuardianParticleTimer > 0) { cir.setReturnValue(null); cir.cancel(); } diff --git a/src/main/java/land/chipmunk/chipmunkmod/mixin/FontStorageMixin.java b/src/main/java/land/chipmunk/chipmunkmod/mixin/FontStorageMixin.java index eb664ba..72d7f9c 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/mixin/FontStorageMixin.java +++ b/src/main/java/land/chipmunk/chipmunkmod/mixin/FontStorageMixin.java @@ -18,9 +18,9 @@ public class FontStorageMixin { @Inject(method = "getObfuscatedGlyphRenderer", at = @At("HEAD"), cancellable = true) private void chipmunkmod$preventObfuscatedGlyphLag(Glyph glyph, CallbackInfoReturnable cir) { - if(!AntiTextObfuscationLagModule.instance.isEnabled) return; - if(AntiTextObfuscationLagModule.instance.exceededLimitThisTick || Instant.now().toEpochMilli() - AntiTextObfuscationLagModule.instance.renderTimeStart.toEpochMilli() > 18) { - AntiTextObfuscationLagModule.instance.exceededLimitThisTick = true; + if(!AntiTextObfuscationLagModule.INSTANCE.isEnabled) return; + if(AntiTextObfuscationLagModule.INSTANCE.exceededLimitThisTick || Instant.now().toEpochMilli() - AntiTextObfuscationLagModule.INSTANCE.renderTimeStart.toEpochMilli() > 18) { + AntiTextObfuscationLagModule.INSTANCE.exceededLimitThisTick = true; cir.setReturnValue(blankGlyphRenderer); } // Debug.debug("Render time: "+(Instant.now().toEpochMilli() - AntiTextObfuscationLagModule.instance.renderTimeStart.toEpochMilli()), "AntiTextObfuscationLag.mixin"); diff --git a/src/main/java/land/chipmunk/chipmunkmod/mixin/WorldRendererMixin.java b/src/main/java/land/chipmunk/chipmunkmod/mixin/WorldRendererMixin.java index 7796d43..b1be024 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/mixin/WorldRendererMixin.java +++ b/src/main/java/land/chipmunk/chipmunkmod/mixin/WorldRendererMixin.java @@ -13,7 +13,7 @@ import java.time.Instant; public class WorldRendererMixin { @Inject(method = "render", at = @At("HEAD")) private void chipmunkmod$saveRenderStartTime(CallbackInfo ci) { - AntiTextObfuscationLagModule.instance.renderTimeStart = Instant.now(); - AntiTextObfuscationLagModule.instance.exceededLimitThisTick = false; + AntiTextObfuscationLagModule.INSTANCE.renderTimeStart = Instant.now(); + AntiTextObfuscationLagModule.INSTANCE.exceededLimitThisTick = false; } } diff --git a/src/main/java/land/chipmunk/chipmunkmod/modules/SelfCare.java b/src/main/java/land/chipmunk/chipmunkmod/modules/SelfCare.java index e22210e..e703753 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/modules/SelfCare.java +++ b/src/main/java/land/chipmunk/chipmunkmod/modules/SelfCare.java @@ -112,7 +112,7 @@ public class SelfCare extends Listener { cleanup(); return; } - if(!SelfCareModule.instance.isEnabled) return; + if(!SelfCareModule.INSTANCE.isEnabled) return; final ClientPlayerEntity player = client.player; if (player != null && !player.hasPermissionLevel(2) && opEnabled) { if (serverHasCommand("op")) networkHandler.sendChatCommand("op @s[type=player]"); } @@ -121,7 +121,7 @@ public class SelfCare extends Listener { } public void chatTick () { - if(!SelfCareModule.instance.isEnabled) return; + if(!SelfCareModule.INSTANCE.isEnabled) return; final ClientPlayNetworkHandler networkHandler = client.getNetworkHandler(); if (!cspy && cspyEnabled) { if (serverHasCommand("c")) networkHandler.sendChatCommand("c on"); } diff --git a/src/main/java/land/chipmunk/chipmunkmod/testclient/gui/Gui.java b/src/main/java/land/chipmunk/chipmunkmod/testclient/gui/Gui.java index 5de1cb6..bde1daf 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/testclient/gui/Gui.java +++ b/src/main/java/land/chipmunk/chipmunkmod/testclient/gui/Gui.java @@ -1,10 +1,10 @@ package land.chipmunk.chipmunkmod.testclient.gui; -import land.chipmunk.chipmunkmod.testclient.gui.components.Module; import land.chipmunk.chipmunkmod.ChipmunkMod; import land.chipmunk.chipmunkmod.testclient.gui.components.Category; import land.chipmunk.chipmunkmod.testclient.modules.anti_annoyances.AntiChatSpamModule; import land.chipmunk.chipmunkmod.testclient.modules.anti_annoyances.SelfCareModule; +import land.chipmunk.chipmunkmod.testclient.modules.fun.CustomChatModule; import land.chipmunk.chipmunkmod.testclient.modules.fun.RainbowNameModule; import land.chipmunk.chipmunkmod.testclient.modules.lag_prevention.AntiParticleKickModule; import land.chipmunk.chipmunkmod.testclient.modules.lag_prevention.AntiTextObfuscationLagModule; @@ -162,21 +162,19 @@ Gui extends Screen{ public static void addComponents() { new Category("Lag prevention") - .withModule(AntiParticleKickModule.instance) //TODO: make kick prevention module - .withModule(BlockGuardianParticlesModule.instance) - .withModule(AntiTextObfuscationLagModule.instance) + .withModule(AntiParticleKickModule.INSTANCE) + .withModule(BlockGuardianParticlesModule.INSTANCE) + .withModule(AntiTextObfuscationLagModule.INSTANCE) .register(); new Category("Anti annoyances") - .withModule(AntiChatSpamModule.instance) + .withModule(AntiChatSpamModule.INSTANCE) .withModule(new AntiTeleportModule()) - .withModule(SelfCareModule.instance) + .withModule(SelfCareModule.INSTANCE) .register(); new Category("Fun") - .withModule(RainbowNameModule.instance) + .withModule(RainbowNameModule.INSTANCE) + .withModule(CustomChatModule.INSTANCE) .register(); -// new Category("OP") -// .withModule(AutoOpModule.instance) //TODO: make selfcare module -// .register(); } diff --git a/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/anti_annoyances/AntiChatSpamModule.java b/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/anti_annoyances/AntiChatSpamModule.java index 12c5a54..5be2822 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/anti_annoyances/AntiChatSpamModule.java +++ b/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/anti_annoyances/AntiChatSpamModule.java @@ -11,14 +11,14 @@ import org.apache.commons.text.similarity.LevenshteinDistance; import java.util.ArrayList; public class AntiChatSpamModule extends Module { - public static Text latestPassedThroughMessage = Text.empty(); - public static AntiChatSpamModule instance = new AntiChatSpamModule(); - public ArrayList messages = new ArrayList<>(); + public static final AntiChatSpamModule INSTANCE = new AntiChatSpamModule(); private static final String debugCallerPrefix = "AntiChatSpam."; private static final String debugTickedCaller = debugCallerPrefix + "tick"; private static final String debugLevenshteinDistanceCaller = debugCallerPrefix + "levenshtein_distance"; private static final String debugLevenshteinDistanceCallerSpamless = debugCallerPrefix + "levenshtein_distance_spamless"; private static final String debugLevenshteinDistanceCallerSpamful = debugCallerPrefix + "levenshtein_distance_spamful"; + public static Text latestPassedThroughMessage = Text.empty(); + public ArrayList messages = new ArrayList<>(); public AntiChatSpamModule() { super("Anti chat spam"); @@ -44,7 +44,7 @@ public class AntiChatSpamModule extends Module { this.content = content; Debug.debug("AAAA", debugLevenshteinDistanceCallerSpamful); - ArrayList chatMessages = instance.messages; + ArrayList chatMessages = INSTANCE.messages; Debug.debug("AAAA", debugLevenshteinDistanceCallerSpamful); int similarMessages = 0; Debug.debug("AAAA", debugLevenshteinDistanceCallerSpamful); @@ -80,7 +80,7 @@ public class AntiChatSpamModule extends Module { Debug.debug("CCCC", debugLevenshteinDistanceCallerSpamful); Debug.debug("Hidden: " + hidden, debugLevenshteinDistanceCaller); Debug.debug("Hidden: " + hidden, debugLevenshteinDistanceCallerSpamless); - instance.messages.add(this); + INSTANCE.messages.add(this); Debug.debug("CCCC", debugLevenshteinDistanceCallerSpamful); // threadQueue.add(() -> { // // code above used to be here but i cant decide if i should show it or not depending on the thread cuz i cant make it wait @@ -90,7 +90,7 @@ public class AntiChatSpamModule extends Module { public void tick() { timer--; - if (timer <= 0) instance.messages.remove(this); + if (timer <= 0) INSTANCE.messages.remove(this); } } } \ No newline at end of file diff --git a/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/anti_annoyances/SelfCareModule.java b/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/anti_annoyances/SelfCareModule.java index f12ca85..519b194 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/anti_annoyances/SelfCareModule.java +++ b/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/anti_annoyances/SelfCareModule.java @@ -7,7 +7,7 @@ import land.chipmunk.chipmunkmod.testclient.gui.components.options.BooleanCheckb import land.chipmunk.chipmunkmod.testclient.gui.components.options.StringOption; public class SelfCareModule extends Module { - public static SelfCareModule instance = new SelfCareModule(); + public static final SelfCareModule INSTANCE = new SelfCareModule(); public BooleanCheckboxOption opOption = new BooleanCheckboxOption( "OP", SelfCare.INSTANCE.opEnabled, diff --git a/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/fun/CustomChatModule.java b/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/fun/CustomChatModule.java new file mode 100644 index 0000000..7839d75 --- /dev/null +++ b/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/fun/CustomChatModule.java @@ -0,0 +1,20 @@ +package land.chipmunk.chipmunkmod.testclient.modules.fun; + +import land.chipmunk.chipmunkmod.modules.CustomChat; +import land.chipmunk.chipmunkmod.testclient.gui.components.Module; + +public class CustomChatModule extends Module { + public static final CustomChatModule INSTANCE = new CustomChatModule(); + + // no format option cause horrors + + public CustomChatModule() { + super("Custom chat"); + onActivate(() -> { + CustomChat.INSTANCE.enabled = true; + }); + onDeactivate(() -> { + CustomChat.INSTANCE.enabled = false; + }); + } +} diff --git a/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/fun/RainbowNameModule.java b/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/fun/RainbowNameModule.java index cad60e0..08b19a8 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/fun/RainbowNameModule.java +++ b/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/fun/RainbowNameModule.java @@ -8,11 +8,10 @@ import land.chipmunk.chipmunkmod.testclient.gui.components.options.IntSliderOpti import net.minecraft.client.MinecraftClient; import net.minecraft.client.font.TextRenderer; import net.minecraft.client.gui.widget.TextWidget; -import net.minecraft.text.MutableText; import net.minecraft.text.Text; public class RainbowNameModule extends Module { - public static RainbowNameModule instance = new RainbowNameModule(); + public static final RainbowNameModule INSTANCE = new RainbowNameModule(); public static DoubleSliderOption speedOption; public static IntSliderOption saturationOption; public static IntSliderOption valueOption; diff --git a/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/lag_prevention/AntiParticleKickModule.java b/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/lag_prevention/AntiParticleKickModule.java index b0ad475..ff3e24f 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/lag_prevention/AntiParticleKickModule.java +++ b/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/lag_prevention/AntiParticleKickModule.java @@ -3,7 +3,7 @@ package land.chipmunk.chipmunkmod.testclient.modules.lag_prevention; import land.chipmunk.chipmunkmod.testclient.gui.components.Module; public class AntiParticleKickModule extends Module { - public static AntiParticleKickModule instance = new AntiParticleKickModule(); + public static final AntiParticleKickModule INSTANCE = new AntiParticleKickModule(); public AntiParticleKickModule() { super("Anti particle crash"); diff --git a/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/lag_prevention/AntiTextObfuscationLagModule.java b/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/lag_prevention/AntiTextObfuscationLagModule.java index 59029b5..8a1afb3 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/lag_prevention/AntiTextObfuscationLagModule.java +++ b/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/lag_prevention/AntiTextObfuscationLagModule.java @@ -5,7 +5,7 @@ import land.chipmunk.chipmunkmod.testclient.gui.components.Module; import java.time.Instant; public class AntiTextObfuscationLagModule extends Module { - public static AntiTextObfuscationLagModule instance = new AntiTextObfuscationLagModule(); + public static final AntiTextObfuscationLagModule INSTANCE = new AntiTextObfuscationLagModule(); public Instant renderTimeStart = Instant.now(); public boolean exceededLimitThisTick = false; public AntiTextObfuscationLagModule() { diff --git a/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/lag_prevention/BlockGuardianParticlesModule.java b/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/lag_prevention/BlockGuardianParticlesModule.java index 1578653..09dfaad 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/lag_prevention/BlockGuardianParticlesModule.java +++ b/src/main/java/land/chipmunk/chipmunkmod/testclient/modules/lag_prevention/BlockGuardianParticlesModule.java @@ -5,7 +5,7 @@ import land.chipmunk.chipmunkmod.testclient.gui.components.options.StringOption; import land.chipmunk.chipmunkmod.util.Chat; public class BlockGuardianParticlesModule extends Module { - public static BlockGuardianParticlesModule instance = new BlockGuardianParticlesModule(); + public static final BlockGuardianParticlesModule INSTANCE = new BlockGuardianParticlesModule(); public BlockGuardianParticlesModule() { super("No guardian particles");