13
0
geforkt von Mirrors/Paper
Paper/patches/server/0928-Fix-MC-121048.patch
Nassim Jahnke dcc290167f
Updated Upstream (Bukkit/CraftBukkit/Spigot)
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:
dea9ce0a SPIGOT-7198: Add Sittable interface to Camel

CraftBukkit Changes:
eecb4c0dc SPIGOT-7196: Exception loading alternate worlds
0ff61e8fa SPIGOT-7198: Add Sittable interface to Camel
676441aac PR-1121: Handle additional missing SpawnEggs in MetaSpawnEgg
e85280e02 Handle missing SpawnEggs in MetaSpawnEgg

Spigot Changes:
d90018e0 SPIGOT-7199: NPE loading or creating world with custom chunk generator
2022-12-08 11:53:14 +01:00

27 Zeilen
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: MelnCat <melncatuwu@gmail.com>
Date: Mon, 3 Oct 2022 07:53:37 -0700
Subject: [PATCH] Fix MC-121048
This moves the setHealth call to below the recordDamage call to prevent
recordDamage from clearing the CombatTracker, since recordDamage will
clear the CombatTracker if the entity is dead. This fixes death messages
such as the "doomed to fall" messages.
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 6d682a78c6fe4cbf44cd20449cfe89d530e1d28c..cd57fde197f622e5315c4a63936a9b66f5f05916 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -2207,8 +2207,10 @@ public abstract class LivingEntity extends Entity {
// CraftBukkit end
float f3 = this.getHealth();
- this.setHealth(f3 - f);
+ // Paper start - MC-121048
this.getCombatTracker().recordDamage(damagesource, f3, f);
+ this.setHealth(f3 - f);
+ // Paper end
// CraftBukkit start
if (!human) {
this.setAbsorptionAmount(this.getAbsorptionAmount() - f);