aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0849-Missing-eating-regain-reason.patch
blob: e04644ebf160c1b776b50f24d40c2df7e0a519fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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 40af8405c6f3ecc5a8168bb62607eb79862cefa6..de51ce9875e12961e6e549e87d76f492d2f19787 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<CatVariant> {
                     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/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java
index 3aa98f7c282cb4884589cb83b1546b924e66f096..faf3e31f23d71bbc345bf98d4240490ac4677843 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
@@ -384,7 +384,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Saddl
         } 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();
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..5f61c97478f005aaaaad1b027118079db7275cf7 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<Llama.V
         }
 
         if (this.getHealth() < this.getMaxHealth() && f > 0.0F) {
-            this.heal(f);
+            this.heal(f, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // Paper
             flag = true;
         }