From e824266457c3207bb2565256e2f9a58652d98a51 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 22 Aug 2025 18:27:06 +0100 Subject: [PATCH] ChiseledBookshelf: add setSlots() --- src/block/ChiseledBookshelf.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/block/ChiseledBookshelf.php b/src/block/ChiseledBookshelf.php index be49c7a91..cbe22a94b 100644 --- a/src/block/ChiseledBookshelf.php +++ b/src/block/ChiseledBookshelf.php @@ -114,6 +114,18 @@ class ChiseledBookshelf extends Opaque implements HorizontalFacing{ return $this->slots; } + /** + * @param ChiseledBookshelfSlot[] $slots + * @return $this + */ + public function setSlots(array $slots) : self{ + $this->slots = []; + foreach($slots as $slot){ + $this->setSlot($slot, true); + } + return $this; + } + /** * Returns the last slot interacted by a player or null if no slot has been interacted with yet. */