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