@@ -55,20 +55,25 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,14 +69,14 @@
|
||||
@@ -44,15 +69,17 @@
|
||||
if (this.foodTickTimer >= 10) {
|
||||
float f = Math.min(this.saturationLevel, 6.0F);
|
||||
|
||||
- entityhuman.heal(f / 6.0F);
|
||||
- this.a(f);
|
||||
+ entityhuman.heal(f / 6.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); // CraftBukkit - added RegainReason
|
||||
this.a(f);
|
||||
+ // this.a(f); CraftBukkit - EntityExhaustionEvent
|
||||
+ entityhuman.applyExhaustion(f, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.REGEN); // CraftBukkit - EntityExhaustionEvent
|
||||
this.foodTickTimer = 0;
|
||||
}
|
||||
} else if (flag && this.foodLevel >= 18 && entityhuman.eJ()) {
|
||||
++this.foodTickTimer;
|
||||
if (this.foodTickTimer >= 80) {
|
||||
- entityhuman.heal(1.0F);
|
||||
- this.a(6.0F);
|
||||
+ entityhuman.heal(1.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); // CraftBukkit - added RegainReason
|
||||
this.a(6.0F);
|
||||
+ // this.a(6.0F); CraftBukkit - EntityExhaustionEvent
|
||||
+ entityhuman.applyExhaustion(6.0f, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.REGEN); // CraftBukkit - EntityExhaustionEvent
|
||||
this.foodTickTimer = 0;
|
||||
}
|
||||
} else if (this.foodLevel <= 0) {
|
||||
|
||||
Reference in New Issue
Block a user