Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 19:10:09 +01:00
Remove the "Entity already removed" warning unless debug entities is on
Dieser Commit ist enthalten in:
Ursprung
de4487435d
Commit
c75015c1a4
@ -1,4 +1,4 @@
|
||||
From 6a67fa1b1d88393b696722bcc806fb6c8c0feeb3 Mon Sep 17 00:00:00 2001
|
||||
From f8ad60365b915601f53595fa8e6f4a860179cf4c Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 19 Jul 2018 01:08:05 -0400
|
||||
Subject: [PATCH] Re-add vanilla entity warnings for duplicates
|
||||
@ -8,18 +8,9 @@ These are a critical sign that somethin went wrong, and you've lost some data...
|
||||
We should kind of know about these things you know.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index b939c31b23..b76b8dbf5d 100644
|
||||
index b939c31b23..27278078e4 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -974,7 +974,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
|
||||
private boolean j(Entity entity) {
|
||||
if (entity.dead) {
|
||||
- // WorldServer.a.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getName(entity.P())); // CraftBukkit
|
||||
+ WorldServer.a.warn("Tried to add entity {} but it was marked as removed already: " + entity); // CraftBukkit // Paper
|
||||
return false;
|
||||
} else {
|
||||
UUID uuid = entity.getUniqueID();
|
||||
@@ -986,7 +986,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
this.g.remove(entity1);
|
||||
} else {
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 13ef375a527f72393b88a6aef14b2ddbd2113677 Mon Sep 17 00:00:00 2001
|
||||
From afa37770f08dd663e681ec36f7a6742fe5a9073d Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 21 Jul 2018 08:25:40 -0400
|
||||
Subject: [PATCH] Add Debug Entities option to debug dupe uuid issues
|
||||
@ -18,7 +18,7 @@ index 42c1c47c58..3606c78843 100644
|
||||
if (bukkitEntity == null) {
|
||||
bukkitEntity = CraftEntity.getEntity(world.getServer(), this);
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index b76b8dbf5d..709f3e525c 100644
|
||||
index 27278078e4..f6becaae43 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -55,6 +55,10 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@ -32,15 +32,21 @@ index b76b8dbf5d..709f3e525c 100644
|
||||
|
||||
// Add env and gen to constructor
|
||||
public WorldServer(MinecraftServer minecraftserver, IDataManager idatamanager, PersistentCollection persistentcollection, WorldData worlddata, DimensionManager dimensionmanager, MethodProfiler methodprofiler, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen) {
|
||||
@@ -975,6 +979,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -974,7 +978,12 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
|
||||
private boolean j(Entity entity) {
|
||||
if (entity.dead) {
|
||||
WorldServer.a.warn("Tried to add entity {} but it was marked as removed already: " + entity); // CraftBukkit // Paper
|
||||
+ if (DEBUG_ENTITIES) getAddToWorldStackTrace(entity).printStackTrace();
|
||||
- // WorldServer.a.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getName(entity.P())); // CraftBukkit
|
||||
+ // Paper start
|
||||
+ if (DEBUG_ENTITIES) {
|
||||
+ new Throwable("Tried to add entity " + entity + " but it was marked as removed already").printStackTrace(); // CraftBukkit
|
||||
+ getAddToWorldStackTrace(entity).printStackTrace();
|
||||
+ }
|
||||
+ // Paper end
|
||||
return false;
|
||||
} else {
|
||||
UUID uuid = entity.getUniqueID();
|
||||
@@ -986,8 +991,14 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -986,8 +995,14 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
this.g.remove(entity1);
|
||||
} else {
|
||||
if (!(entity instanceof EntityHuman)) {
|
||||
@ -56,7 +62,7 @@ index b76b8dbf5d..709f3e525c 100644
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1004,7 +1015,25 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -1004,7 +1019,25 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
protected void b(Entity entity) {
|
||||
super.b(entity);
|
||||
this.entitiesById.a(entity.getId(), entity);
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ecec84b91157aa460e0591d1c93eb359cbb3a581 Mon Sep 17 00:00:00 2001
|
||||
From 3d237c508504201a1ea5a957115422891600bb96 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
|
||||
@ -193,7 +193,7 @@ index ee2cdb897c..956eabd7dc 100644
|
||||
public final List<TileEntity> tileEntityListTick = Lists.newArrayList();
|
||||
private final List<TileEntity> c = Lists.newArrayList();
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 709f3e525c..2692d0a1b6 100644
|
||||
index f6becaae43..f7078ded5c 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -41,7 +41,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@ -205,7 +205,7 @@ index 709f3e525c..2692d0a1b6 100644
|
||||
public boolean savingDisabled;
|
||||
private boolean J;
|
||||
private int emptyTime;
|
||||
@@ -991,14 +991,17 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -995,14 +995,17 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
this.g.remove(entity1);
|
||||
} else {
|
||||
if (!(entity instanceof EntityHuman)) {
|
||||
@ -229,7 +229,7 @@ index 709f3e525c..2692d0a1b6 100644
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1021,7 +1024,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -1025,7 +1028,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
}
|
||||
|
||||
Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity);
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 7368c841c5a2c43e02bdb3f56cbd99274a324212 Mon Sep 17 00:00:00 2001
|
||||
From 6715291630433fec052c1ac1da51b25b1d0dd46d Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 3 Aug 2018 22:47:46 -0400
|
||||
Subject: [PATCH] Entity add to world fixes
|
||||
@ -68,10 +68,10 @@ index aa94e399af..85570e4a5d 100644
|
||||
this.b(entity);
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 2692d0a1b6..911d03c70b 100644
|
||||
index f7078ded5c..9cba1822bf 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -987,7 +987,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -991,7 +991,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
if (this.entitiesByUUID.containsKey(uuid)) {
|
||||
Entity entity1 = (Entity) this.entitiesByUUID.get(uuid);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 96edac555c303a226e584b85f9084ebac1d47be7 Mon Sep 17 00:00:00 2001
|
||||
From a9d1decc694859ac7b1a989f6544f33fc9623c66 Mon Sep 17 00:00:00 2001
|
||||
From: Mystiflow <mystiflow@gmail.com>
|
||||
Date: Fri, 6 Jul 2018 13:21:30 +0100
|
||||
Subject: [PATCH] Send nearby packets from world player list not server list
|
||||
@ -95,10 +95,10 @@ index e26405d341..23f390c221 100644
|
||||
if (entityplayer != null && entityplayer.world == this.world && entityplayer.getId() != i) {
|
||||
double d0 = (double) blockposition.getX() - entityplayer.locX;
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 911d03c70b..f837e6c36c 100644
|
||||
index 9cba1822bf..14905fceb0 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1086,7 +1086,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -1090,7 +1090,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (super.strikeLightning(entity)) {
|
||||
@ -107,7 +107,7 @@ index 911d03c70b..f837e6c36c 100644
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
@@ -1146,8 +1146,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
@@ -1150,8 +1150,8 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
BlockActionData blockactiondata = (BlockActionData) this.d.removeFirst();
|
||||
|
||||
if (this.a(blockactiondata)) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren