From b231e5e3d60dff1b330f54433328672bf509a33e Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Thu, 31 Aug 2023 18:57:48 +0700 Subject: [PATCH] fix Lol --- .../land/chipmunk/chipmunkmod/modules/CommandCore.java | 8 +++++++- 1 file changed, 7 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 c1a9309..0f5a26c 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java +++ b/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java @@ -71,7 +71,7 @@ public class CommandCore { public void move (Vec3d position) { final ClientWorld world = client.world; - if (world == null) return; + if (world == null || noPos == null) return; final DimensionType dimension = world.getDimension(); @@ -125,6 +125,8 @@ public class CommandCore { } public void incrementCurrentBlock () { + if (withPos == null) return; + final BlockPos start = withPos.start; final BlockPos end = withPos.end; @@ -158,6 +160,8 @@ public class CommandCore { public void run (String command) { final ClientConnection connection = client.getNetworkHandler().getConnection(); + if (block == null) return; + if (KaboomCheck.INSTANCE.isKaboom) { connection.send( new UpdateCommandBlockC2SPacket( @@ -199,6 +203,8 @@ public class CommandCore { public CompletableFuture runTracked (String command) { final ClientConnection connection = client.getNetworkHandler().getConnection(); + if (block == null) return new CompletableFuture<>(); + if (KaboomCheck.INSTANCE.isKaboom) { connection.send( new UpdateCommandBlockC2SPacket(