mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-04 22:14:40 +01:00
928bcc8d3a
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 09943450 Update SnakeYAML version 5515734f SPIGOT-7162: Incorrect description for Entity#getVehicle javadoc 6f82b381 PR-788: Add getHand() to all relevant events CraftBukkit Changes: aaf484f6f SPIGOT-7163: CraftMerchantRecipe doesn't copy demand and specialPrice from BukkitMerchantRecipe 5329dd6fd PR-1107: Add getHand() to all relevant events 93061706e SPIGOT-7045: Ocelots never spawn with babies with spawn reason OCELOT_BABY
32 lines
1.9 KiB
Diff
32 lines
1.9 KiB
Diff
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
|
|
index 5ffae9d3be22b5e78645da57a6bd0e7350749ef1..ed8dfabdad28e27054aa0679e06fcf87dc049f77 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
|
|
@@ -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;
|
|
}
|
|
|