diff --git a/src/pocketmine/entity/Human.php b/src/pocketmine/entity/Human.php index 478d99f7b..d9a26d1ee 100644 --- a/src/pocketmine/entity/Human.php +++ b/src/pocketmine/entity/Human.php @@ -408,6 +408,12 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{ public function saveNBT(){ parent::saveNBT(); + + $this->namedtag->foodLevel = new IntTag("foodLevel", $this->getFood()); + $this->namedtag->foodExhaustionLevel = new FloatTag("foodExhaustionLevel", $this->getExhaustion()); + $this->namedtag->foodSaturationLevel = new FloatTag("foodSaturationLevel", $this->getSaturation()); + $this->namedtag->foodTickTimer = new IntTag("foodTickTimer", $this->foodTickTimer); + $this->namedtag->Inventory = new ListTag("Inventory", []); $this->namedtag->Inventory->setTagType(NBT::TAG_Compound); if($this->inventory !== null){