mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 09:10:00 +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);
|
parent::__construct($level, $nbt);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function canAddItem(Item $item): bool{
|
public function canAddItem(Item $item) : bool{
|
||||||
if(!$this->isEmpty()){
|
if(!$this->isEmpty()){
|
||||||
return false;
|
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);
|
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));
|
$this->setItem(Item::get(Item::AIR));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isEmpty(): bool{
|
public function isEmpty() : bool{
|
||||||
return $this->getItem()->getId() === Item::AIR;
|
return $this->getItem()->getId() === Item::AIR;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getSpawnCompound(): CompoundTag{
|
public function getSpawnCompound() : CompoundTag{
|
||||||
return new CompoundTag("", [
|
return new CompoundTag("", [
|
||||||
new StringTag("id", Tile::FLOWER_POT),
|
new StringTag("id", Tile::FLOWER_POT),
|
||||||
new IntTag("x", (int) $this->x),
|
new IntTag("x", (int) $this->x),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user