Cleaned up tile NBT handling, use new CompoundTag API methods

This commit is contained in:
Dylan K. Taylor
2017-10-16 16:48:24 +01:00
parent 0b1a9ba062
commit 20b86bdea8
11 changed files with 203 additions and 168 deletions

View File

@ -81,10 +81,10 @@ abstract class Spawnable extends Tile{
*/
final public function getSpawnCompound() : CompoundTag{
$nbt = new CompoundTag("", [
$this->namedtag->id,
$this->namedtag->x,
$this->namedtag->y,
$this->namedtag->z
$this->namedtag->getTag("id"),
$this->namedtag->getTag("x"),
$this->namedtag->getTag("y"),
$this->namedtag->getTag("z")
]);
$this->addAdditionalSpawnData($nbt);
return $nbt;