Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
SPIGOT-1893: Wrong RegainReason for eating.
Dieser Commit ist enthalten in:
Ursprung
1fefbf9b98
Commit
75286088fe
@ -55,13 +55,20 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,7 +72,8 @@
|
@@ -39,14 +65,14 @@
|
||||||
|
if (this.foodTickTimer >= 10) {
|
||||||
|
float f = Math.min(this.saturationLevel, 4.0F);
|
||||||
|
|
||||||
|
- entityhuman.heal(f / 4.0F);
|
||||||
|
+ entityhuman.heal(f / 4.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); // CraftBukkit - added RegainReason
|
||||||
|
this.a(f);
|
||||||
|
this.foodTickTimer = 0;
|
||||||
|
}
|
||||||
} else if (flag && this.foodLevel >= 18 && entityhuman.cT()) {
|
} else if (flag && this.foodLevel >= 18 && entityhuman.cT()) {
|
||||||
++this.foodTickTimer;
|
++this.foodTickTimer;
|
||||||
if (this.foodTickTimer >= 80) {
|
if (this.foodTickTimer >= 80) {
|
||||||
- entityhuman.heal(1.0F);
|
- entityhuman.heal(1.0F);
|
||||||
+ // CraftBukkit - added RegainReason
|
+ entityhuman.heal(1.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); // CraftBukkit - added RegainReason
|
||||||
+ entityhuman.heal(1.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED);
|
|
||||||
this.a(4.0F);
|
this.a(4.0F);
|
||||||
this.foodTickTimer = 0;
|
this.foodTickTimer = 0;
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren