From ea16395c15b0240831f88af354a386c488eea02a Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+chomens@users.noreply.github.com> Date: Sat, 19 Apr 2025 09:23:28 +0700 Subject: [PATCH] fix: try to fix maddy's spam (doesn't do much..) yes i'm also planning to create deploy core, which should evade all cspy spams, but i'm not sure how well that will perform in a minecraft client my another plan is to only fill the core only when it's needed, like only when the chat is open (for custom chat), or when there's a cloop running --- .../land/chipmunk/chipmunkmod/modules/CommandCore.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java b/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java index 223f1f2..e47c66e 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java +++ b/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java @@ -16,6 +16,7 @@ import net.minecraft.network.packet.c2s.play.UpdateCommandBlockC2SPacket; import net.minecraft.util.math.BlockBox; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; +import net.minecraft.world.chunk.Chunk; import net.minecraft.world.dimension.DimensionType; import java.util.Timer; @@ -162,7 +163,11 @@ public class CommandCore { } public void refill () { - if (!runFillCommand || withPos == null) return; + if (!runFillCommand || client.world == null || withPos == null) return; + + final Chunk chunk = client.world.getChunk(withPos.getCenter()); + + if (chunk == null) return; final String command = String.format( "fill %s %s %s %s %s %s command_block",