mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Consistent fluency for block property setters
This commit is contained in:
@ -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{
|
||||
|
Reference in New Issue
Block a user