2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/util/worldupdate/WorldUpgrader.java
|
|
|
|
+++ b/net/minecraft/util/worldupdate/WorldUpgrader.java
|
2023-08-07 12:16:07 +02:00
|
|
|
@@ -66,7 +66,7 @@
|
2022-12-07 17:00:00 +01: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 12:16:07 +02:00
|
|
|
+ this.levels = (Set) java.util.stream.Stream.of(convertable_conversionsession.dimensionType).map(Registries::levelStemToLevel).collect(Collectors.toUnmodifiableSet()); // CraftBukkit
|
2022-12-07 17:00:00 +01:00
|
|
|
this.eraseCache = flag;
|
|
|
|
this.dataFixer = datafixer;
|
|
|
|
this.levelStorage = convertable_conversionsession;
|
2023-08-07 12:16:07 +02:00
|
|
|
@@ -145,9 +145,9 @@
|
2021-11-23 07:13:52 +01:00
|
|
|
if (nbttagcompound != null) {
|
|
|
|
int j = IChunkLoader.getVersion(nbttagcompound);
|
2023-08-07 12:16:07 +02: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 07:00:00 +02:00
|
|
|
return this.overworldDataStorage;
|
2021-11-21 23:00:00 +01:00
|
|
|
- }, nbttagcompound, chunkgenerator.getTypeNameForDataFixer());
|
|
|
|
+ }, nbttagcompound, chunkgenerator.getTypeNameForDataFixer(), chunkcoordintpair, null); // CraftBukkit
|
|
|
|
ChunkCoordIntPair chunkcoordintpair1 = new ChunkCoordIntPair(nbttagcompound1.getInt("xPos"), nbttagcompound1.getInt("zPos"));
|
2019-04-23 04:00:00 +02:00
|
|
|
|
2021-11-21 23:00:00 +01:00
|
|
|
if (!chunkcoordintpair1.equals(chunkcoordintpair)) {
|