--- a/net/minecraft/util/worldupdate/WorldUpgrader.java +++ b/net/minecraft/util/worldupdate/WorldUpgrader.java @@ -81,7 +81,7 @@ public WorldUpgrader(Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, IRegistryCustom iregistrycustom, boolean flag, boolean flag1) { this.dimensions = iregistrycustom.registryOrThrow(Registries.LEVEL_STEM); - this.levels = (Set) this.dimensions.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; @@ -194,9 +194,9 @@ if (nbttagcompound != null) { int i = IChunkLoader.getVersion(nbttagcompound); ChunkGenerator chunkgenerator = ((WorldDimension) WorldUpgrader.this.dimensions.getOrThrow(Registries.levelToLevelStem(resourcekey))).generator(); - NBTTagCompound nbttagcompound1 = ichunkloader.upgradeChunkTag(resourcekey, () -> { + NBTTagCompound nbttagcompound1 = ichunkloader.upgradeChunkTag(Registries.levelToLevelStem(resourcekey), () -> { // CraftBukkit return WorldUpgrader.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)) { @@ -316,7 +316,7 @@ WorldUpgrader.c worldupgrader_c = (WorldUpgrader.c) iterator.next(); ResourceKey resourcekey = worldupgrader_c.dimensionKey; ListIterator listiterator = worldupgrader_c.files; - T t0 = (AutoCloseable) worldupgrader_c.storage; + T t0 = (T) worldupgrader_c.storage; // CraftBukkit - decompile error if (listiterator.hasNext()) { WorldUpgrader.e worldupgrader_e = (WorldUpgrader.e) listiterator.next();