mirror of
https://code.chipmunk.land/ChomeNS/chipmunkmod.git
synced 2026-03-31 02:02:04 +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;
|
if (world == null || noPos == null) return;
|
||||||
|
|
||||||
// also delete the old core
|
// also delete the old core
|
||||||
if (withPos != null) {
|
if (withPos != null && !isSingleBlock) {
|
||||||
pendingCommands.add(
|
pendingCommands.add(
|
||||||
String.format(
|
String.format(
|
||||||
"fill %d %d %d %d %d %d air",
|
"fill %d %d %d %d %d %d air",
|
||||||
|
|
@ -246,7 +246,7 @@ public class CommandCore implements Listener {
|
||||||
if (player == null || connection == null) return;
|
if (player == null || connection == null) return;
|
||||||
|
|
||||||
final int distanceSquared = player.chunkPosition().distanceSquared(new ChunkPos(origin));
|
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();
|
final int simulationDistance = connection.getLevel().getServerSimulationDistance();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue