How to detect if an entity is standing in front of another?

Started by TheCatalystGaming on

Topic category: Advanced modding

Joined Nov 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to detect if an entity is standing in front of another?

I have an entity thas basically supposed to be a "Claymore" mine, which explodes whenever something walks in front of it. How could I make the mine detect when a mob walks in front of it, keeping in mind that it can be placed in any horizontal direction? Any help would be appreciated.

You could use entity in…
Wed, 02/03/2021 - 09:23

You could use entity in range procedure block for this, or for each entity in range, and do more checks inside the loop