2022-09-18 03:24:28 +00:00
|
|
|
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 ab86bfdaebe9b8791f0cfa6e0c61f80c8f891a93..745883a7b9c2590ae8e28db79e1bd0341a7e54bd 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/Cat.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java
|
|
|
|
@@ -384,7 +384,7 @@ public class Cat extends TamableAnimal {
|
|
|
|
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
|
|
|
|
return InteractionResult.CONSUME;
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
2022-10-23 18:52:40 +00:00
|
|
|
index 9aec9f80c564fa3ae03e445423d9e50afc45f837..149be8bf166282e651a375a27ca209010f25d688 100644
|
2022-09-18 03:24:28 +00:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java
|
|
|
|
@@ -211,7 +211,7 @@ public class Llama extends AbstractChestedHorse implements RangedAttackMob {
|
|
|
|
}
|
|
|
|
|
|
|
|
if (this.getHealth() < this.getMaxHealth() && f > 0.0F) {
|
|
|
|
- this.heal(f);
|
|
|
|
+ this.heal(f, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // Paper
|
|
|
|
flag = true;
|
|
|
|
}
|
|
|
|
|