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 11:20, 11. Sep 2018
Joined Aug 2018
User 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 03:08, 27. Jun 2020
Joined May 2019
User 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
User 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 11:10, 23. Nov 2020
Joined Aug 2020
User 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).