Ingest on chunk loaded

This commit is contained in:
mcrcortex
2025-10-18 17:30:35 +10:00
parent ddbc1c27e4
commit a0512ef044

View File

@@ -18,6 +18,7 @@ import net.minecraft.client.world.ClientWorld;
import net.minecraft.util.math.ChunkPos;
import net.minecraft.util.math.ChunkSectionPos;
import net.minecraft.world.LightType;
import net.minecraft.world.chunk.ChunkStatus;
import org.spongepowered.asm.mixin.Final;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
@@ -59,16 +60,19 @@ public class MixinRenderSectionManager {
}
}
/*
@Inject(method = "onChunkAdded", at = @At("HEAD"))
private void voxy$trackChunkAdd(int x, int z, CallbackInfo ci) {
if (this.level.worldRenderer != null) {
var system = ((IGetVoxyRenderSystem)(this.level.worldRenderer)).getVoxyRenderSystem();
if (system != null) {
system.chunkBoundRenderer.addChunk(ChunkPos.toLong(x, z));
private void voxy$ingestOnAdd(int x, int z, CallbackInfo ci) {
if (this.level.worldRenderer != null && VoxyConfig.CONFIG.ingestEnabled) {
var cccm = this.level.getChunkManager();
if (cccm != null) {
var chunk = cccm.getChunk(x, z, ChunkStatus.FULL, false);
if (chunk != null) {
VoxelIngestService.tryAutoIngestChunk(chunk);
}
}
}
}*/
}
/*
@Inject(method = "onChunkRemoved", at = @At("HEAD"))