Here's the code that sees if there's a book called Keys in the item frame.
/testfor @e[type=ItemFrame,r=10] {Item:{id:minecraft:writable_book,tag:{display:{Name:"Keys"}}}}
When I put this in I get the error:
[18:09:28] entity.ItemFrame.name did not match the required data structure
Can someone help fix my command?
Best Answer
You used the wrong entity name. A hanging itemframe is not called ItemFrame but item_frame.
So, the following command would work:
Please note: this command checks the name given to an item. You are essentially looking for a writable book that has been renamed using an anvil. If your goal is however to check for a closed book with a title you should use the following command: