How to check if player is within a certain distance to block?

Started by Huntermanz on

Topic category: Help with modding (Java Edition)

Last seen on 21:29, 3. Nov 2021
Joined Aug 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to check if player is within a certain distance to block?

I want a procedure to trigger on a custom block only when the player is within say 5 blocks. How do i accomplish this? I could not find any way to get the players x,y,z coordinates in the editor.

Last seen on 14:15, 24. Sep 2022
Joined May 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i need the same help with…
Tue, 10/29/2019 - 00:38

i need the same help with this

 

Last seen on 17:41, 9. Dec 2023
Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
is there a solution now?
Sat, 11/16/2019 - 21:00

is there a solution now?

Last seen on 14:30, 2. Aug 2022
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes. In MCreator version…
Fri, 08/14/2020 - 12:08

Yes. In MCreator version 2020.4 the block "Does entity exist at (xyz) in square cube with side (4) of type (EntityAgeable)" to the world data tab. To do what you want to do, change (4) to (5) and (EntityAgeable) to (Entity Player).

Last seen on 00:27, 10. May 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is there a way to make it…
Fri, 04/29/2022 - 17:32

Is there a way to make it detect if any players in the radius has a specific tag?