Performance patches prerequisite (#2802)
Prereq changes for the coming storm of performance patches. Includes optimising incremental saving
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 0080550b42ff659ffcbaea501571e8c4208e4549 Mon Sep 17 00:00:00 2001
|
||||
From a83fe1ede08bcf43c4155c8469f7b8e2b2b59245 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 21 Jul 2018 14:27:34 -0400
|
||||
Subject: [PATCH] Duplicate UUID Resolve Option
|
||||
@@ -33,7 +33,7 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA
|
||||
It is recommended you regenerate the entities, as these were legit entities, and deserve your love.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 4ba72275b..572679e4d 100644
|
||||
index 4ba72275b9..572679e4d1 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -442,4 +442,43 @@ public class PaperWorldConfig {
|
||||
@@ -81,10 +81,10 @@ index 4ba72275b..572679e4d 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index c7c600b80..64c327669 100644
|
||||
index 7ecff4443a..d9c53cdc4b 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -391,6 +391,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -396,6 +396,7 @@ public class Chunk implements IChunkAccess {
|
||||
if (i != this.loc.x || j != this.loc.z) {
|
||||
Chunk.LOGGER.warn("Wrong location! ({}, {}) should be ({}, {}), {}", i, j, this.loc.x, this.loc.z, entity);
|
||||
entity.dead = true;
|
||||
@@ -93,7 +93,7 @@ index c7c600b80..64c327669 100644
|
||||
|
||||
int k = MathHelper.floor(entity.locY() / 16.0D);
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 716d30b8d..7c7cd851c 100644
|
||||
index 716d30b8de..7c7cd851c0 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -2743,6 +2743,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -105,7 +105,7 @@ index 716d30b8d..7c7cd851c 100644
|
||||
this.uniqueID = uuid;
|
||||
this.am = this.uniqueID.toString();
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index 7edca1744..314c77767 100644
|
||||
index e93741a8e8..b3fa3bd874 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -1,6 +1,7 @@
|
||||
@@ -134,7 +134,7 @@ index 7edca1744..314c77767 100644
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.CompletionException;
|
||||
import java.util.concurrent.Executor;
|
||||
@@ -602,19 +606,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -631,19 +635,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
||||
for (int j = 0; j < i; ++j) {
|
||||
List<Entity> entityslice = aentityslice[j]; // Spigot
|
||||
@@ -201,7 +201,7 @@ index 7edca1744..314c77767 100644
|
||||
if (list == null) {
|
||||
list = Lists.newArrayList(new Entity[]{entity});
|
||||
} else {
|
||||
@@ -622,6 +662,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -651,6 +691,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -210,7 +210,7 @@ index 7edca1744..314c77767 100644
|
||||
|
||||
if (list != null) {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 3c94aa48c..f973b0799 100644
|
||||
index 4a648f88ba..36d5466138 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -3,6 +3,8 @@ package net.minecraft.server;
|
||||
@@ -222,7 +222,7 @@ index 3c94aa48c..f973b0799 100644
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Queues;
|
||||
@@ -1055,8 +1057,23 @@ public class WorldServer extends World {
|
||||
@@ -1056,8 +1058,23 @@ public class WorldServer extends World {
|
||||
if (entity1 == null) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -248,7 +248,7 @@ index 3c94aa48c..f973b0799 100644
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1195,7 +1212,7 @@ public class WorldServer extends World {
|
||||
@@ -1197,7 +1214,7 @@ public class WorldServer extends World {
|
||||
}
|
||||
|
||||
Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity);
|
||||
|
||||
Reference in New Issue
Block a user