How to detect blocks between a player and an entity

Started by chamac on

Topic category: Help with modding (Java Edition)

Last seen on 16:58, 16. Aug 2023
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to detect blocks between a player and an entity

I am trying to make a custom mob that will play a sound when there is a player nearby with no blocks in between the entity and the player, but i don't know how to check if there are blocks between, is there a way to do this?

Last seen on 16:58, 16. Aug 2023
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
woah!
Tue, 08/15/2023 - 00:38

woah!