geforkt von Mirrors/FastAsyncWorldEdit
fix: use proper level data for regen (#1921)
Dieser Commit ist enthalten in:
Ursprung
a6a0b5eb66
Commit
a51863c6f0
@ -79,6 +79,7 @@ import java.util.Collections;
|
|||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.OptionalLong;
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import java.util.concurrent.CompletableFuture;
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
@ -217,10 +218,10 @@ public class PaperweightRegen extends Regenerator<ChunkAccess, ProtoChunk, Level
|
|||||||
BiomeProvider biomeProvider = getBiomeProvider();
|
BiomeProvider biomeProvider = getBiomeProvider();
|
||||||
|
|
||||||
MinecraftServer server = originalServerWorld.getCraftServer().getServer();
|
MinecraftServer server = originalServerWorld.getCraftServer().getServer();
|
||||||
PrimaryLevelData levelProperties = (PrimaryLevelData) server.getWorldData();
|
WorldGenSettings originalOpts = originalWorldData.worldGenSettings();
|
||||||
|
WorldGenSettings newOpts = options.getSeed().isPresent()
|
||||||
WorldGenSettings newOpts = levelProperties.worldGenSettings()
|
? originalOpts.withSeed(originalWorldData.isHardcore(), OptionalLong.of(seed))
|
||||||
.withSeed(originalWorldData.settings.hardcore(), options.getSeed());
|
: originalOpts;
|
||||||
LevelSettings newWorldSettings = new LevelSettings(
|
LevelSettings newWorldSettings = new LevelSettings(
|
||||||
"faweregentempworld",
|
"faweregentempworld",
|
||||||
originalWorldData.settings.gameType(),
|
originalWorldData.settings.gameType(),
|
||||||
|
@ -213,10 +213,9 @@ public class PaperweightRegen extends Regenerator<ChunkAccess, ProtoChunk, Level
|
|||||||
BiomeProvider biomeProvider = getBiomeProvider();
|
BiomeProvider biomeProvider = getBiomeProvider();
|
||||||
|
|
||||||
MinecraftServer server = originalServerWorld.getCraftServer().getServer();
|
MinecraftServer server = originalServerWorld.getCraftServer().getServer();
|
||||||
PrimaryLevelData levelProperties = (PrimaryLevelData) server.getWorldData();
|
WorldGenSettings originalOpts = originalWorldData.worldGenSettings();
|
||||||
WorldGenSettings originalOpts = levelProperties.worldGenSettings();
|
|
||||||
WorldGenSettings newOpts = options.getSeed().isPresent()
|
WorldGenSettings newOpts = options.getSeed().isPresent()
|
||||||
? originalOpts.withSeed(levelProperties.isHardcore(), OptionalLong.of(seed))
|
? originalOpts.withSeed(originalWorldData.isHardcore(), OptionalLong.of(seed))
|
||||||
: originalOpts;
|
: originalOpts;
|
||||||
LevelSettings newWorldSettings = new LevelSettings(
|
LevelSettings newWorldSettings = new LevelSettings(
|
||||||
"faweregentempworld",
|
"faweregentempworld",
|
||||||
|
@ -214,10 +214,9 @@ public class PaperweightRegen extends Regenerator<ChunkAccess, ProtoChunk, Level
|
|||||||
PrimaryLevelData originalWorldData = originalServerWorld.serverLevelData;
|
PrimaryLevelData originalWorldData = originalServerWorld.serverLevelData;
|
||||||
|
|
||||||
MinecraftServer server = originalServerWorld.getCraftServer().getServer();
|
MinecraftServer server = originalServerWorld.getCraftServer().getServer();
|
||||||
PrimaryLevelData levelProperties = (PrimaryLevelData) server.getWorldData();
|
WorldGenSettings originalOpts = originalWorldData.worldGenSettings();
|
||||||
WorldGenSettings originalOpts = levelProperties.worldGenSettings();
|
|
||||||
WorldGenSettings newOpts = options.getSeed().isPresent()
|
WorldGenSettings newOpts = options.getSeed().isPresent()
|
||||||
? originalOpts.withSeed(levelProperties.isHardcore(), OptionalLong.of(seed))
|
? originalOpts.withSeed(originalWorldData.isHardcore(), OptionalLong.of(seed))
|
||||||
: originalOpts;
|
: originalOpts;
|
||||||
LevelSettings newWorldSettings = new LevelSettings(
|
LevelSettings newWorldSettings = new LevelSettings(
|
||||||
"faweregentempworld",
|
"faweregentempworld",
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren