How to check if a player is at a specific Y position?

@DatEpicCoderGuyWhoPrograms The command block says my_username did not match the required data structure and the connected comparator does not power. Even if my height matches with the command. – Kim-Yannick Jürs May 15 ’14 at 13:04 Use @p [y= ], replacing with the y coordinate you wish to search.

How to test if a player is holding a specific item?

That in mind, let us continue. Let’s set the value of “holding” to a player to 1 when they’re holding a white stained glass. To do this, use this command: Now, whenever a person is holding a white stained glass, their “holding” score will be set to 1. Now, whenever a player is holding a white stained glass, they get invisiblity.

How can I check if a player is in the air with / testfor?

The first command sets all player to ‘being on the ground’, and the second command sets those who are in the air to not be on the ground. It gives them infinite jump boost whilst in the air which prevents fall damage (they can still take fire damage, wither, etc) Thanks for contributing an answer to Arqade! Please be sure to answer the question.

What happens when a player isn’t holding the glass?

Whenever a player isn’t holding the glass anymore, they still get the effect! To fix this, add a last command block that constantly sets the “holding” score of a player to 0. Make SURE this comes AFTER the first two, otherwise it could mess up the machine.

How to search for a Y position in Minecraft?

Use @p [y= ], replacing with the y coordinate you wish to search. Additionally, you can define a cubic search area with @p [x= ,y= ,z= ], replacing , , and with their respective values.

When does Minecraft Say Hi to all players?

It will say hi if the hitbox of the player is within the block at y=65. the dy=0 appears to be nessessary to prevent it from always saying hi, the x and z seem to default to the position where the command is executed. I found the next 1 line command to be working. First, execute as all players, then as all players that are at y=10 with dy=0.

How does the testfor command work in Minecraft?

Press the Enter key to run the command. Once the cheat has been entered, the testfor command will check for players nearby. You will see the message “Found xxx” appear in the lower left corner of the game window where xxx is the name of each player detected within 10 blocks of you.

You Might Also Like