--- a/net/minecraft/server/WorldUpgrader.java +++ b/net/minecraft/server/WorldUpgrader.java @@ -25,7 +25,7 @@ private static final Logger LOGGER = LogManager.getLogger(); private static final ThreadFactory b = (new ThreadFactoryBuilder()).setDaemon(true).build(); - private final ImmutableSet> c; + private final ImmutableSet> c; // CraftBukkit private final boolean d; private final Convertable.ConversionSession e; private final Thread f; @@ -36,12 +36,12 @@ private volatile int k; private volatile int l; private volatile int m; - private final Object2FloatMap> n = Object2FloatMaps.synchronize(new Object2FloatOpenCustomHashMap(SystemUtils.k())); + private final Object2FloatMap> n = Object2FloatMaps.synchronize(new Object2FloatOpenCustomHashMap(SystemUtils.k())); // CraftBukkit private volatile IChatBaseComponent o = new ChatMessage("optimizeWorld.stage.counting"); private static final Pattern p = Pattern.compile("^r\\.(-?[0-9]+)\\.(-?[0-9]+)\\.mca$"); private final WorldPersistentData q; - public WorldUpgrader(Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, ImmutableSet> immutableset, boolean flag) { + public WorldUpgrader(Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, ImmutableSet> immutableset, boolean flag) { // CraftBukkit this.c = immutableset; this.d = flag; this.g = datafixer; @@ -69,12 +69,12 @@ private void i() { this.k = 0; - Builder, ListIterator> builder = ImmutableMap.builder(); + Builder, ListIterator> builder = ImmutableMap.builder(); // CraftBukkit List list; for (UnmodifiableIterator unmodifiableiterator = this.c.iterator(); unmodifiableiterator.hasNext(); this.k += list.size()) { - ResourceKey resourcekey = (ResourceKey) unmodifiableiterator.next(); + ResourceKey resourcekey = (ResourceKey) unmodifiableiterator.next(); // CraftBukkit list = this.b(resourcekey); builder.put(resourcekey, list.listIterator()); @@ -84,18 +84,18 @@ this.i = true; } else { float f = (float) this.k; - ImmutableMap, ListIterator> immutablemap = builder.build(); - Builder, IChunkLoader> builder1 = ImmutableMap.builder(); + ImmutableMap, ListIterator> immutablemap = builder.build(); // CraftBukkit + Builder, IChunkLoader> builder1 = ImmutableMap.builder(); // CraftBukkit UnmodifiableIterator unmodifiableiterator1 = this.c.iterator(); while (unmodifiableiterator1.hasNext()) { - ResourceKey resourcekey1 = (ResourceKey) unmodifiableiterator1.next(); - File file = this.e.a(resourcekey1); + ResourceKey resourcekey1 = (ResourceKey) unmodifiableiterator1.next(); // CraftBukkit + File file = this.e.a(null); // CraftBukkit builder1.put(resourcekey1, new IChunkLoader(new File(file, "region"), this.g, true)); } - ImmutableMap, IChunkLoader> immutablemap1 = builder1.build(); + ImmutableMap, IChunkLoader> immutablemap1 = builder1.build(); // CraftBukkit long i = SystemUtils.getMonotonicMillis(); this.o = new ChatMessage("optimizeWorld.stage.upgrading"); @@ -107,7 +107,7 @@ float f2; for (UnmodifiableIterator unmodifiableiterator2 = this.c.iterator(); unmodifiableiterator2.hasNext(); f1 += f2) { - ResourceKey resourcekey2 = (ResourceKey) unmodifiableiterator2.next(); + ResourceKey resourcekey2 = (ResourceKey) unmodifiableiterator2.next(); // CraftBukkit ListIterator listiterator = (ListIterator) immutablemap.get(resourcekey2); IChunkLoader ichunkloader = (IChunkLoader) immutablemap1.get(resourcekey2); @@ -122,7 +122,7 @@ int j = IChunkLoader.a(nbttagcompound); NBTTagCompound nbttagcompound1 = ichunkloader.getChunkData(resourcekey2, () -> { return this.q; - }, nbttagcompound); + }, nbttagcompound, chunkcoordintpair, null); // CraftBukkit NBTTagCompound nbttagcompound2 = nbttagcompound1.getCompound("Level"); ChunkCoordIntPair chunkcoordintpair1 = new ChunkCoordIntPair(nbttagcompound2.getInt("xPos"), nbttagcompound2.getInt("zPos")); @@ -195,8 +195,8 @@ } } - private List b(ResourceKey resourcekey) { - File file = this.e.a(resourcekey); + private List b(ResourceKey resourcekey) { // CraftBukkit + File file = this.e.a(null); // CraftBukkit File file1 = new File(file, "region"); File[] afile = file1.listFiles((file2, s) -> { return s.endsWith(".mca");