mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-20 14:08:57 +01:00
Made feeding wolves fire EntityRegainHealth events. Fixes BUKKIT-1111
This commit is contained in:
parent
fce3386aa0
commit
6f40a22e16
1 changed files with 1 additions and 1 deletions
|
@ -210,7 +210,7 @@ public class EntityWolf extends EntityTameableAnimal {
|
||||||
|
|
||||||
if (itemfood.q() && this.datawatcher.getInt(18) < 20) {
|
if (itemfood.q() && this.datawatcher.getInt(18) < 20) {
|
||||||
--itemstack.count;
|
--itemstack.count;
|
||||||
this.heal(itemfood.getNutrition());
|
this.heal(itemfood.getNutrition(), org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // CraftBukkit
|
||||||
if (itemstack.count <= 0) {
|
if (itemstack.count <= 0) {
|
||||||
entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
|
entityhuman.inventory.setItem(entityhuman.inventory.itemInHandIndex, (ItemStack) null);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue