Continued cleanup of runtime entity NBT removal

it's no longer necessary to force-write these, since the NBT is now ephemeral. Any tag type mismatches should be dealt with on read, after which the original tag will be discarded anyway.
This commit is contained in:
Dylan K. Taylor
2018-08-15 14:50:58 +01:00
parent 30fcfac8cf
commit 2ee0436f46
5 changed files with 7 additions and 7 deletions

View File

@ -769,9 +769,9 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
public function saveNBT() : CompoundTag{
$nbt = parent::saveNBT();
$nbt->setInt("foodLevel", (int) $this->getFood(), true);
$nbt->setFloat("foodExhaustionLevel", $this->getExhaustion(), true);
$nbt->setFloat("foodSaturationLevel", $this->getSaturation(), true);
$nbt->setInt("foodLevel", (int) $this->getFood());
$nbt->setFloat("foodExhaustionLevel", $this->getExhaustion());
$nbt->setFloat("foodSaturationLevel", $this->getSaturation());
$nbt->setInt("foodTickTimer", $this->foodTickTimer);
$nbt->setInt("XpLevel", $this->getXpLevel());