diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index 1a909f0fe..ce456e9ed 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -838,7 +838,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{ public function saveNBT() : CompoundTag{ $nbt = new CompoundTag(); if(!($this instanceof Player)){ - $nbt->setString("id", $this->getSaveId(), true); + $nbt->setString("id", $this->getSaveId()); if($this->getNameTag() !== ""){ $nbt->setString("CustomName", $this->getNameTag()); diff --git a/src/pocketmine/entity/Human.php b/src/pocketmine/entity/Human.php index 68d99d7e0..db82118d1 100644 --- a/src/pocketmine/entity/Human.php +++ b/src/pocketmine/entity/Human.php @@ -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()); diff --git a/src/pocketmine/entity/Living.php b/src/pocketmine/entity/Living.php index 1c0e12b47..c9b18f91c 100644 --- a/src/pocketmine/entity/Living.php +++ b/src/pocketmine/entity/Living.php @@ -148,7 +148,7 @@ abstract class Living extends Entity implements Damageable{ public function saveNBT() : CompoundTag{ $nbt = parent::saveNBT(); - $nbt->setFloat("Health", $this->getHealth(), true); + $nbt->setFloat("Health", $this->getHealth()); if(count($this->effects) > 0){ $effects = []; diff --git a/src/pocketmine/entity/object/FallingBlock.php b/src/pocketmine/entity/object/FallingBlock.php index 4db9c18dc..7aa93469a 100644 --- a/src/pocketmine/entity/object/FallingBlock.php +++ b/src/pocketmine/entity/object/FallingBlock.php @@ -135,7 +135,7 @@ class FallingBlock extends Entity{ public function saveNBT() : CompoundTag{ $nbt = parent::saveNBT(); - $nbt->setInt("TileID", $this->block->getId(), true); + $nbt->setInt("TileID", $this->block->getId()); $nbt->setByte("Data", $this->block->getDamage()); return $nbt; diff --git a/src/pocketmine/entity/object/PrimedTNT.php b/src/pocketmine/entity/object/PrimedTNT.php index 5db3438fa..495299c8d 100644 --- a/src/pocketmine/entity/object/PrimedTNT.php +++ b/src/pocketmine/entity/object/PrimedTNT.php @@ -76,7 +76,7 @@ class PrimedTNT extends Entity implements Explosive{ public function saveNBT() : CompoundTag{ $nbt = parent::saveNBT(); - $nbt->setShort("Fuse", $this->fuse, true); //older versions incorrectly saved this as a byte + $nbt->setShort("Fuse", $this->fuse); return $nbt; }