RedstoneRepeater: added getDelay() and setDelay()

This commit is contained in:
Dylan K. Taylor 2021-02-06 19:03:33 +00:00
parent 233616aa6a
commit 9ab3c57789
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -65,6 +65,17 @@ class RedstoneRepeater extends Flowable{
return 0b1111; return 0b1111;
} }
public function getDelay() : int{ return $this->delay; }
/** @return $this */
public function setDelay(int $delay) : self{
if($delay < 1 || $delay > 4){
throw new \InvalidArgumentException("Delay must be in range 1-4");
}
$this->delay = $delay;
return $this;
}
/** /**
* @return AxisAlignedBB[] * @return AxisAlignedBB[]
*/ */