mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 16:51:42 +00:00
thanks for being useless PhpStorm
these problems didn't show up in any inspections until I opened the fucking files...
This commit is contained in:
parent
87928038e6
commit
6f54b53f7a
@ -715,7 +715,7 @@ abstract class Entity extends Location implements Metadatable, EntityIds{
|
||||
}
|
||||
|
||||
public function saveNBT() : CompoundTag{
|
||||
$nbt = new CompoundTag();
|
||||
$nbt = new CompoundTag("");
|
||||
if(!($this instanceof Player)){
|
||||
$nbt->setString("id", EntityFactory::getSaveId(get_class($this)));
|
||||
|
||||
|
@ -518,7 +518,7 @@ class Item implements ItemIds, \JsonSerializable{
|
||||
* @return CompoundTag
|
||||
*/
|
||||
public function getNamedTag() : CompoundTag{
|
||||
return $this->nbt ?? ($this->nbt = new CompoundTag());
|
||||
return $this->nbt ?? ($this->nbt = new CompoundTag(""));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -72,7 +72,7 @@ abstract class Tile extends Position{
|
||||
abstract protected function writeSaveData(CompoundTag $nbt) : void;
|
||||
|
||||
public function saveNBT() : CompoundTag{
|
||||
$nbt = new CompoundTag();
|
||||
$nbt = new CompoundTag("");
|
||||
$nbt->setString(self::TAG_ID, TileFactory::getSaveId(get_class($this)));
|
||||
$nbt->setInt(self::TAG_X, $this->x);
|
||||
$nbt->setInt(self::TAG_Y, $this->y);
|
||||
@ -83,7 +83,7 @@ abstract class Tile extends Position{
|
||||
}
|
||||
|
||||
public function getCleanedNBT() : ?CompoundTag{
|
||||
$this->writeSaveData($tag = new CompoundTag());
|
||||
$this->writeSaveData($tag = new CompoundTag(""));
|
||||
return $tag->getCount() > 0 ? $tag : null;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user