removed debug

This commit is contained in:
gnembon committed 2020-02-27 18:13:39 -04:00
1 parent b2e5053c6b
commit f4fd31e9fa
1 file changed
+22 -5
@@ -91,7 +91,6 @@ public abstract class ThreadedAnvilChunkStorage_scarpetChunkCreationMixin implem
{ {
chunksToConvert.add(new ChunkPos(x,z)); chunksToConvert.add(new ChunkPos(x,z));
} }
CarpetSettings.LOG.error("Converting "+chunksToConvert.size()+" chunks");
//flushning all tasks on the thread executor so all futures are ready - we don't want any deadlocks //flushning all tasks on the thread executor so all futures are ready - we don't want any deadlocks
mainThreadExecutor.runTasks(() -> mainThreadExecutor.getTaskCount() == 0); mainThreadExecutor.runTasks(() -> mainThreadExecutor.getTaskCount() == 0);
@@ -144,19 +143,37 @@ public abstract class ThreadedAnvilChunkStorage_scarpetChunkCreationMixin implem
field_18807.remove(id); field_18807.remove(id);
ChunkHolder newHolder = new ChunkHolder(chpos, 0,serverLightingProvider, chunkTaskPrioritySystem, (ChunkHolder.PlayersWatchingChunkProvider) this); ChunkHolder newHolder = new ChunkHolder(chpos, 0,serverLightingProvider, chunkTaskPrioritySystem, (ChunkHolder.PlayersWatchingChunkProvider) this);
this.currentChunkHolders.put(id, newHolder); this.currentChunkHolders.put(id, newHolder);
loadedChunks.add(id); //removed holders
field_18807.put(id, newHolder);
//loadedChunks.add(id);
((ChunkHolderInterface)newHolder).setDefaultProtoChunk(chpos, mainThreadExecutor); ((ChunkHolderInterface)newHolder).setDefaultProtoChunk(chpos, mainThreadExecutor);
createdChunks.add(newHolder); createdChunks.add(newHolder);
} }
//getting rid of all signs //getting rid of all signs
this.chunkHolderListDirty = true; this.chunkHolderListDirty = true;
// not needed right now // not needed right now
//for (ChunkHolder newHolder: createdChunks) convertToFullChunk(newHolder); for (ChunkHolder newHolder: createdChunks)
// running all pending tasks {
//convert requires a chunk to be unloaded to load entities
//loadedChunks.remove(newHolder.getPos().toLong());
//convertToFullChunk(newHolder);
// running all pending tasks
mainThreadExecutor.runTasks(() -> mainThreadExecutor.getTaskCount() == 0);
//worldgenExecutor.
// save all pending chunks / potentially only one max - ours
// hopefully that would flush all chunk writes, including current chink
while ((runnable = field_19343.poll()) != null)
{
runnable.run();
}
convertToFullChunk(newHolder);
}
mainThreadExecutor.runTasks(() -> mainThreadExecutor.getTaskCount() == 0); mainThreadExecutor.runTasks(() -> mainThreadExecutor.getTaskCount() == 0);
//worldgenExecutor.
// save all pending chunks / potentially only one max - ours // save all pending chunks / potentially only one max - ours
// hopefully that would flush all chunk writes, including current chink // hopefully that would flush all chunk writes, including current chink
while((runnable = field_19343.poll()) != null) { while ((runnable = field_19343.poll()) != null)
{
runnable.run(); runnable.run();
} }
} }