mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-15 14:13:56 +01:00
Missing eating regain reason
This commit is contained in:
parent
75c623590f
commit
bde548833e
3 changed files with 27 additions and 0 deletions
|
@ -36,6 +36,15 @@
|
|||
if (!this.level().isClientSide()) {
|
||||
this.setCollarColor(enumcolor);
|
||||
itemstack.consume(1, player);
|
||||
@@ -399,7 +406,7 @@
|
||||
this.usePlayerItem(player, hand, itemstack);
|
||||
FoodProperties foodinfo = (FoodProperties) itemstack.get(DataComponents.FOOD);
|
||||
|
||||
- this.heal(foodinfo != null ? (float) foodinfo.nutrition() : 1.0F);
|
||||
+ this.heal(foodinfo != null ? (float) foodinfo.nutrition() : 1.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // Paper - Add missing regain reason
|
||||
this.playEatingSound();
|
||||
}
|
||||
|
||||
@@ -462,7 +469,7 @@
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,15 @@
|
|||
|
||||
behaviorcontroller.tick(world, this);
|
||||
gameprofilerfiller.pop();
|
||||
@@ -386,7 +389,7 @@
|
||||
boolean flag = this.getHealth() < this.getMaxHealth();
|
||||
|
||||
if (flag) {
|
||||
- this.heal(2.0F);
|
||||
+ this.heal(2.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // Paper - Add missing regain reason
|
||||
}
|
||||
|
||||
boolean flag1 = this.isTamed() && this.getAge() == 0 && this.canFallInLove();
|
||||
@@ -454,9 +457,15 @@
|
||||
}
|
||||
|
||||
|
|
|
@ -25,6 +25,15 @@
|
|||
private void setStrength(int strength) {
|
||||
this.entityData.set(Llama.DATA_STRENGTH_ID, Math.max(1, Math.min(5, strength)));
|
||||
}
|
||||
@@ -176,7 +182,7 @@
|
||||
}
|
||||
|
||||
if (this.getHealth() < this.getMaxHealth() && f > 0.0F) {
|
||||
- this.heal(f);
|
||||
+ this.heal(f, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.EATING); // Paper - Add missing regain reason
|
||||
flag = true;
|
||||
}
|
||||
|
||||
@@ -289,7 +295,7 @@
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue