From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> 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 1d0c424be2b67cad0f8bca85070a9c46a6b283da..f760ce7d9df79ef58f8963de3e901cba3e12fcaa 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Cat.java +++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java @@ -387,7 +387,7 @@ public class Cat extends TamableAnimal implements VariantHolder { if (!(item instanceof DyeItem)) { if (item.isEdible() && this.isFood(itemstack) && this.getHealth() < this.getMaxHealth()) { this.usePlayerItem(player, hand, itemstack); - this.heal((float) item.getFoodProperties().getNutrition()); + this.heal((float) item.getFoodProperties().getNutrition(), org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // Paper - Add missing regain reason return InteractionResult.CONSUME; } 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 87c8460324ff2d2a14e1404fcfa3adb2d336a089..090d36d73b12fec59782142e2e85f17ba35dc6be 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 @@ -392,7 +392,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl 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 91fb62807b3c5600c83d4dc8d3fadf36e94e2133..9b5b894d43f25566ab9c3698705e978ab823a0d2 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 @@ -196,7 +196,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder 0.0F) { - this.heal(f); + this.heal(f, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // Paper - Add missing regain reason flag = true; }