Implemented food methods + fixed dying resetting food

This commit is contained in:
Dinnerbone
2011-09-15 06:24:45 +01:00
parent 7eff773769
commit 8b08696177
3 changed files with 113 additions and 0 deletions

View File

@@ -424,4 +424,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
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;
}
}