geforkt von Mirrors/FastAsyncWorldEdit
fix: //regen with custom populators (#1376)
* Refraction + more fixes * Remove exception debug * Fix populator issues with //regen * Fixed code style * Further simplify * Update adapters Co-authored-by: Alex <mc.cache@web.de>
Dieser Commit ist enthalten in:
Ursprung
1b1f3bbcbe
Commit
14cb97d0ad
@ -5,6 +5,7 @@ import com.fastasyncworldedit.core.Fawe;
|
|||||||
import com.fastasyncworldedit.core.queue.IChunkCache;
|
import com.fastasyncworldedit.core.queue.IChunkCache;
|
||||||
import com.fastasyncworldedit.core.queue.IChunkGet;
|
import com.fastasyncworldedit.core.queue.IChunkGet;
|
||||||
import com.fastasyncworldedit.core.util.ReflectionUtils;
|
import com.fastasyncworldedit.core.util.ReflectionUtils;
|
||||||
|
import com.fastasyncworldedit.core.util.TaskManager;
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.mojang.datafixers.util.Either;
|
import com.mojang.datafixers.util.Either;
|
||||||
import com.mojang.serialization.Codec;
|
import com.mojang.serialization.Codec;
|
||||||
@ -324,10 +325,10 @@ public class PaperweightRegen extends Regenerator<ChunkAccess, ProtoChunk, Level
|
|||||||
},
|
},
|
||||||
() -> server.overworld().getDataStorage()
|
() -> server.overworld().getDataStorage()
|
||||||
) {
|
) {
|
||||||
// redirect to our protoChunks list
|
// redirect to LevelChunks created in #createChunks
|
||||||
@Override
|
@Override
|
||||||
public ChunkAccess getChunk(int x, int z, ChunkStatus chunkstatus, boolean flag) {
|
public ChunkAccess getChunk(int x, int z, ChunkStatus chunkstatus, boolean flag) {
|
||||||
return getProtoChunkAt(x, z);
|
return getChunkAt(x, z);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -399,7 +400,8 @@ public class PaperweightRegen extends Regenerator<ChunkAccess, ProtoChunk, Level
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void populate(LevelChunk levelChunk, Random random, BlockPopulator blockPopulator) {
|
protected void populate(LevelChunk levelChunk, Random random, BlockPopulator blockPopulator) {
|
||||||
blockPopulator.populate(freshWorld.getWorld(), random, levelChunk.bukkitChunk);
|
// BlockPopulator#populate has to be called synchronously for TileEntity access
|
||||||
|
TaskManager.IMP.task(() -> blockPopulator.populate(freshWorld.getWorld(), random, levelChunk.getBukkitChunk()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Binäre Datei nicht angezeigt.
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren