mirror of
https://code.chipmunk.land/ChomeNS/chipmunkmod.git
synced 2026-03-30 22:51:58 +00:00
fix: 1000 years old core issue fixed with simple math function
(hopefully)
This commit is contained in:
parent
590b954c30
commit
6dc1c26a85
1 changed files with 2 additions and 2 deletions
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue