mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-29 15:49:00 +01:00
Ensure that the world of a dead entity is not changed in a portal
This commit is contained in:
parent
1f5692bf4b
commit
4a48c0504f
1 changed files with 15 additions and 2 deletions
|
@ -1,11 +1,11 @@
|
|||
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
|
||||
Subject: [PATCH] Do not allow portals to move dead entities across worlds
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 0e1d9817b..385329774 100644
|
||||
index 0e1d9817..38532977 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 {
|
||||
|
@ -39,4 +39,17 @@ index 0e1d9817b..385329774 100644
|
|||
boolean flag = entity.attachedToPlayer;
|
||||
|
||||
entity.attachedToPlayer = true;
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index a9d59bbf..2d8717f4 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||
worldserver.methodProfiler.b();
|
||||
}
|
||||
|
||||
- entity.spawnIn(worldserver1);
|
||||
+ if (!entity.dead) entity.spawnIn(worldserver1); // Paper - Do not move dead entities
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
--
|
Loading…
Reference in a new issue