From fd22ea41534d4d19d95d45abe55bf61e7ccf1e59 Mon Sep 17 00:00:00 2001 From: mcrcortex <18544518+MCRcortex@users.noreply.github.com> Date: Sun, 18 May 2025 10:39:51 +1000 Subject: [PATCH] move thingie to insert --- .../voxy/common/voxelization/WorldConversionFactory.java | 9 --------- .../java/me/cortex/voxy/common/world/WorldUpdater.java | 7 +++++++ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/main/java/me/cortex/voxy/common/voxelization/WorldConversionFactory.java b/src/main/java/me/cortex/voxy/common/voxelization/WorldConversionFactory.java index c50c539c..5889fd37 100644 --- a/src/main/java/me/cortex/voxy/common/voxelization/WorldConversionFactory.java +++ b/src/main/java/me/cortex/voxy/common/voxelization/WorldConversionFactory.java @@ -267,14 +267,5 @@ public class WorldConversionFactory { data[J(0, 0, 0)], data[J(1, 0, 0)], data[J(0, 0, 1)], data[J(1, 0, 1)], data[J(0, 1, 0)], data[J(1, 1, 0)], data[J(0, 1, 1)], data[J(1, 1, 1)], mapper); - - - - - //Do some very cheeky stuff for MiB - if (false) { - int sector = (section.x+512)>>10; - section.setPosition(section.x-(sector<<10), section.y+16+(256-32-sector*30), section.z);//Note sector size mult is 30 because the top chunk is replicated (and so is bottom chunk) - } } } diff --git a/src/main/java/me/cortex/voxy/common/world/WorldUpdater.java b/src/main/java/me/cortex/voxy/common/world/WorldUpdater.java index 155d9d48..1d4eabb4 100644 --- a/src/main/java/me/cortex/voxy/common/world/WorldUpdater.java +++ b/src/main/java/me/cortex/voxy/common/world/WorldUpdater.java @@ -11,6 +11,13 @@ public class WorldUpdater { //NOTE: THIS RUNS ON THE THREAD IT WAS EXECUTED ON, when this method exits, the calling method may assume that VoxelizedSection is no longer needed public static void insertUpdate(WorldEngine into, VoxelizedSection section) {//TODO: add a bitset of levels to update and if it should force update + + //Do some very cheeky stuff for MiB + if (false) { + int sector = (section.x+512)>>10; + section.setPosition(section.x-(sector<<10), section.y+16+(256-32-sector*30), section.z);//Note sector size mult is 30 because the top chunk is replicated (and so is bottom chunk) + } + if (!into.isLive) throw new IllegalStateException("World is not live"); boolean shouldCheckEmptiness = false; WorldSection previousSection = null;