TEST
This commit is contained in:
+1
@@ -82,6 +82,7 @@ public class FullDataUpdatePropagatorV2 implements IDebugRenderable, AutoCloseab
|
||||
}
|
||||
|
||||
|
||||
|
||||
//================//
|
||||
// parent updates //
|
||||
//================//
|
||||
|
||||
@@ -101,9 +101,9 @@ public class BatchGenerator implements IDhApiWorldGenerator
|
||||
EDhApiWorldGenerationStep targetStep = null;
|
||||
switch (generatorMode)
|
||||
{
|
||||
case PRE_EXISTING_ONLY: // Only load in existing chunks. Note: this requires the biome generation step in order for biomes to be properly initialized.
|
||||
case PRE_EXISTING_ONLY: // Only load in existing chunks.
|
||||
//case BIOME_ONLY: // No blocks. Require fake height in LodBuilder
|
||||
targetStep = EDhApiWorldGenerationStep.BIOMES;
|
||||
targetStep = EDhApiWorldGenerationStep.EMPTY;
|
||||
break;
|
||||
//case BIOME_ONLY_SIMULATE_HEIGHT:
|
||||
// targetStep = EDhApiWorldGenerationStep.NOISE; // Stone only. Requires a fake surface
|
||||
|
||||
+9
-6
@@ -73,7 +73,7 @@ public class WorldGenerationQueue implements IFullDataSourceRetrievalQueue, IDeb
|
||||
* if this is too high it may cause issues when moving,
|
||||
* but if it is too low the generator threads won't have enough tasks to work on
|
||||
*/
|
||||
private static final int MAX_QUEUED_TASKS_PER_THREAD = 3;
|
||||
private static final int MAX_QUEUED_TASKS_PER_THREAD = 1;
|
||||
|
||||
|
||||
private final IDhApiWorldGenerator generator;
|
||||
@@ -412,12 +412,15 @@ public class WorldGenerationQueue implements IFullDataSourceRetrievalQueue, IDeb
|
||||
try
|
||||
{
|
||||
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<>();
|
||||
//nearbyChunkList.add(chunkWrapper);
|
||||
//byte maxSkyLight = this.level.getLevelWrapper().hasSkyLight() ? LodUtil.MAX_MC_LIGHT : LodUtil.MIN_MC_LIGHT;
|
||||
//DhLightingEngine.INSTANCE.bakeChunkBlockLighting(chunkWrapper, nearbyChunkList, maxSkyLight);
|
||||
|
||||
// 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.getLevelWrapper().hasSkyLight() ? LodUtil.MAX_MC_LIGHT : LodUtil.MIN_MC_LIGHT);
|
||||
chunkWrapper.setIsDhBlockLightCorrect(true);
|
||||
|
||||
try (FullDataSourceV2 dataSource = LodDataBuilder.createFromChunk(this.level.getLevelWrapper(), chunkWrapper))
|
||||
{
|
||||
|
||||
+1
-1
@@ -190,7 +190,7 @@ public class PriorityTaskPicker
|
||||
{
|
||||
return new RateLimitedThreadPoolExecutor(
|
||||
Config.Common.MultiThreading.numberOfThreads.get(),
|
||||
new DhThreadFactory(this.name, Thread.MIN_PRIORITY, false),
|
||||
new DhThreadFactory(this.name, 5, false), // TODO add config, just needs to be a couple higher than C2ME (default 4) for chunky to be mostly usable
|
||||
new ArrayBlockingQueue<>(Runtime.getRuntime().availableProcessors())
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user