geforkt von Mirrors/Paper
Missing eating regain reason
Dieser Commit ist enthalten in:
Ursprung
75c623590f
Commit
bde548833e
@ -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
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren