Fix entity armor not showing on death animation (#7355)

This commit is contained in:
Jake Potrebic 2022-02-18 10:16:41 -08:00 committed by GitHub
commit 5bb4549f48
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 87 additions and 76 deletions

View file

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent consuming the wrong itemstack
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 0031a3a4850e38039c37550d6f67e433b9143cfd..fa07a6f7ec215652861a62a0cb942522e0f4f655 100644
index 8587ac23b5c98ef2ee90445432da9db130d93464..d3bb82817e595a946a8294a059982924226ebfa7 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3565,9 +3565,14 @@ public abstract class LivingEntity extends Entity {
@@ -3574,9 +3574,14 @@ public abstract class LivingEntity extends Entity {
}
public void startUsingItem(InteractionHand hand) {
@ -24,7 +24,7 @@ index 0031a3a4850e38039c37550d6f67e433b9143cfd..fa07a6f7ec215652861a62a0cb942522
this.useItem = itemstack;
this.useItemRemaining = itemstack.getUseDuration();
if (!this.level.isClientSide) {
@@ -3646,6 +3651,7 @@ public abstract class LivingEntity extends Entity {
@@ -3655,6 +3660,7 @@ public abstract class LivingEntity extends Entity {
this.releaseUsingItem();
} else {
if (!this.useItem.isEmpty() && this.isUsingItem()) {
@ -32,7 +32,7 @@ index 0031a3a4850e38039c37550d6f67e433b9143cfd..fa07a6f7ec215652861a62a0cb942522
this.triggerItemUseEffects(this.useItem, 16);
// CraftBukkit start - fire PlayerItemConsumeEvent
ItemStack itemstack;
@@ -3680,8 +3686,8 @@ public abstract class LivingEntity extends Entity {
@@ -3689,8 +3695,8 @@ public abstract class LivingEntity extends Entity {
}
this.stopUsingItem();