mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-31 03:50:36 +01:00
Fix a duplicate alive entity on second world
This commit is contained in:
parent
a69434f9d1
commit
4a940edbe8
1 changed files with 28 additions and 0 deletions
|
@ -0,0 +1,28 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
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
|
||||
@@ -0,0 +0,0 @@ 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
|
||||
@@ -0,0 +0,0 @@ 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();
|
||||
--
|
Loading…
Add table
Reference in a new issue