Block: added a bunch of state manipulation APIs

This commit is contained in:
Dylan K. Taylor
2020-11-03 19:13:32 +00:00
parent 0a8dc3edd3
commit 32929925aa
30 changed files with 374 additions and 0 deletions

View File

@ -73,6 +73,22 @@ class Stair extends Transparent{
}
}
public function isUpsideDown() : bool{ return $this->upsideDown; }
/** @return $this */
public function setUpsideDown(bool $upsideDown) : self{
$this->upsideDown = $upsideDown;
return $this;
}
public function getShape() : StairShape{ return $this->shape; }
/** @return $this */
public function setShape(StairShape $shape) : self{
$this->shape = $shape;
return $this;
}
protected function recalculateCollisionBoxes() : array{
$topStepFace = $this->upsideDown ? Facing::DOWN : Facing::UP;
$bbs = [