Fix VANILLA_CHUNKS API world gen
This commit is contained in:
+1
-1
@@ -66,7 +66,7 @@ public class LodDataBuilder
|
||||
public static FullDataSourceV2 createFromChunk(ILevelWrapper levelWrapper, IChunkWrapper chunkWrapper)
|
||||
{
|
||||
// only block lighting is needed here, sky lighting is populated at the data source stage
|
||||
LodUtil.assertTrue(chunkWrapper.isDhBlockLightingCorrect());
|
||||
LodUtil.assertTrue(chunkWrapper.isDhBlockLightingCorrect(), "Provided chunk's DH Block lighting hasn't been baked.");
|
||||
|
||||
int chunkPosX = chunkWrapper.getChunkPos().getX();
|
||||
int chunkPosZ = chunkWrapper.getChunkPos().getZ();
|
||||
|
||||
+9
-2
@@ -410,8 +410,15 @@ public class WorldGenerationQueue implements IFullDataSourceRetrievalQueue, IDeb
|
||||
{
|
||||
try
|
||||
{
|
||||
IChunkWrapper chunk = WRAPPER_FACTORY.createChunkWrapper(generatedObjectArray);
|
||||
try (FullDataSourceV2 dataSource = LodDataBuilder.createFromChunk(this.level.getLevelWrapper(), chunk))
|
||||
IChunkWrapper chunkWrapper = WRAPPER_FACTORY.createChunkWrapper(generatedObjectArray);
|
||||
|
||||
// TODO light data should be pulled (if possible) from the ChunkAccess object itself via ChunkFileReader.readLight
|
||||
// but this should work for now
|
||||
ArrayList<IChunkWrapper> nearbyChunkList = new ArrayList<IChunkWrapper>();
|
||||
nearbyChunkList.add(chunkWrapper);
|
||||
DhLightingEngine.INSTANCE.bakeChunkBlockLighting(chunkWrapper, nearbyChunkList, this.level.hasSkyLight() ? LodUtil.MAX_MC_LIGHT : LodUtil.MIN_MC_LIGHT);
|
||||
|
||||
try (FullDataSourceV2 dataSource = LodDataBuilder.createFromChunk(this.level.getLevelWrapper(), chunkWrapper))
|
||||
{
|
||||
LodUtil.assertTrue(dataSource != null);
|
||||
dataSourceConsumer.accept(dataSource);
|
||||
|
||||
Reference in New Issue
Block a user