2021-03-16 09:00:00 +11:00
|
|
|
--- a/net/minecraft/util/worldupdate/WorldUpgrader.java
|
|
|
|
+++ b/net/minecraft/util/worldupdate/WorldUpgrader.java
|
2023-08-07 20:16:07 +10:00
|
|
|
@@ -66,7 +66,7 @@
|
2022-12-08 03:00:00 +11:00
|
|
|
|
|
|
|
public WorldUpgrader(Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, IRegistry<WorldDimension> iregistry, boolean flag) {
|
|
|
|
this.dimensions = iregistry;
|
|
|
|
- this.levels = (Set) iregistry.registryKeySet().stream().map(Registries::levelStemToLevel).collect(Collectors.toUnmodifiableSet());
|
2023-08-07 20:16:07 +10:00
|
|
|
+ this.levels = (Set) java.util.stream.Stream.of(convertable_conversionsession.dimensionType).map(Registries::levelStemToLevel).collect(Collectors.toUnmodifiableSet()); // CraftBukkit
|
2022-12-08 03:00:00 +11:00
|
|
|
this.eraseCache = flag;
|
|
|
|
this.dataFixer = datafixer;
|
|
|
|
this.levelStorage = convertable_conversionsession;
|
2023-08-07 20:16:07 +10:00
|
|
|
@@ -145,9 +145,9 @@
|
2021-11-23 17:13:52 +11:00
|
|
|
if (nbttagcompound != null) {
|
|
|
|
int j = IChunkLoader.getVersion(nbttagcompound);
|
2023-08-07 20:16:07 +10:00
|
|
|
ChunkGenerator chunkgenerator = ((WorldDimension) this.dimensions.getOrThrow(Registries.levelToLevelStem(resourcekey2))).generator();
|
|
|
|
- NBTTagCompound nbttagcompound1 = ichunkloader.upgradeChunkTag(resourcekey2, () -> {
|
|
|
|
+ NBTTagCompound nbttagcompound1 = ichunkloader.upgradeChunkTag(Registries.levelToLevelStem(resourcekey2), () -> { // CraftBukkit
|
2021-06-11 15:00:00 +10:00
|
|
|
return this.overworldDataStorage;
|
2021-11-22 09:00:00 +11:00
|
|
|
- }, nbttagcompound, chunkgenerator.getTypeNameForDataFixer());
|
|
|
|
+ }, nbttagcompound, chunkgenerator.getTypeNameForDataFixer(), chunkcoordintpair, null); // CraftBukkit
|
|
|
|
ChunkCoordIntPair chunkcoordintpair1 = new ChunkCoordIntPair(nbttagcompound1.getInt("xPos"), nbttagcompound1.getInt("zPos"));
|
2019-04-23 12:00:00 +10:00
|
|
|
|
2021-11-22 09:00:00 +11:00
|
|
|
if (!chunkcoordintpair1.equals(chunkcoordintpair)) {
|