mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Fixed some formatting issues in FlowerPot
This commit is contained in:
parent
cbb003bf29
commit
6e1abe7b15
@ -40,7 +40,7 @@ class FlowerPot extends Spawnable{
|
||||
parent::__construct($level, $nbt);
|
||||
}
|
||||
|
||||
public function canAddItem(Item $item): bool{
|
||||
public function canAddItem(Item $item) : bool{
|
||||
if(!$this->isEmpty()){
|
||||
return false;
|
||||
}
|
||||
@ -63,7 +63,7 @@ class FlowerPot extends Spawnable{
|
||||
}
|
||||
}
|
||||
|
||||
public function getItem(): Item{
|
||||
public function getItem() : Item{
|
||||
return Item::get((int) ($this->namedtag["item"] ?? 0), (int) ($this->namedtag["mData"] ?? 0), 1);
|
||||
}
|
||||
|
||||
@ -77,11 +77,11 @@ class FlowerPot extends Spawnable{
|
||||
$this->setItem(Item::get(Item::AIR));
|
||||
}
|
||||
|
||||
public function isEmpty(): bool{
|
||||
public function isEmpty() : bool{
|
||||
return $this->getItem()->getId() === Item::AIR;
|
||||
}
|
||||
|
||||
public function getSpawnCompound(): CompoundTag{
|
||||
public function getSpawnCompound() : CompoundTag{
|
||||
return new CompoundTag("", [
|
||||
new StringTag("id", Tile::FLOWER_POT),
|
||||
new IntTag("x", (int) $this->x),
|
||||
|
Loading…
x
Reference in New Issue
Block a user