aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches
diff options
context:
space:
mode:
authorShane Freeder <[email protected]>2017-03-16 22:31:53 -0500
committerShane Freeder <[email protected]>2017-03-16 22:31:53 -0500
commit45ad47717e9facc2948dbae200b5b90bb4895118 (patch)
tree0f5520d148104aa88b29ce59acefc4d8cfa1e3e7 /Spigot-Server-Patches
parent7f3aa1ed290729ec5431c38e495f57d70663e92b (diff)
downloadPaper-45ad47717e9facc2948dbae200b5b90bb4895118.tar.gz
Paper-45ad47717e9facc2948dbae200b5b90bb4895118.zip
Fix a duplicate alive entity on second world
Diffstat (limited to 'Spigot-Server-Patches')
-rw-r--r--Spigot-Server-Patches/0213-Fix-a-duplicate-alive-entity-on-second-world.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/Spigot-Server-Patches/0213-Fix-a-duplicate-alive-entity-on-second-world.patch b/Spigot-Server-Patches/0213-Fix-a-duplicate-alive-entity-on-second-world.patch
new file mode 100644
index 0000000000..fe8013f4bf
--- /dev/null
+++ b/Spigot-Server-Patches/0213-Fix-a-duplicate-alive-entity-on-second-world.patch
@@ -0,0 +1,30 @@
+From f2f4e3a3406b40e13a7dc05cc5dbaeda8038043a Mon Sep 17 00:00:00 2001
+From: Shane Freeder <[email protected]>
+Date: Fri, 17 Mar 2017 01:45:15 +0000
+Subject: [PATCH] Fix a duplicate alive entity on second world
+
+
+diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
+index 0e1d9817..4cabdd7a 100644
+--- a/src/main/java/net/minecraft/server/Entity.java
++++ b/src/main/java/net/minecraft/server/Entity.java
+@@ -2359,6 +2359,7 @@ public abstract class Entity implements ICommandListener {
+ // CraftBukkit end */
+ // CraftBukkit start - Ensure chunks are loaded in case TravelAgent is not used which would initially cause chunks to load during find/create
+ // minecraftserver.getPlayerList().changeWorld(this, j, worldserver, worldserver1);
++ this.dead = true; // Paper - Mark entity as dead before we actually move it to the new world
+ worldserver1.getMinecraftServer().getPlayerList().repositionEntity(this, exit, portal);
+ // worldserver.entityJoinedWorld(this, false); // Handled in repositionEntity
+ // CraftBukkit end
+@@ -2393,7 +2394,7 @@ public abstract class Entity implements ICommandListener {
+ // CraftBukkit end
+ }
+
+- this.dead = true;
++ //this.dead = true; // Paper - Moved this up to ensure that the entity is dead when it's placed on the new world
+ this.world.methodProfiler.b();
+ worldserver.m();
+ worldserver1.m();
+--
+2.12.0.windows.1
+