mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 09:26:06 +00:00
Tile: make saveNBT() return a CompoundTag
I don't know why I made it take a parameter for this...
This commit is contained in:
@ -181,12 +181,15 @@ abstract class Tile extends Position{
|
||||
*/
|
||||
abstract protected function writeSaveData(CompoundTag $nbt) : void;
|
||||
|
||||
public function saveNBT(CompoundTag $nbt) : void{
|
||||
public function saveNBT() : CompoundTag{
|
||||
$nbt = new CompoundTag();
|
||||
$nbt->setString(self::TAG_ID, static::getSaveId());
|
||||
$nbt->setInt(self::TAG_X, $this->x);
|
||||
$nbt->setInt(self::TAG_Y, $this->y);
|
||||
$nbt->setInt(self::TAG_Z, $this->z);
|
||||
$this->writeSaveData($nbt);
|
||||
|
||||
return $nbt;
|
||||
}
|
||||
|
||||
public function getCleanedNBT() : ?CompoundTag{
|
||||
|
Reference in New Issue
Block a user