1.16.2 Release (#4123)
PaperMC believes that 1.16.2 is now ready for general release as we fixed the main issue plagueing the 1.16.x release, the MapLike data conversion issues. Until now, it was not safe for a server to convert a world to 1.16.2 without data conversion issues around villages and potentially other things. If you did, those MapLike errors meant something went wrong. This is now resolved. Big thanks to all those that helped, notably @BillyGalbreath and @Proximyst who did large parts of the update process with me. Please as always, backup your worlds and test before updating to 1.16.2! If you update to 1.16.2, there is no going back to an older build than this. --------------------------------- Co-authored-by: William Blake Galbreath <Blake.Galbreath@GMail.com> Co-authored-by: Mariell Hoversholm <proximyst@proximyst.com> Co-authored-by: krolik-exe <69214078+krolik-exe@users.noreply.github.com> Co-authored-by: BillyGalbreath <BillyGalbreath@users.noreply.github.com> Co-authored-by: stonar96 <minecraft.stonar96@gmail.com> Co-authored-by: Shane Freeder <theboyetronic@gmail.com> Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Co-authored-by: Riley Park <rileysebastianpark@gmail.com> Co-authored-by: Aurora <21148213+aurorasmiles@users.noreply.github.com> Co-authored-by: Nassim Jahnke <nassim@njahnke.dev> Co-authored-by: commandblockguy <commandblockguy1@gmail.com> Co-authored-by: DigitalRegent <misterwener@gmail.com> Co-authored-by: ishland <ishlandmc@yeah.net>
This commit is contained in:
@@ -631,6 +631,14 @@ diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
@@ -0,0 +0,0 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import com.mojang.datafixers.util.Either;
|
||||
+import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap; // Paper
|
||||
import it.unimi.dsi.fastutil.shorts.ShortArraySet;
|
||||
import it.unimi.dsi.fastutil.shorts.ShortSet;
|
||||
import java.util.List;
|
||||
@@ -0,0 +0,0 @@ public class PlayerChunk {
|
||||
private CompletableFuture<IChunkAccess> chunkSave;
|
||||
public int oldTicketLevel;
|
||||
@@ -639,11 +647,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- final ChunkCoordIntPair location; // Paper - private -> package
|
||||
+ volatile int n; public final int getCurrentPriority() { return n; } // Paper - OBFHELPER - make volatile since this is concurrently accessed
|
||||
+ public final ChunkCoordIntPair location; // Paper - private -> public
|
||||
private final short[] dirtyBlocks;
|
||||
private int dirtyCount;
|
||||
private boolean p;
|
||||
private final ShortSet[] dirtyBlocks;
|
||||
private int r;
|
||||
@@ -0,0 +0,0 @@ public class PlayerChunk {
|
||||
private boolean hasBeenLoaded;
|
||||
private boolean x;
|
||||
|
||||
private final PlayerChunkMap chunkMap; // Paper
|
||||
+ public WorldServer getWorld() { return chunkMap.world; } // Paper
|
||||
@@ -658,7 +666,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ volatile int neighborPriority = -1;
|
||||
+ volatile int priorityBoost = 0;
|
||||
+ public final java.util.concurrent.ConcurrentHashMap<PlayerChunk, ChunkStatus> neighbors = new java.util.concurrent.ConcurrentHashMap<>();
|
||||
+ public final it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<Integer> neighborPriorities = new it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap<>();
|
||||
+ public final Long2ObjectOpenHashMap<Integer> neighborPriorities = new Long2ObjectOpenHashMap<>();
|
||||
+
|
||||
+ private int getDemandedPriority() {
|
||||
+ int priority = neighborPriority; // if we have a neighbor priority, use it
|
||||
@@ -844,7 +852,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
this.entityTickingFuture = PlayerChunk.UNLOADED_CHUNK_FUTURE;
|
||||
}
|
||||
|
||||
- this.v.a(this.location, this::k, this.ticketLevel, this::d);
|
||||
- this.u.a(this.location, this::k, this.ticketLevel, this::d);
|
||||
+ // Paper start - raise IO/load priority if priority changes, use our preferred priority
|
||||
+ priorityBoost = chunkMap.chunkDistanceManager.getChunkPriority(location);
|
||||
+ int priority = getDemandedPriority();
|
||||
@@ -858,7 +866,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ chunkMap.world.asyncChunkTaskManager.raisePriority(location.x, location.z, ioPriority);
|
||||
+ }
|
||||
+ if (getCurrentPriority() != priority) {
|
||||
+ this.v.a(this.location, this::getCurrentPriority, priority, this::setPriority); // use preferred priority
|
||||
+ this.u.a(this.location, this::getCurrentPriority, priority, this::setPriority); // use preferred priority
|
||||
+ int neighborsPriority = getNeighborsPriority();
|
||||
+ this.neighbors.forEach((neighbor, neighborDesired) -> neighbor.setNeighborPriority(this, neighborsPriority));
|
||||
+ }
|
||||
@@ -884,6 +892,14 @@ diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/j
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -0,0 +0,0 @@ import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
|
||||
import it.unimi.dsi.fastutil.longs.Long2ByteMap;
|
||||
import it.unimi.dsi.fastutil.longs.Long2ByteOpenHashMap;
|
||||
+import it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap; // Paper
|
||||
import it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap;
|
||||
import it.unimi.dsi.fastutil.longs.Long2ObjectMap.Entry;
|
||||
import it.unimi.dsi.fastutil.longs.LongIterator;
|
||||
@@ -0,0 +0,0 @@ import org.apache.commons.lang3.mutable.MutableBoolean;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -980,7 +996,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ return playerchunk == null || unloadQueue.contains(playerchunk.location.pair());
|
||||
+ }
|
||||
+
|
||||
+ private void updateChunkPriorityMap(it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap map, long chunk, int level) {
|
||||
+ private void updateChunkPriorityMap(Long2IntOpenHashMap map, long chunk, int level) {
|
||||
+ int prev = map.getOrDefault(chunk, -1);
|
||||
+ if (level > prev) {
|
||||
+ map.put(chunk, level);
|
||||
@@ -993,7 +1009,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ return;
|
||||
+ }
|
||||
+ player.lastHighPriorityChecked = currentTick;
|
||||
+ it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap priorities = new it.unimi.dsi.fastutil.longs.Long2IntOpenHashMap();
|
||||
+ Long2IntOpenHashMap priorities = new Long2IntOpenHashMap();
|
||||
+
|
||||
+ int viewDistance = getEffectiveNoTickViewDistance();
|
||||
+ BlockPosition.MutableBlockPosition pos = new BlockPosition.MutableBlockPosition();
|
||||
|
||||
Reference in New Issue
Block a user