How to add X Y Z coordinates to /testfor commands

How to add X Y Z coordinates to /testfor commands - Crop anonymous female in latex gloves making fluid for perfume among glass jars on wooden table

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?






Pictures about "How to add X Y Z coordinates to /testfor commands"

How to add X Y Z coordinates to /testfor commands - Cook adding flour into baking form while preparing meal
How to add X Y Z coordinates to /testfor commands - Crop anonymous chef adding parsley to spaghetti with tomato and meat while cooking lunch in kitchen
How to add X Y Z coordinates to /testfor commands - Crop anonymous cook in apron sifting flour while preparing baking dish against gray background



How do you do command Testfor?

How to Enter the Command
  • Test if Players are within 10 blocks. In this example, we will test to see if there are any players within a 10 block radius with the following command: /testfor @a[r=10] ...
  • Test if Mooshrooms are within 50 blocks. ...
  • Test if Nearest Player is at Level 20 experience.


  • What replaced the Testfor command in Minecraft?

    The /testfor command became obsolete in Minecraft 1.13, and has been replaced by the /execute command*. It will do the same as typing /testfor @e {SelectedItem:{id:"<item>"}} and then putting a comparator to the command block with the command, and then running the command which you wanna run.



    Minecraft Redstone Tutorial | How to use testfor commands in MCPE!




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: Anna Shvets, Klaus Nielsen, Klaus Nielsen, Klaus Nielsen