When using selectors, all of the arguments go between the same pair of square brackets and are separated by commas. What you wanted to do is probably this:
testfor @e[type=PrimedTnt,x=-272,y=58,z=-1844]
You're getting the error message because you've made [x=-272 y=58 z=-1844]
an argument of its own, not part of the selector. As it happens, the second argument for testfor
is NBT data. The correct syntax to specify NBT data would, as the answer above says, be {x:-272,y:58,z:-1844}
.
HOWEVER no entity has an "x" int, a "y" int, and a "z" int in it's data. Although it's the correct syntax and won't cause an error, it will never match an entity. The correct tags for specifying location with the NBT argument would be this:
testfor @e[type=PrimedTnt] {Pos:[-271.5,58.5,-1843.5]}
The chances are you didn't want to do that though, as it'd test only for that very specific point in space and nothing else. The solution is the first command I gave, where all of the arguments are in the square brackets.
You don't need to separate the {NoAI:1,Rotation:[45.0f,-15.0f]}
portion of the NBT tag and the {CustomName:"Fire"}
portion. In fact, it's causing the syntax error here.
What you're going to want is as follows:
/summon Villager ~ ~1 ~ {NoAI:1,Rotation:[45.0f,-15.0f],CustomName:"Fire"}
Additionally, you may want to add CustomNameVisible:1
to the NBT tag to make the name show up like a player name, so the command becomes the following:
/summon Villager ~ ~1 ~ {NoAI:1,Rotation:[45.0f,-15.0f],CustomName:"Fire",CustomNameVisible:1}
Best Answer
You have to specify the block data in order to rotate it. In your case, east would be 5. You do this by adding
Data
to your command. I also added coordinate information.Here is a list of block data from the wiki linked above: