Consistent fluency for block property setters

This commit is contained in:
Dylan K. Taylor
2020-08-06 13:46:08 +01:00
parent 3d4470ed8d
commit 7399e6944e
8 changed files with 36 additions and 12 deletions

View File

@ -91,29 +91,35 @@ class ItemFrame extends Flowable{
return $this->framedItem !== null ? clone $this->framedItem : null;
}
public function setFramedItem(?Item $item) : void{
/** @return $this */
public function setFramedItem(?Item $item) : self{
if($item === null or $item->isNull()){
$this->framedItem = null;
$this->itemRotation = 0;
}else{
$this->framedItem = clone $item;
}
return $this;
}
public function getItemRotation() : int{
return $this->itemRotation;
}
public function setItemRotation(int $itemRotation) : void{
/** @return $this */
public function setItemRotation(int $itemRotation) : self{
$this->itemRotation = $itemRotation;
return $this;
}
public function getItemDropChance() : float{
return $this->itemDropChance;
}
public function setItemDropChance(float $itemDropChance) : void{
/** @return $this */
public function setItemDropChance(float $itemDropChance) : self{
$this->itemDropChance = $itemDropChance;
return $this;
}
public function onInteract(Item $item, int $face, Vector3 $clickVector, ?Player $player = null) : bool{