mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 12:02:36 +01:00
0379c2cfee
By: md_5 <git@md-5.net>
23 lines
1.9 KiB
Diff
23 lines
1.9 KiB
Diff
--- a/net/minecraft/util/worldupdate/WorldUpgrader.java
|
|
+++ b/net/minecraft/util/worldupdate/WorldUpgrader.java
|
|
@@ -66,7 +66,7 @@
|
|
|
|
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());
|
|
+ this.levels = (Set) java.util.stream.Stream.of(convertable_conversionsession.dimensionType).map(Registries::levelStemToLevel).collect(Collectors.toUnmodifiableSet()); // CraftBukkit
|
|
this.eraseCache = flag;
|
|
this.dataFixer = datafixer;
|
|
this.levelStorage = convertable_conversionsession;
|
|
@@ -145,9 +145,9 @@
|
|
if (nbttagcompound != null) {
|
|
int j = IChunkLoader.getVersion(nbttagcompound);
|
|
ChunkGenerator chunkgenerator = ((WorldDimension) this.dimensions.getOrThrow(Registries.levelToLevelStem(resourcekey2))).generator();
|
|
- NBTTagCompound nbttagcompound1 = ichunkloader.upgradeChunkTag(resourcekey2, () -> {
|
|
+ NBTTagCompound nbttagcompound1 = ichunkloader.upgradeChunkTag(Registries.levelToLevelStem(resourcekey2), () -> { // CraftBukkit
|
|
return this.overworldDataStorage;
|
|
- }, nbttagcompound, chunkgenerator.getTypeNameForDataFixer());
|
|
+ }, nbttagcompound, chunkgenerator.getTypeNameForDataFixer(), chunkcoordintpair, null); // CraftBukkit
|
|
ChunkCoordIntPair chunkcoordintpair1 = new ChunkCoordIntPair(nbttagcompound1.getInt("xPos"), nbttagcompound1.getInt("zPos"));
|
|
|
|
if (!chunkcoordintpair1.equals(chunkcoordintpair)) {
|