how to detect if an entity is in front of a block

Started by CluckCoop on

Topic category: Help with Minecraft modding (Java Edition)

Joined Aug 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to detect if an entity is in front of a block

This is something I've wanted to figure out how to do for a while now for my mod Create: Obsidian. The mod includes flare entites and I need to detect if they are in front of my "Flare Detector" block I don't care about how far away the flare is, but in short: If a flare, at any point in time, passes in front of (is at the y coords of) The front face of the Flare Detector block then an action will run. I appreciate any help and look forward to a reply

-Cluckcoop

Joined Aug 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
oh and no imgur 'cuz I'm in…
Tue, 11/18/2025 - 16:29

oh and no imgur 'cuz I'm in the UK