diff --git a/src/pocketmine/tile/Bed.php b/src/pocketmine/tile/Bed.php index b53c3de27..e0b137ac1 100644 --- a/src/pocketmine/tile/Bed.php +++ b/src/pocketmine/tile/Bed.php @@ -38,6 +38,9 @@ class Bed extends Spawnable{ return $this->color; } + /** + * @return void + */ public function setColor(int $color){ $this->color = $color & 0xf; $this->onChanged(); diff --git a/src/pocketmine/tile/Chest.php b/src/pocketmine/tile/Chest.php index f8e57ea19..4cab5fe76 100644 --- a/src/pocketmine/tile/Chest.php +++ b/src/pocketmine/tile/Chest.php @@ -117,6 +117,9 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{ return $this->inventory; } + /** + * @return void + */ protected function checkPairing(){ if($this->isPaired() and !$this->getLevel()->isInLoadedTerrain(new Vector3($this->pairX, $this->y, $this->pairZ))){ //paired to a tile in an unloaded chunk @@ -151,6 +154,9 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{ return "Chest"; } + /** + * @return bool + */ public function isPaired(){ return $this->pairX !== null and $this->pairZ !== null; } @@ -169,6 +175,9 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{ return null; } + /** + * @return bool + */ public function pairWith(Chest $tile){ if($this->isPaired() or $tile->isPaired()){ return false; @@ -183,7 +192,7 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{ return true; } - private function createPair(Chest $tile){ + private function createPair(Chest $tile) : void{ $this->pairX = $tile->x; $this->pairZ = $tile->z; @@ -191,6 +200,9 @@ class Chest extends Spawnable implements InventoryHolder, Container, Nameable{ $tile->pairZ = $this->z; } + /** + * @return bool + */ public function unpair(){ if(!$this->isPaired()){ return false; diff --git a/src/pocketmine/tile/FlowerPot.php b/src/pocketmine/tile/FlowerPot.php index 7b69d69af..48703c5a4 100644 --- a/src/pocketmine/tile/FlowerPot.php +++ b/src/pocketmine/tile/FlowerPot.php @@ -70,11 +70,19 @@ class FlowerPot extends Spawnable{ return clone $this->item; } + /** + * @param Item $item + * + * @return void + */ public function setItem(Item $item){ $this->item = clone $item; $this->onChanged(); } + /** + * @return void + */ public function removeItem(){ $this->setItem(ItemFactory::get(Item::AIR, 0, 0)); } diff --git a/src/pocketmine/tile/Furnace.php b/src/pocketmine/tile/Furnace.php index 2bd1e4740..8227272e8 100644 --- a/src/pocketmine/tile/Furnace.php +++ b/src/pocketmine/tile/Furnace.php @@ -138,6 +138,11 @@ class Furnace extends Spawnable implements InventoryHolder, Container, Nameable{ return $this->getInventory(); } + /** + * @param Item $fuel + * + * @return void + */ protected function checkFuel(Item $fuel){ $ev = new FurnaceBurnEvent($this, $fuel, $fuel->getFuelTime()); $ev->call(); diff --git a/src/pocketmine/tile/ItemFrame.php b/src/pocketmine/tile/ItemFrame.php index 4b573395f..07569b38e 100644 --- a/src/pocketmine/tile/ItemFrame.php +++ b/src/pocketmine/tile/ItemFrame.php @@ -63,6 +63,11 @@ class ItemFrame extends Spawnable{ return clone $this->item; } + /** + * @param Item|null $item + * + * @return void + */ public function setItem(Item $item = null){ if($item !== null and !$item->isNull()){ $this->item = clone $item; @@ -76,6 +81,11 @@ class ItemFrame extends Spawnable{ return $this->itemRotation; } + /** + * @param int $rotation + * + * @return void + */ public function setItemRotation(int $rotation){ $this->itemRotation = $rotation; $this->onChanged(); @@ -85,6 +95,11 @@ class ItemFrame extends Spawnable{ return $this->itemDropChance; } + /** + * @param float $chance + * + * @return void + */ public function setItemDropChance(float $chance){ $this->itemDropChance = $chance; $this->onChanged(); diff --git a/src/pocketmine/tile/Nameable.php b/src/pocketmine/tile/Nameable.php index ab66b101c..7c6c3aab7 100644 --- a/src/pocketmine/tile/Nameable.php +++ b/src/pocketmine/tile/Nameable.php @@ -38,6 +38,8 @@ interface Nameable{ /** * @param string $str + * + * @return void */ public function setName(string $str); diff --git a/src/pocketmine/tile/Skull.php b/src/pocketmine/tile/Skull.php index 2e7210284..7011bdc7e 100644 --- a/src/pocketmine/tile/Skull.php +++ b/src/pocketmine/tile/Skull.php @@ -57,6 +57,11 @@ class Skull extends Spawnable{ $nbt->setByte(self::TAG_ROT, $this->skullRotation); } + /** + * @param int $type + * + * @return void + */ public function setType(int $type){ $this->skullType = $type; $this->onChanged(); diff --git a/src/pocketmine/tile/Spawnable.php b/src/pocketmine/tile/Spawnable.php index bcad010b5..416c7d640 100644 --- a/src/pocketmine/tile/Spawnable.php +++ b/src/pocketmine/tile/Spawnable.php @@ -62,6 +62,9 @@ abstract class Spawnable extends Tile{ $this->spawnToAll(); } + /** + * @return void + */ public function spawnToAll(){ if($this->closed){ return; diff --git a/src/pocketmine/tile/Tile.php b/src/pocketmine/tile/Tile.php index 5dcb70a0a..abafa93b8 100644 --- a/src/pocketmine/tile/Tile.php +++ b/src/pocketmine/tile/Tile.php @@ -84,6 +84,9 @@ abstract class Tile extends Position{ /** @var TimingsHandler */ protected $timings; + /** + * @return void + */ public static function init(){ self::registerTile(Banner::class, [self::BANNER, "minecraft:banner"]); self::registerTile(Bed::class, [self::BED, "minecraft:bed"]);