move thingie to insert

This commit is contained in:
mcrcortex
2025-05-18 10:39:51 +10:00
parent 9be68ac2f4
commit fd22ea4153
2 changed files with 7 additions and 9 deletions

View File

@@ -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, 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)], data[J(0, 1, 0)], data[J(1, 1, 0)], data[J(0, 1, 1)], data[J(1, 1, 1)],
mapper); 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)
}
} }
} }

View File

@@ -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 //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 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"); if (!into.isLive) throw new IllegalStateException("World is not live");
boolean shouldCheckEmptiness = false; boolean shouldCheckEmptiness = false;
WorldSection previousSection = null; WorldSection previousSection = null;