Paper/patches/server/0834-don-t-attempt-to-teleport-dead-entities.patch
Finn Künstner a284e40c70
Updated Upstream (Bukkit/CraftBukkit) (#6848)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
9b45fa2f #667: Allow setting BrewEvent results
8c776ddc SPIGOT-6762: ChatPaginator.wordWrap only transfers one modifier
da372966 SPIGOT-4590, SPIGOT-6769: Clarify DamageCause documentation

CraftBukkit Changes:
cef1fda3 #947: Add missing spawn eggs for SpawnEggMeta
eb9a0f34 #945: Allow setting BrewEvent results
2021-10-31 08:34:10 +01:00

20 lines
1.0 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: sulu5890 <sulu@sulu.me>
Date: Sun, 24 Oct 2021 22:48:14 -0500
Subject: [PATCH] don't attempt to teleport dead entities
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index e17bda0d13bae337cfad5ae31b118aa7a85499fc..2ce32495758abf64eeeeeea1cdbf4904be77b697 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -702,7 +702,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
// CraftBukkit start
public void postTick() {
// No clean way to break out of ticking once the entity has been copied to a new world, so instead we move the portalling later in the tick cycle
- if (!(this instanceof ServerPlayer)) {
+ if (!(this instanceof ServerPlayer) && this.isAlive()) { // Paper - don't attempt to teleport dead entities
this.handleNetherPortal();
}
}