mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
Added Torch::setFacing() and Torch::getFacing()
these are not implemented with AnyFacingTrait because it would break LSP to have a setFacing that doesn't accept DOWN.
This commit is contained in:
parent
ce855f2133
commit
609b21679f
@ -52,6 +52,17 @@ class Torch extends Flowable{
|
||||
return 0b111;
|
||||
}
|
||||
|
||||
public function getFacing() : int{ return $this->facing; }
|
||||
|
||||
/** @return $this */
|
||||
public function setFacing(int $facing) : self{
|
||||
if($facing === Facing::DOWN){
|
||||
throw new \InvalidArgumentException("Torch may not face DOWN");
|
||||
}
|
||||
$this->facing = $facing;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLightLevel() : int{
|
||||
return 14;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user