aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0730-Missing-eating-regain-reason.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0730-Missing-eating-regain-reason.patch')
-rw-r--r--patches/server/0730-Missing-eating-regain-reason.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/patches/server/0730-Missing-eating-regain-reason.patch b/patches/server/0730-Missing-eating-regain-reason.patch
new file mode 100644
index 0000000000..38626b6352
--- /dev/null
+++ b/patches/server/0730-Missing-eating-regain-reason.patch
@@ -0,0 +1,45 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Lulu13022002 <[email protected]>
+Date: Fri, 5 Aug 2022 12:16:51 +0200
+Subject: [PATCH] Missing eating regain reason
+
+
+diff --git a/src/main/java/net/minecraft/world/entity/animal/Cat.java b/src/main/java/net/minecraft/world/entity/animal/Cat.java
+index bffc7c21727a6e5ff13a498aa51f6797e4d6d596..471d5727b964922d8e898be9e1d5c30f9d3bac97 100644
+--- a/src/main/java/net/minecraft/world/entity/animal/Cat.java
++++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java
+@@ -407,7 +407,7 @@ public class Cat extends TamableAnimal implements VariantHolder<Holder<CatVarian
+ this.usePlayerItem(player, hand, itemstack);
+ FoodProperties foodinfo = (FoodProperties) itemstack.get(DataComponents.FOOD);
+
+- this.heal(foodinfo != null ? (float) foodinfo.nutrition() : 1.0F);
++ this.heal(foodinfo != null ? (float) foodinfo.nutrition() : 1.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // Paper - Add missing regain reason
+ this.playEatingSound();
+ }
+
+diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
+index dc10449a3bdff694ad872a1ff61c90046aa7954a..b6baa40dac6d6bf40c4ee7ee75b8a8e6f60733a1 100644
+--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
++++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
+@@ -389,7 +389,7 @@ public class Camel extends AbstractHorse {
+ boolean flag = this.getHealth() < this.getMaxHealth();
+
+ if (flag) {
+- this.heal(2.0F);
++ this.heal(2.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // Paper - Add missing regain reason
+ }
+
+ boolean flag1 = this.isTamed() && this.getAge() == 0 && this.canFallInLove();
+diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java
+index d5808d0c190877554a4a8191f68e8b4a36f2ff46..4da66867109394c8966e27551d20b4bcdf4bc9be 100644
+--- a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java
++++ b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java
+@@ -182,7 +182,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder<Llama.V
+ }
+
+ if (this.getHealth() < this.getMaxHealth() && f > 0.0F) {
+- this.heal(f);
++ this.heal(f, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // Paper - Add missing regain reason
+ flag = true;
+ }
+