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

Started by Huntermanz on

Topic category: Help with Minecraft modding (Java Edition)

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.

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

 

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?

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).

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?