How to detect blocks between a player and an entity

Started by chamac on

Topic category: Help with Minecraft modding (Java Edition)

Active 2 months ago
Joined Jun 2022
Points:
412

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
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?

Active 2 months ago
Joined Jun 2022
Points:
412

User statistics:

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

woah!