Skip to main content
replaced http://minecraft.gamepedia.com/ with https://minecraft.wiki/w/
Source Link

You used the wrong entity name. A hanging itemframe is not called ItemFrame but item_frameitem_frame.

So, the following command would work:

/testfor @e[type=item_frame,r=10] {Item:{id:minecraft:writable_book,tag:{display:{Name:"Keys"}}}}

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 anvilrenamed using an anvil. If your goal is however to check for a closed book with a title you should use the following command:

/testfor @e[type=item_frame,r=10] {Item:{id:minecraft:written_book,tag:[{title:Keys}][2]}}

You used the wrong entity name. A hanging itemframe is not called ItemFrame but item_frame.

So, the following command would work:

/testfor @e[type=item_frame,r=10] {Item:{id:minecraft:writable_book,tag:{display:{Name:"Keys"}}}}

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:

/testfor @e[type=item_frame,r=10] {Item:{id:minecraft:written_book,tag:[{title:Keys}][2]}}

You used the wrong entity name. A hanging itemframe is not called ItemFrame but item_frame.

So, the following command would work:

/testfor @e[type=item_frame,r=10] {Item:{id:minecraft:writable_book,tag:{display:{Name:"Keys"}}}}

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:

/testfor @e[type=item_frame,r=10] {Item:{id:minecraft:written_book,tag:[{title:Keys}][2]}}

You used the wrong entity name. A hanging itemframe is not called ItemFrame but item_frameitem_frame.

So, the following command would work:

/testfor @e[type=item_frame,r=10] {Item:{id:minecraft:writable_book,tag:{display:{Name:"Keys"}}}}

/testfor @e[type=item_frame,r=10] {Item:{id:minecraft:writable_book,tag:{display:{Name:"Keys"}}}}

Please notnote: this command checks the name given to an item. You are essentially looking for a writeablewritable 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:

/testfor @e[type=item_frame,r=10] {Item:{id:minecraft:written_book,tag:{title:Keys}}}

/testfor @e[type=item_frame,r=10] {Item:{id:minecraft:written_book,tag:[{title:Keys}][2]}}

You used the wrong entity name. A hanging itemframe is not called ItemFrame but item_frame.

So, the following command would work:

/testfor @e[type=item_frame,r=10] {Item:{id:minecraft:writable_book,tag:{display:{Name:"Keys"}}}}

Please not this command checks the name given to an item. You are essentially looking for a writeable 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:

/testfor @e[type=item_frame,r=10] {Item:{id:minecraft:written_book,tag:{title:Keys}}}

You used the wrong entity name. A hanging itemframe is not called ItemFrame but item_frame.

So, the following command would work:

/testfor @e[type=item_frame,r=10] {Item:{id:minecraft:writable_book,tag:{display:{Name:"Keys"}}}}

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:

/testfor @e[type=item_frame,r=10] {Item:{id:minecraft:written_book,tag:[{title:Keys}][2]}}
added 75 characters in body
Source Link
user254948
  • 236
  • 1
  • 5

Your issueYou used the wrong entity name. A hanging itemframe is that you have invalid JSONnot called ItemFrame but item_frame.

Your command is almost correctSo, however your error is in this minor sectionthe following command would work:

id:minecraft:writable_book

The issue with this is/testfor @e[type=item_frame, that it is not valid JSON. JSON is generally in the formr=10] {Item:{id:minecraft:writable_book,tag:{display:{Name:"Keys"}}}}

key:value

for simple values. InPlease not this command checks the case of special characters or spaces it should be surrounded by quotesname given to an item. There is of course also arrays and object structuresYou are essentially looking for a writeable book that has been {...}renamed using an anvil.

In If your case, the value "minecraft:writable_book"goal is invalid duehowever to the fact that it containscheck for a special character,closed book with a title you should use the following command:.

If you however surround it with quotes/testfor @e[type=item_frame, your command should work just fine.r=10] {Item:{id:minecraft:written_book,tag:{title:Keys}}}

/testfor @e[type=ItemFrame,r=10] {Item:{id:"minecraft:writable_book",tag:{display:{Name:"Keys"}}}}

Your issue is that you have invalid JSON.

Your command is almost correct, however your error is in this minor section:

id:minecraft:writable_book

The issue with this is, that it is not valid JSON. JSON is generally in the form

key:value

for simple values. In the case of special characters or spaces it should be surrounded by quotes. There is of course also arrays and object structures {...}.

In your case, the value "minecraft:writable_book" is invalid due to the fact that it contains a special character, the :.

If you however surround it with quotes, your command should work just fine.

/testfor @e[type=ItemFrame,r=10] {Item:{id:"minecraft:writable_book",tag:{display:{Name:"Keys"}}}}

You used the wrong entity name. A hanging itemframe is not called ItemFrame but item_frame.

So, the following command would work:

/testfor @e[type=item_frame,r=10] {Item:{id:minecraft:writable_book,tag:{display:{Name:"Keys"}}}}

Please not this command checks the name given to an item. You are essentially looking for a writeable 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:

/testfor @e[type=item_frame,r=10] {Item:{id:minecraft:written_book,tag:{title:Keys}}}

Source Link
user254948
  • 236
  • 1
  • 5
Loading