From 9ab3c57789f71f77d14f8d6ba1102a951cfb0b13 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 6 Feb 2021 19:03:33 +0000 Subject: [PATCH] RedstoneRepeater: added getDelay() and setDelay() --- src/block/RedstoneRepeater.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/block/RedstoneRepeater.php b/src/block/RedstoneRepeater.php index 7553dc560..374034060 100644 --- a/src/block/RedstoneRepeater.php +++ b/src/block/RedstoneRepeater.php @@ -65,6 +65,17 @@ class RedstoneRepeater extends Flowable{ 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[] */