mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +01:00
65bc2541a3
By: md_5 <git@md-5.net>
32 lines
2.4 KiB
Diff
32 lines
2.4 KiB
Diff
--- 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<T> worldupgrader_c = (WorldUpgrader.c) iterator.next();
|
|
ResourceKey<World> resourcekey = worldupgrader_c.dimensionKey;
|
|
ListIterator<WorldUpgrader.e> 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();
|