3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-17 13:30:06 +01:00

Added RegainReason.SATIATED.

This reason is used when a player regains health from generating due to their hunger being satisfied.
Dieser Commit ist enthalten in:
EvilSeph 2011-09-22 01:36:31 -04:00
Ursprung aa0739d90a
Commit a7717d4d79

Datei anzeigen

@ -49,7 +49,8 @@ public class FoodMetaData {
if (this.foodLevel >= 18 && entityhuman.W()) { if (this.foodLevel >= 18 && entityhuman.W()) {
++this.foodTickTimer; ++this.foodTickTimer;
if (this.foodTickTimer >= 80) { if (this.foodTickTimer >= 80) {
entityhuman.c(1); // CraftBukkit - added RegainReason.
entityhuman.c(1, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED);
this.foodTickTimer = 0; this.foodTickTimer = 0;
} }
} else if (this.foodLevel <= 0) { } else if (this.foodLevel <= 0) {