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

Started by Huntermanz on Mon, 09/10/2018 - 11:28

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:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to check if player is within a certain distance to block?
Mon, 09/10/2018 - 11:28

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:
  • Tracker tickets:
  • 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 20:20, 17. Nov 2019
Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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:
  • Tracker tickets:
  • 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:
  • Tracker tickets:
  • 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?