0

I am trying to make a money wars mini-game, and to upgrade the generators, you throw a certain ingot on the generator block, and then it upgrades it. I know you can put:

/testfor @e[type=Item] {Item:{id:whatever id}}

But where would I put the X Y Z coordinates?

0

This syntax should work:

/testfor @e[x=a,y=b,z=c,r=1,type=Item]

Where a is the x co-ordinate, b is the y co-ordinate, and c is the z co-ordinate. Note that the r=1 radius attribute is necessary to detect all items in the 1-block area, instead of only detecting items at that exact co-ordinate.

Example:

/testfor @e[x=25,y=64,z=79,r=1,type=Item]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.