mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 18:27:41 +01:00
Implemented food methods + fixed dying resetting food
By: Dinnerbone <dinnerbone@dinnerbone.com>
This commit is contained in:
parent
20f04b7261
commit
4f4400970b
@ -424,4 +424,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
getHandle().exp = getTotalExperience();
|
getHandle().exp = getTotalExperience();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public float getExhaustion() {
|
||||||
|
return getHandle().V().c;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setExhaustion(float value) {
|
||||||
|
getHandle().V().c = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public float getSaturation() {
|
||||||
|
return getHandle().V().b;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSaturation(float value) {
|
||||||
|
getHandle().V().b = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getFoodLevel() {
|
||||||
|
return getHandle().V().a;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFoodLevel(int value) {
|
||||||
|
getHandle().V().a = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user