This commit is contained in:
mcrcortex
2025-10-25 14:57:42 +10:00
parent c4769c4f1a
commit 842987e891

View File

@@ -85,9 +85,9 @@ public class VoxelIngestService {
return true; return true;
} }
public void enqueueIngest(WorldEngine engine, WorldChunk chunk) { public boolean enqueueIngest(WorldEngine engine, WorldChunk chunk) {
if (!this.threads.isAlive()) { if (!this.threads.isAlive()) {
return; return false;
} }
if (!engine.isLive()) { if (!engine.isLive()) {
throw new IllegalStateException("Tried inserting chunk into WorldEngine that was not alive"); throw new IllegalStateException("Tried inserting chunk into WorldEngine that was not alive");
@@ -125,7 +125,7 @@ public class VoxelIngestService {
} }
if (!gotLighting) { if (!gotLighting) {
return; return false;
} }
var blp = lightingProvider.get(LightType.BLOCK); var blp = lightingProvider.get(LightType.BLOCK);
@@ -162,6 +162,7 @@ public class VoxelIngestService {
break; break;
} }
} }
return true;
} }
public int getTaskCount() { public int getTaskCount() {
@@ -180,8 +181,7 @@ public class VoxelIngestService {
if (!instance.isIngestEnabled(worldId)) return false; if (!instance.isIngestEnabled(worldId)) return false;
var engine = instance.getOrCreate(worldId); var engine = instance.getOrCreate(worldId);
if (engine == null) return false; if (engine == null) return false;
instance.getIngestService().enqueueIngest(engine, chunk); return instance.getIngestService().enqueueIngest(engine, chunk);
return true;
} }
//Try to automatically ingest the chunk into the correct world //Try to automatically ingest the chunk into the correct world