1
I need /testfor help
I'm trying to test for an item frame with a tripwire hook named "Key2A" in it. (Version 1.12, on a server. the server shouldn't be messing with the command though.) I'm using the command:
/testfor @e[type=Item_Frame] {TileX:-510,TileY:77,TileZ:-201,Item:{id:tripwire_hook,tag:{display:{Name:"Key2A"}}}}
I receive the error:
[02:23] entity.ItemFrame.name did not match the required data structure
I'm not sure what the problem is. Can someone help me fix the command?
/testfor @e[type=Item_Frame] {TileX:-510,TileY:77,TileZ:-201,Item:{id:tripwire_hook,tag:{display:{Name:"Key2A"}}}}
I receive the error:
[02:23] entity.ItemFrame.name did not match the required data structure
I'm not sure what the problem is. Can someone help me fix the command?
Create an account or sign in to comment.
2
1
Here comes Mr. Solution!
Solution:
/testfor @e[type=Item_Frame] {TileX:-510,TileY:77,TileZ:-201,Item:{id:"minecraft:tripwire_hook",tag:{display:{Name:"Key2A"}}}}
Errors:
- If you will do a testfor or a scoreboard command with tags you always have to write in formal way (Ex: {id:stone} = {id:"minecraft:stone"} | {Count:1} = {Count:1b} , etc.)
Tips:
- You can just write <item_frame> instead of <Item_Frame> (No Caps)
- If there's nothing else with the name <Key2A> you can just write {tag:{display:{Name:"Key2A"}}} with no {id:"minecraft:trpwire_hook"}
Hope it works
Solution:
/testfor @e[type=Item_Frame] {TileX:-510,TileY:77,TileZ:-201,Item:{id:"minecraft:tripwire_hook",tag:{display:{Name:"Key2A"}}}}
Errors:
- If you will do a testfor or a scoreboard command with tags you always have to write in formal way (Ex: {id:stone} = {id:"minecraft:stone"} | {Count:1} = {Count:1b} , etc.)
Tips:
- You can just write <item_frame> instead of <Item_Frame> (No Caps)
- If there's nothing else with the name <Key2A> you can just write {tag:{display:{Name:"Key2A"}}} with no {id:"minecraft:trpwire_hook"}
Hope it works
1
/testfor @e[x=-510,y=77,z=-201,type=Item_Frame] {Item:{id:tripwire_hook,tag:{display:{Name:"Key2A"}}}}
this should do it.
this should do it.