mirror of
https://github.com/PaperMC/Paper.git
synced 2025-07-31 20:22:05 -07:00
net.minecraft.util.worldupdate
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
--- a/net/minecraft/util/worldupdate/WorldUpgrader.java
|
||||
+++ b/net/minecraft/util/worldupdate/WorldUpgrader.java
|
||||
@@ -79,7 +_,7 @@
|
||||
LevelStorageSource.LevelStorageAccess levelStorage, DataFixer dataFixer, RegistryAccess registryAccess, boolean eraseCache, boolean recreateRegionFiles
|
||||
) {
|
||||
this.dimensions = registryAccess.lookupOrThrow(Registries.LEVEL_STEM);
|
||||
- this.levels = this.dimensions.registryKeySet().stream().map(Registries::levelStemToLevel).collect(Collectors.toUnmodifiableSet());
|
||||
+ this.levels = java.util.stream.Stream.of(levelStorage.dimensionType).map(Registries::levelStemToLevel).collect(Collectors.toUnmodifiableSet()); // CraftBukkit
|
||||
this.eraseCache = eraseCache;
|
||||
this.dataFixer = dataFixer;
|
||||
this.levelStorage = levelStorage;
|
||||
@@ -357,9 +_,7 @@
|
||||
if (compoundTag != null) {
|
||||
int version = ChunkStorage.getVersion(compoundTag);
|
||||
ChunkGenerator chunkGenerator = WorldUpgrader.this.dimensions.getValueOrThrow(Registries.levelToLevelStem(dimension)).generator();
|
||||
- CompoundTag compoundTag1 = chunkStorage.upgradeChunkTag(
|
||||
- dimension, () -> WorldUpgrader.this.overworldDataStorage, compoundTag, chunkGenerator.getTypeNameForDataFixer()
|
||||
- );
|
||||
+ CompoundTag compoundTag1 = chunkStorage.upgradeChunkTag(Registries.levelToLevelStem(dimension), () -> WorldUpgrader.this.overworldDataStorage, compoundTag, chunkGenerator.getTypeNameForDataFixer(), chunkPos, null); // CraftBukkit
|
||||
ChunkPos chunkPos1 = new ChunkPos(compoundTag1.getInt("xPos"), compoundTag1.getInt("zPos"));
|
||||
if (!chunkPos1.equals(chunkPos)) {
|
||||
WorldUpgrader.LOGGER.warn("Chunk {} has invalid position {}", chunkPos, chunkPos1);
|
Reference in New Issue
Block a user