Fix Stack Overflow in dev environment with mojmap (#1134)

This commit is contained in:
altrisi authored and GitHub committed 2021-10-20 23:06:19 -03:00
1 parent fa36c52ba8
commit 506457d878
3 files changed
+3 -3

No files matched your search

@@ -14,5 +14,5 @@ public interface ThreadedAnvilChunkStorageInterface
void releaseRelightTicket(ChunkPos pos); void releaseRelightTicket(ChunkPos pos);
Iterable<ChunkHolder> getChunks(); Iterable<ChunkHolder> getChunksCM();
} }
@@ -62,7 +62,7 @@ public abstract class ServerChunkManager_tickMixin
// simplified chunk tick iteration assuming world is frozen otherwise as suggested by Hadron67 // simplified chunk tick iteration assuming world is frozen otherwise as suggested by Hadron67
// to be kept in sync with the original injection source // to be kept in sync with the original injection source
if (!debug){ if (!debug){
List<ChunkHolder> holders = Lists.newArrayList(((ThreadedAnvilChunkStorageInterface)threadedAnvilChunkStorage).getChunks()); List<ChunkHolder> holders = Lists.newArrayList(((ThreadedAnvilChunkStorageInterface)threadedAnvilChunkStorage).getChunksCM());
Collections.shuffle(holders); Collections.shuffle(holders);
for (ChunkHolder holder: holders){ for (ChunkHolder holder: holders){
Optional<WorldChunk> optional = holder.getTickingFuture().getNow(ChunkHolder.UNLOADED_WORLD_CHUNK).left(); Optional<WorldChunk> optional = holder.getTickingFuture().getNow(ChunkHolder.UNLOADED_WORLD_CHUNK).left();
@@ -484,7 +484,7 @@ public abstract class ThreadedAnvilChunkStorage_scarpetChunkCreationMixin implem
} }
@Override @Override
public Iterable<ChunkHolder> getChunks() { public Iterable<ChunkHolder> getChunksCM() {
return entryIterator(); return entryIterator();
} }
} }