ChiseledBookshelf: Fix duplication bug (#6086)

Also fixes being able to put more than 1 book in the slot
This commit is contained in:
ace 2023-10-10 17:59:39 +08:00 committed by GitHub
parent ee26d6d570
commit c9163a1505
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -113,7 +113,7 @@ class ChiseledBookshelf extends Opaque{
$this->setSlot($slot, false);
}elseif($item instanceof WritableBookBase || $item instanceof Book || $item instanceof EnchantedBook){
//TODO: type tags like blocks would be better for this
$inventory->setItem($slot->value, $item);
$inventory->setItem($slot->value, $item->pop());
$this->setSlot($slot, true);
}else{
return true;