From 6dc1c26a85496ded8b3302077c36240a34513fee Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+chomens@users.noreply.github.com> Date: Thu, 8 Jan 2026 17:25:14 +0700 Subject: [PATCH] fix: 1000 years old core issue fixed with simple math function (hopefully) --- .../java/land/chipmunk/chipmunkmod/modules/CommandCore.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java b/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java index 86ed3a7..06cdba3 100644 --- a/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java +++ b/src/main/java/land/chipmunk/chipmunkmod/modules/CommandCore.java @@ -181,7 +181,7 @@ public class CommandCore implements Listener { if (world == null || noPos == null) return; // also delete the old core - if (withPos != null) { + if (withPos != null && !isSingleBlock) { pendingCommands.add( String.format( "fill %d %d %d %d %d %d air", @@ -246,7 +246,7 @@ public class CommandCore implements Listener { if (player == null || connection == null) return; final int distanceSquared = player.chunkPosition().distanceSquared(new ChunkPos(origin)); - final int distance = (int) Math.sqrt(distanceSquared); + final int distance = (int) Math.sqrt(Math.abs(distanceSquared)); final int simulationDistance = connection.getLevel().getServerSimulationDistance();