1

I need /testfor help

shmevan8or's Avatar shmevan8or7/23/17 8:25 pm
1 emeralds 574 2
7/24/2017 2:21 pm
PuzzlEnjoY's Avatar PuzzlEnjoY
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?
Posted by shmevan8or's Avatar
shmevan8or
Level 1 : New Miner
0

Create an account or sign in to comment.

2

1
07/24/2017 2:21 pm
Level 4 : Apprentice Explorer
PuzzlEnjoY
PuzzlEnjoY's Avatar
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
1
07/24/2017 3:52 am
Level 28 : Expert Pig
Dark_Alpha_
Dark_Alpha_'s Avatar
/testfor @e[x=-510,y=77,z=-201,type=Item_Frame] {Item:{id:tripwire_hook,tag:{display:{Name:"Key2A"}}}}

this should do it.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome