A Command Book would function exactly the same as the Knowledge Book: instant use and consumable. However, instead of granting a recipe, a Command Book would run a command stored within the book.
Note that this is different than a Written Book with a command stored within a click/hover event - executing a command with a Written Book requires you to open the book interface, then click or hover a specific piece of text within the book to activate it. Command Books would activate instantly when you use the book without opening any interface at all.
The Command Book could even replace the Knowledge Book completely - put a /recipe command into it and it does the same thing. A Command Book would be an incredible tool for mapmakers - No scoreboards needed for use-item detection, just slap a function into the book and you're good to go. Have the book contain a /replaceitem command to replace itself into the player's hands and you can use it as many times as you like, OR we could have a tag that defines a maxUses count, where negative values mean infinite uses. Any spellbook concept you've ever wanted to create could easily come to life with this item.
Please sign in to leave a comment.
4 Comments