2022-09-18 05:24:28 +02: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
|
2023-06-08 10:47:19 +02:00
|
|
|
index 438d7c26cc3a4a3b5a1affffbbe26e4d272b0c00..90ce201bc7c47cef9bc59d7b535a7453854bac75 100644
|
2022-09-18 05:24:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/Cat.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java
|
2023-03-14 22:10:53 +01:00
|
|
|
@@ -386,7 +386,7 @@ public class Cat extends TamableAnimal implements VariantHolder<CatVariant> {
|
2022-09-18 05:24:28 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2022-12-10 14:07:35 +01:00
|
|
|
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
|
2023-06-08 10:47:19 +02:00
|
|
|
index c853123c451c41beb42209c7edc14a5dcffa2a50..2030fdb3124f793d7b545135b1db32fe9be27050 100644
|
2022-12-10 14:07:35 +01:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
|
2023-06-08 10:47:19 +02:00
|
|
|
@@ -386,7 +386,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider
|
2022-12-10 14:07:35 +01:00
|
|
|
} else {
|
|
|
|
boolean bl = this.getHealth() < this.getMaxHealth();
|
|
|
|
if (bl) {
|
|
|
|
- this.heal(2.0F);
|
|
|
|
+ this.heal(2.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // Paper
|
|
|
|
}
|
|
|
|
|
|
|
|
boolean bl2 = this.isTamed() && this.getAge() == 0 && this.canFallInLove();
|
2022-09-18 05:24:28 +02:00
|
|
|
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
|
2023-07-04 10:22:56 +02:00
|
|
|
index 7379e99c4d599aa0119bae9ebdc5e2058ada10cb..d28089c37707f323f73e60cb0ebed4e3cdf8c0fd 100644
|
2022-09-18 05:24:28 +02: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
|
2023-07-04 10:22:56 +02:00
|
|
|
@@ -216,7 +216,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder<Llama.V
|
2022-09-18 05:24:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
if (this.getHealth() < this.getMaxHealth() && f > 0.0F) {
|
|
|
|
- this.heal(f);
|
|
|
|
+ this.heal(f, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // Paper
|
|
|
|
flag = true;
|
|
|
|
}
|
|
|
|
|