mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 08:27:43 +01:00
set burp delay in the correct spot
This commit is contained in:
@@ -40,19 +40,20 @@ index 233e9683add1c64e85bd254aaba970053d637803..c1921219cdea543f02d98cacdfad296e
|
||||
CriteriaTriggers.CONSUME_ITEM.trigger((ServerPlayer) this, stack);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/food/FoodData.java b/src/main/java/net/minecraft/world/food/FoodData.java
|
||||
index bd3f78e6453cfe18aa3da38176b04d734d83bb4b..515dd3b769917c4aa60ce180ef24f38ca12e6848 100644
|
||||
index bd3f78e6453cfe18aa3da38176b04d734d83bb4b..b702b7270fae8fafc39588fbc39b4e0014809047 100644
|
||||
--- a/src/main/java/net/minecraft/world/food/FoodData.java
|
||||
+++ b/src/main/java/net/minecraft/world/food/FoodData.java
|
||||
@@ -39,7 +39,9 @@ public class FoodData {
|
||||
}
|
||||
@@ -34,8 +34,10 @@ public class FoodData {
|
||||
// CraftBukkit end
|
||||
|
||||
public void eat(int food, float saturationModifier) {
|
||||
private void add(int nutrition, float saturation) {
|
||||
+ int oldValue = this.foodLevel; // Purpur
|
||||
this.add(food, FoodConstants.saturationByModifier(food, saturationModifier));
|
||||
this.foodLevel = Mth.clamp(nutrition + this.foodLevel, 0, 20);
|
||||
this.saturationLevel = Mth.clamp(saturation + this.saturationLevel, 0.0F, (float) this.foodLevel);
|
||||
+ if (this.entityhuman.level().purpurConfig.playerBurpWhenFull && this.foodLevel == 20 && oldValue < 20) this.entityhuman.burpDelay = this.entityhuman.level().purpurConfig.playerBurpDelay; // Purpur
|
||||
}
|
||||
|
||||
public void eat(FoodProperties foodComponent) {
|
||||
public void eat(int food, float saturationModifier) {
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 6ca213635f81bff18c568768d6a05909de8f7bf8..60496afdae66f0644dddce5891ed4c2c05eab093 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
|
||||
Reference in New Issue
Block a user