Fix many issues with dupe uuid resolve patch
This was not applied correctly, and would completely blow up chunk entity registration if this feature was turned off.... Additionally, change how the entities are removed to be more consistent with other code. Surface some of the logs indicating there is a problem as we are having so many issues with entities that we don't need to be surpressing logs like that.
Dieser Commit ist enthalten in:
Ursprung
756da10d46
Commit
2ec0274b88
@ -1,4 +1,4 @@
|
||||
From 91b68c7d93039aeed7ef7c5403a968460c80da50 Mon Sep 17 00:00:00 2001
|
||||
From 5c5e8a509be83b9cfa96f7bf7c17729a34ae2093 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
|
||||
@ -105,7 +105,7 @@ index b45afbcde2..4021bb5b88 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 f640d2ac76..8c6cd4cd6e 100644
|
||||
index f640d2ac76..5763538905 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -1,6 +1,7 @@
|
||||
@ -134,49 +134,40 @@ index f640d2ac76..8c6cd4cd6e 100644
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.CompletionException;
|
||||
import java.util.concurrent.Executor;
|
||||
@@ -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
|
||||
- Iterator iterator = entityslice.iterator();
|
||||
@@ -641,9 +645,9 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
entity.die();
|
||||
needsRemoval = true;
|
||||
}
|
||||
-
|
||||
- while (iterator.hasNext()) {
|
||||
- Entity entity = (Entity) iterator.next();
|
||||
- // CraftBukkit start - these are spawned serialized (DefinedStructure) and we don't call an add event below at the moment due to ordering complexities
|
||||
- boolean needsRemoval = false;
|
||||
- if (chunk.needsDecoration && !this.world.getServer().getServer().getSpawnNPCs() && entity instanceof NPC) {
|
||||
- entity.die();
|
||||
- needsRemoval = true;
|
||||
- }
|
||||
|
||||
- if (!(entity instanceof EntityHuman) && (needsRemoval || !this.world.addEntityChunk(entity))) {
|
||||
- // CraftBukkit end
|
||||
+ // CraftBukkit end
|
||||
+ checkDupeUUID(entity); // Paper
|
||||
+ if (!(entity instanceof EntityHuman) && (entity.dead || !this.world.addEntityChunk(entity))) { // Paper
|
||||
if (list == null) {
|
||||
list = Lists.newArrayList(new Entity[]{entity});
|
||||
} else {
|
||||
@@ -670,6 +674,44 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
});
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ private void checkDupeUUID(Entity entity) {
|
||||
+ PaperWorldConfig.DuplicateUUIDMode mode = world.paperConfig.duplicateUUIDMode;
|
||||
+ if (mode == PaperWorldConfig.DuplicateUUIDMode.WARN || mode == PaperWorldConfig.DuplicateUUIDMode.DELETE || mode == PaperWorldConfig.DuplicateUUIDMode.SAFE_REGEN) {
|
||||
+ Map<UUID, Entity> thisChunk = new HashMap<>();
|
||||
+ for (Iterator<Entity> iterator = ((List<Entity>) entityslice).iterator(); iterator.hasNext(); ) {
|
||||
+ Entity entity = iterator.next();
|
||||
+
|
||||
+ // CraftBukkit start - these are spawned serialized (DefinedStructure) and we don't call an add event below at the moment due to ordering complexities
|
||||
+ if (chunk.needsDecoration && !this.world.getServer().getServer().getSpawnNPCs() && entity instanceof NPC) {
|
||||
+ entity.die();
|
||||
+ }
|
||||
// CraftBukkit end
|
||||
+
|
||||
+ if (entity.dead || entity.valid) continue;
|
||||
+ Entity other = ((WorldServer) world).getEntity(entity.uniqueID);
|
||||
+ if (other == null || other.dead) {
|
||||
+ other = thisChunk.get(entity.uniqueID);
|
||||
+ if (mode != PaperWorldConfig.DuplicateUUIDMode.WARN
|
||||
+ && mode != PaperWorldConfig.DuplicateUUIDMode.DELETE
|
||||
+ && mode != PaperWorldConfig.DuplicateUUIDMode.SAFE_REGEN) {
|
||||
+ return;
|
||||
+ }
|
||||
+ Entity other = world.getEntity(entity.uniqueID);
|
||||
+
|
||||
+ if (mode == PaperWorldConfig.DuplicateUUIDMode.SAFE_REGEN && other != null && !other.dead
|
||||
+ && java.util.Objects.equals(other.getSaveID(), entity.getSaveID())
|
||||
+ && Objects.equals(other.getSaveID(), entity.getSaveID())
|
||||
+ && entity.getBukkitEntity().getLocation().distance(other.getBukkitEntity().getLocation()) < world.paperConfig.duplicateUUIDDeleteRange
|
||||
+ ) {
|
||||
+ if (World.DEBUG_ENTITIES) LOGGER.warn("[DUPE-UUID] Duplicate UUID found used by " + other + ", deleted entity " + entity + " because it was near the duplicate and likely an actual duplicate. See https://github.com/PaperMC/Paper/issues/1223 for discussion on what this is about.");
|
||||
+ entity.dead = true;
|
||||
+ iterator.remove();
|
||||
+ continue;
|
||||
+ entity.die();
|
||||
+ return;
|
||||
+ }
|
||||
+ if (other != null && !other.dead) {
|
||||
+ switch (mode) {
|
||||
@ -187,8 +178,7 @@ index f640d2ac76..8c6cd4cd6e 100644
|
||||
+ }
|
||||
+ case DELETE: {
|
||||
+ if (World.DEBUG_ENTITIES) LOGGER.warn("[DUPE-UUID] Duplicate UUID found used by " + other + ", deleted entity " + entity + ". See https://github.com/PaperMC/Paper/issues/1223 for discussion on what this is about.");
|
||||
+ entity.dead = true;
|
||||
+ iterator.remove();
|
||||
+ entity.die();
|
||||
+ break;
|
||||
+ }
|
||||
+ default:
|
||||
@ -196,21 +186,14 @@ index f640d2ac76..8c6cd4cd6e 100644
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ if (!(entity instanceof EntityHuman) && (entity.dead || !this.world.addEntityChunk(entity))) { // Paper
|
||||
if (list == null) {
|
||||
list = Lists.newArrayList(new Entity[]{entity});
|
||||
} else {
|
||||
@@ -651,6 +691,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
}
|
||||
}
|
||||
}
|
||||
+ } // Paper
|
||||
}
|
||||
|
||||
if (list != null) {
|
||||
+
|
||||
public CompletableFuture<Either<Chunk, PlayerChunk.Failure>> a(PlayerChunk playerchunk) {
|
||||
ChunkCoordIntPair chunkcoordintpair = playerchunk.i();
|
||||
CompletableFuture<Either<List<IChunkAccess>, PlayerChunk.Failure>> completablefuture = this.a(chunkcoordintpair, 1, (i) -> {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 1221c30a99..ea3a890027 100644
|
||||
index 1221c30a99..ff58e0190e 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,22 +205,22 @@ index 1221c30a99..ea3a890027 100644
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Queues;
|
||||
@@ -1060,8 +1062,23 @@ public class WorldServer extends World {
|
||||
@@ -1060,8 +1062,24 @@ public class WorldServer extends World {
|
||||
if (entity1 == null) {
|
||||
return false;
|
||||
} else {
|
||||
- WorldServer.LOGGER.error("Keeping entity {} that already exists with UUID {}", EntityTypes.getName(entity1.getEntityType()), entity.getUniqueID().toString()); // CraftBukkit // paper
|
||||
- WorldServer.LOGGER.error("Deleting duplicate entity {}", entity); // CraftBukkit // paper
|
||||
+ // Paper start
|
||||
+ if (entity1.dead) {
|
||||
+ unregisterEntity(entity1); // remove the existing entity
|
||||
+ return false;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ WorldServer.LOGGER.error("Keeping entity {} that already exists with UUID {}", entity1, entity.getUniqueID().toString()); // CraftBukkit // paper
|
||||
WorldServer.LOGGER.error("Deleting duplicate entity {}", entity); // CraftBukkit // paper
|
||||
+
|
||||
+ // Paper start
|
||||
+ if (DEBUG_ENTITIES && entity.world.paperConfig.duplicateUUIDMode != PaperWorldConfig.DuplicateUUIDMode.NOTHING) {
|
||||
+ WorldServer.LOGGER.error("Keeping entity {} that already exists with UUID {}", EntityTypes.getName(entity1.getEntityType()), entity.getUniqueID().toString()); // CraftBukkit // paper
|
||||
+ WorldServer.LOGGER.error("Deleting duplicate entity {}", entity); // CraftBukkit // paper
|
||||
+
|
||||
+ if (entity1.addedToWorldStack != null) {
|
||||
+ entity1.addedToWorldStack.printStackTrace();
|
||||
+ }
|
||||
@ -248,15 +231,6 @@ index 1221c30a99..ea3a890027 100644
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1201,7 +1218,7 @@ public class WorldServer extends World {
|
||||
}
|
||||
|
||||
Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity);
|
||||
- if (old != null && old.getId() != entity.getId() && old.valid) {
|
||||
+ if (old != null && old.getId() != entity.getId() && old.valid && entity.world.paperConfig.duplicateUUIDMode != com.destroystokyo.paper.PaperWorldConfig.DuplicateUUIDMode.NOTHING) { // Paper
|
||||
Logger logger = LogManager.getLogger();
|
||||
logger.error("Overwrote an existing entity " + old + " with " + entity);
|
||||
if (DEBUG_ENTITIES) {
|
||||
--
|
||||
2.25.2
|
||||
2.25.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 0abcca16fedd201c9695f0adbe334a3f35bffe13 Mon Sep 17 00:00:00 2001
|
||||
From 77aee9d21edeabdc2ddc8e6b1102f74d024c6d53 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 13 Sep 2014 23:14:43 -0400
|
||||
Subject: [PATCH] Configurable Keep Spawn Loaded range per world
|
||||
@ -114,10 +114,10 @@ index 3868572aed..ae77805f71 100644
|
||||
@Override
|
||||
public void a(ChunkCoordIntPair chunkcoordintpair) {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index ea3a890027..f4ee20efd9 100644
|
||||
index ff58e0190e..4ccc35d614 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1582,13 +1582,85 @@ public class WorldServer extends World {
|
||||
@@ -1583,13 +1583,85 @@ public class WorldServer extends World {
|
||||
return ((PersistentIdCounts) this.getMinecraftServer().getWorldServer(DimensionManager.OVERWORLD).getWorldPersistentData().a(PersistentIdCounts::new, "idcounts")).a();
|
||||
}
|
||||
|
||||
@ -237,5 +237,5 @@ index 8b6d22e710..661a89c5d6 100644
|
||||
|
||||
@Override
|
||||
--
|
||||
2.26.0
|
||||
2.25.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From e31061be086397e57fc5dcd618404481cf45437b Mon Sep 17 00:00:00 2001
|
||||
From b611e2e03f3e4157a328243dbe2d9dc9d7040c5e Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Sat, 15 Jun 2019 08:54:33 -0700
|
||||
Subject: [PATCH] Fix World#isChunkGenerated calls
|
||||
@ -132,10 +132,10 @@ index 66a389a67e..027a6b0fd2 100644
|
||||
|
||||
public CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> getStatusFutureUnchecked(ChunkStatus chunkstatus) {
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index 5c28ccc004..04728dca77 100644
|
||||
index 3712f495ff..ef8418ffa7 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -967,12 +967,62 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -968,12 +968,62 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@ -376,5 +376,5 @@ index 661a89c5d6..a71bb86508 100644
|
||||
|
||||
@Override
|
||||
--
|
||||
2.26.0
|
||||
2.25.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ec3ea5e0e353c0e0da2ef3289d63048cff77b89d Mon Sep 17 00:00:00 2001
|
||||
From 5a2ef5a435dd994c2f40ebc52e853b53ccf07874 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Sat, 22 Jun 2019 04:20:47 -0700
|
||||
Subject: [PATCH] Use ChunkStatus cache when saving protochunks
|
||||
@ -7,10 +7,10 @@ The cache should contain the chunk status when saving. If not it
|
||||
will load it.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index 04728dca7..72ae46eab 100644
|
||||
index ef8418ffa7..02ed8c6c4c 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -843,8 +843,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -844,8 +844,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
NBTTagCompound nbttagcompound;
|
||||
|
||||
if (chunkstatus.getType() != ChunkStatus.Type.LEVELCHUNK) {
|
||||
|
@ -1,11 +1,11 @@
|
||||
From c78e30a9f58d0a2a14f1b2ad02e0e87f1237cf9b Mon Sep 17 00:00:00 2001
|
||||
From 4b9141bb031d1027dd96f30a430075a97acc6cf2 Mon Sep 17 00:00:00 2001
|
||||
From: stonar96 <minecraft.stonar96@gmail.com>
|
||||
Date: Mon, 20 Aug 2018 03:03:58 +0200
|
||||
Subject: [PATCH] Anti-Xray
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 486761521..df24e3297 100644
|
||||
index 4867615215..df24e3297b 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -1,7 +1,11 @@
|
||||
@ -66,7 +66,7 @@ index 486761521..df24e3297 100644
|
||||
}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java
|
||||
new file mode 100644
|
||||
index 000000000..f7e376ce6
|
||||
index 0000000000..f7e376ce6a
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java
|
||||
@@ -0,0 +1,46 @@
|
||||
@ -118,7 +118,7 @@ index 000000000..f7e376ce6
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
|
||||
new file mode 100644
|
||||
index 000000000..23626bef3
|
||||
index 0000000000..23626bef3a
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
|
||||
@@ -0,0 +1,782 @@
|
||||
@ -906,7 +906,7 @@ index 000000000..23626bef3
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java
|
||||
new file mode 100644
|
||||
index 000000000..a68bace35
|
||||
index 0000000000..a68bace353
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java
|
||||
@@ -0,0 +1,81 @@
|
||||
@ -993,7 +993,7 @@ index 000000000..a68bace35
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java
|
||||
new file mode 100644
|
||||
index 000000000..067dfb2f1
|
||||
index 0000000000..067dfb2f14
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java
|
||||
@@ -0,0 +1,31 @@
|
||||
@ -1030,7 +1030,7 @@ index 000000000..067dfb2f1
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
|
||||
new file mode 100644
|
||||
index 000000000..cc586827a
|
||||
index 0000000000..cc586827aa
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
|
||||
@@ -0,0 +1,56 @@
|
||||
@ -1092,7 +1092,7 @@ index 000000000..cc586827a
|
||||
+}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
|
||||
new file mode 100644
|
||||
index 000000000..37093419c
|
||||
index 0000000000..37093419cf
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
|
||||
@@ -0,0 +1,84 @@
|
||||
@ -1181,7 +1181,7 @@ index 000000000..37093419c
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 4d300699f..06b4dc628 100644
|
||||
index 4d300699f1..06b4dc6284 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -320,7 +320,7 @@ public class Chunk implements IChunkAccess {
|
||||
@ -1194,7 +1194,7 @@ index 4d300699f..06b4dc628 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 961228e9d..a950ad801 100644
|
||||
index 961228e9df..a950ad801d 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -57,7 +57,7 @@ public class ChunkRegionLoader {
|
||||
@ -1216,7 +1216,7 @@ index 961228e9d..a950ad801 100644
|
||||
protochunk.a(biomestorage);
|
||||
object = protochunk;
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
|
||||
index 0d5deee36..4526527ac 100644
|
||||
index 0d5deee365..4526527aca 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkSection.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
|
||||
@@ -6,21 +6,31 @@ public class ChunkSection {
|
||||
@ -1255,7 +1255,7 @@ index 0d5deee36..4526527ac 100644
|
||||
|
||||
public IBlockData getType(int i, int j, int k) {
|
||||
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
index 2c1d1b1a5..44aed6727 100644
|
||||
index 2c1d1b1a55..44aed67274 100644
|
||||
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
@@ -3,6 +3,7 @@ package net.minecraft.server;
|
||||
@ -1377,7 +1377,7 @@ index 2c1d1b1a5..44aed6727 100644
|
||||
|
||||
if (this.h == this.b) {
|
||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
index e156804f7..96a785af2 100644
|
||||
index e156804f7a..96a785af27 100644
|
||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
@@ -42,7 +42,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@ -1440,7 +1440,7 @@ index e156804f7..96a785af2 100644
|
||||
public void a() {
|
||||
this.o();
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
index 47710067a..ef7ade797 100644
|
||||
index 47710067a6..ef7ade797b 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -1533,7 +1533,7 @@ index 47710067a..ef7ade797 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
index 027a6b0fd..50135446f 100644
|
||||
index 027a6b0fd2..50135446f7 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
@@ -220,6 +220,11 @@ public class PlayerChunk {
|
||||
@ -1558,7 +1558,7 @@ index 027a6b0fd..50135446f 100644
|
||||
this.a(new PacketPlayOutMultiBlockChange(this.dirtyCount, this.dirtyBlocks, chunk), false);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index 72ae46eab..5ef1aedbe 100644
|
||||
index 02ed8c6c4c..7dec34cb76 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -603,7 +603,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@ -1570,7 +1570,7 @@ index 72ae46eab..5ef1aedbe 100644
|
||||
}, this.executor);
|
||||
}
|
||||
|
||||
@@ -1321,7 +1321,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1322,7 +1322,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
||||
private void a(EntityPlayer entityplayer, Packet<?>[] apacket, Chunk chunk) {
|
||||
if (apacket[0] == null) {
|
||||
@ -1580,7 +1580,7 @@ index 72ae46eab..5ef1aedbe 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
index e2e5c17c2..ce4340a47 100644
|
||||
index e2e5c17c24..ce4340a476 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
@@ -264,6 +264,8 @@ public class PlayerInteractManager {
|
||||
@ -1593,7 +1593,7 @@ index e2e5c17c2..ce4340a47 100644
|
||||
|
||||
public void a(BlockPosition blockposition, PacketPlayInBlockDig.EnumPlayerDigType packetplayinblockdig_enumplayerdigtype, String s) {
|
||||
diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||
index 39339fa27..f376e2106 100644
|
||||
index 39339fa275..f376e21068 100644
|
||||
--- a/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||
@@ -45,16 +45,28 @@ public class ProtoChunk implements IChunkAccess {
|
||||
@ -1636,7 +1636,7 @@ index 39339fa27..f376e2106 100644
|
||||
|
||||
return this.j[i];
|
||||
diff --git a/src/main/java/net/minecraft/server/TicketType.java b/src/main/java/net/minecraft/server/TicketType.java
|
||||
index f82db93f8..1d1b267f3 100644
|
||||
index f82db93f88..1d1b267f32 100644
|
||||
--- a/src/main/java/net/minecraft/server/TicketType.java
|
||||
+++ b/src/main/java/net/minecraft/server/TicketType.java
|
||||
@@ -21,6 +21,7 @@ public class TicketType<T> {
|
||||
@ -1648,7 +1648,7 @@ index f82db93f8..1d1b267f3 100644
|
||||
public static <T> TicketType<T> a(String s, Comparator<T> comparator) {
|
||||
return new TicketType<>(s, comparator, 0L);
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 18e0ca2c7..75829b4de 100644
|
||||
index 18e0ca2c78..75829b4de5 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -2,6 +2,8 @@ package net.minecraft.server;
|
||||
@ -1685,7 +1685,7 @@ index 18e0ca2c7..75829b4de 100644
|
||||
if (iblockdata1 == null) {
|
||||
// CraftBukkit start - remove blockstate if failed
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
|
||||
index 8191e7c34..969d548de 100644
|
||||
index 8191e7c348..969d548de2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
|
||||
@@ -21,9 +21,11 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData {
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 2c601e0789d5d74301bd9154f2438d97e0ae95b6 Mon Sep 17 00:00:00 2001
|
||||
From 9b623f17303e524e3d3d61b6bfe53ad88a94cee7 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sun, 28 Jul 2019 00:51:11 +0100
|
||||
Subject: [PATCH] Mark entities as being ticked when notifying navigation
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 85c96467c1..5063544a44 100644
|
||||
index 4b65a232ff..df7503a5ec 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1396,6 +1396,7 @@ public class WorldServer extends World {
|
||||
@@ -1397,6 +1397,7 @@ public class WorldServer extends World {
|
||||
VoxelShape voxelshape1 = iblockdata1.getCollisionShape(this, blockposition);
|
||||
|
||||
if (VoxelShapes.c(voxelshape, voxelshape1, OperatorBoolean.NOT_SAME)) {
|
||||
@ -16,7 +16,7 @@ index 85c96467c1..5063544a44 100644
|
||||
Iterator iterator = this.navigators.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1406,6 +1407,7 @@ public class WorldServer extends World {
|
||||
@@ -1407,6 +1408,7 @@ public class WorldServer extends World {
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,5 +25,5 @@ index 85c96467c1..5063544a44 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.25.2
|
||||
2.25.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 3a31b47397ded83cb461dbdad9e81ab444e5bd0e Mon Sep 17 00:00:00 2001
|
||||
From 4fb6b0ed6ac8843b49ecfab30312d94a96af89b7 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Sat, 13 Jul 2019 09:23:10 -0700
|
||||
Subject: [PATCH] Asynchronous chunk IO and loading
|
||||
@ -161,7 +161,7 @@ index 27ce4a828e..30bafb214b 100644
|
||||
|
||||
public static Timing getTickList(WorldServer worldserver, String timingsType) {
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 4735d30253..5093c56f4e 100644
|
||||
index dbd1439970..6916ed30c4 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -3055,7 +3055,7 @@ index 50135446f7..b38bc67758 100644
|
||||
completablefuture = (CompletableFuture) this.statusFutures.get(i);
|
||||
if (completablefuture != null) {
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index 5ef1aedbed..a3271d6c28 100644
|
||||
index 7dec34cb76..d17204bd28 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -63,7 +63,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@ -3297,7 +3297,7 @@ index 5ef1aedbed..a3271d6c28 100644
|
||||
}
|
||||
|
||||
private CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> b(PlayerChunk playerchunk, ChunkStatus chunkstatus) {
|
||||
@@ -821,18 +914,43 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -822,18 +915,43 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
return this.u.get();
|
||||
}
|
||||
|
||||
@ -3349,7 +3349,7 @@ index 5ef1aedbed..a3271d6c28 100644
|
||||
|
||||
ichunkaccess.setLastSaved(this.world.getTime());
|
||||
ichunkaccess.setNeedsSaving(false);
|
||||
@@ -843,28 +961,35 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -844,28 +962,35 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
NBTTagCompound nbttagcompound;
|
||||
|
||||
if (chunkstatus.getType() != ChunkStatus.Type.LEVELCHUNK) {
|
||||
@ -3387,7 +3387,7 @@ index 5ef1aedbed..a3271d6c28 100644
|
||||
}
|
||||
|
||||
protected void setViewDistance(int i) {
|
||||
@@ -968,6 +1093,42 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -969,6 +1094,42 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
}
|
||||
}
|
||||
|
||||
@ -3430,7 +3430,7 @@ index 5ef1aedbed..a3271d6c28 100644
|
||||
@Nullable
|
||||
public NBTTagCompound readChunkData(ChunkCoordIntPair chunkcoordintpair) throws IOException { // Paper - private -> public
|
||||
NBTTagCompound nbttagcompound = this.read(chunkcoordintpair);
|
||||
@@ -990,33 +1151,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -991,33 +1152,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
||||
// Paper start - chunk status cache "api"
|
||||
public ChunkStatus getChunkStatusOnDiskIfCached(ChunkCoordIntPair chunkPos) {
|
||||
@ -3497,7 +3497,7 @@ index 5ef1aedbed..a3271d6c28 100644
|
||||
}
|
||||
|
||||
public IChunkAccess getUnloadingChunk(int chunkX, int chunkZ) {
|
||||
@@ -1025,6 +1208,39 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1026,6 +1209,39 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@ -3537,7 +3537,7 @@ index 5ef1aedbed..a3271d6c28 100644
|
||||
boolean isOutsideOfRange(ChunkCoordIntPair chunkcoordintpair) {
|
||||
// Spigot start
|
||||
return isOutsideOfRange(chunkcoordintpair, false);
|
||||
@@ -1370,6 +1586,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1371,6 +1587,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
||||
}
|
||||
|
||||
@ -3933,7 +3933,7 @@ index c999f8c9bf..b59ef1a633 100644
|
||||
|
||||
HAS_SPACE(VillagePlaceRecord::d), IS_OCCUPIED(VillagePlaceRecord::e), ANY((villageplacerecord) -> {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 5063544a44..2b22bf5090 100644
|
||||
index df7503a5ec..d4ef2403d5 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -82,6 +82,79 @@ public class WorldServer extends World {
|
||||
@ -4107,5 +4107,5 @@ index 07936eeba2..5bdcdcf9e8 100644
|
||||
log.log( Level.SEVERE, "------------------------------" );
|
||||
//
|
||||
--
|
||||
2.26.0
|
||||
2.25.1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 76a36ebf16641e3a4a047c4fa2c0befdf501abdf Mon Sep 17 00:00:00 2001
|
||||
From bc0885bc1fc6b4c82e1e9c7d24383a0a35a568e0 Mon Sep 17 00:00:00 2001
|
||||
From: froobynooby <froobynooby@froobworld.com>
|
||||
Date: Thu, 20 Feb 2020 15:50:49 +0930
|
||||
Subject: [PATCH] Reduce entity tracker updates on move
|
||||
@ -69,7 +69,7 @@ index e7bfbc3307..43774bc9a5 100644
|
||||
// CraftBukkit start
|
||||
public String displayName;
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index 57bea926a6..91f4b70117 100644
|
||||
index 10b8746ad6..8b3beed91c 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -133,6 +133,39 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@ -120,7 +120,7 @@ index 57bea926a6..91f4b70117 100644
|
||||
}
|
||||
|
||||
public void updatePlayerMobTypeMap(Entity entity) {
|
||||
@@ -1334,8 +1368,19 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1335,8 +1369,19 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
}
|
||||
|
||||
public void movePlayer(EntityPlayer entityplayer) {
|
||||
@ -141,7 +141,7 @@ index 57bea926a6..91f4b70117 100644
|
||||
while (objectiterator.hasNext()) {
|
||||
PlayerChunkMap.EntityTracker playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next();
|
||||
|
||||
@@ -1345,6 +1390,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1346,6 +1391,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
playerchunkmap_entitytracker.updatePlayer(entityplayer);
|
||||
}
|
||||
}
|
||||
@ -149,7 +149,7 @@ index 57bea926a6..91f4b70117 100644
|
||||
|
||||
int i = MathHelper.floor(entityplayer.locX()) >> 4;
|
||||
int j = MathHelper.floor(entityplayer.locZ()) >> 4;
|
||||
@@ -1486,12 +1532,21 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1487,12 +1533,21 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
||||
playerchunkmap_entitytracker.clear(entityplayer);
|
||||
}
|
||||
@ -171,7 +171,7 @@ index 57bea926a6..91f4b70117 100644
|
||||
}
|
||||
entity.tracker = null; // Paper - We're no longer tracked
|
||||
}
|
||||
@@ -1532,7 +1587,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1533,7 +1588,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
}
|
||||
world.timings.tracker2.stopTiming(); // Paper
|
||||
}
|
||||
@ -180,7 +180,7 @@ index 57bea926a6..91f4b70117 100644
|
||||
|
||||
}
|
||||
|
||||
@@ -1581,6 +1636,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1582,6 +1637,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -188,7 +188,7 @@ index 57bea926a6..91f4b70117 100644
|
||||
|
||||
Iterator iterator;
|
||||
Entity entity1;
|
||||
@@ -1677,6 +1733,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1678,6 +1734,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
org.spigotmc.AsyncCatcher.catchOp("player tracker clear"); // Spigot
|
||||
if (this.trackedPlayers.remove(entityplayer)) {
|
||||
this.trackerEntry.a(entityplayer);
|
||||
@ -196,7 +196,7 @@ index 57bea926a6..91f4b70117 100644
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1713,9 +1770,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1714,9 +1771,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
||||
if (flag1 && this.trackedPlayerMap.putIfAbsent(entityplayer, true) == null) { // Paper
|
||||
this.trackerEntry.b(entityplayer);
|
||||
@ -209,5 +209,5 @@ index 57bea926a6..91f4b70117 100644
|
||||
|
||||
}
|
||||
--
|
||||
2.26.0
|
||||
2.25.1
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren