I really need help. I don't understand how to check what you're looking at.

Started by ivangrozniyИГ45 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I really need help. I don't understand how to check what you're looking at.
It is very important for my mod to make it so that when the player looks at a certain block/entity from my mod, a certain message is displayed on his screen.


I know how to display messages and have already written the code for this, but I don't understand how to activate it, because I need the program to start NOT when the player clicks on the block, but when he looks at it, without clicking the mouse. I have not found such a trigger, and all the alternatives that I came up with myself are very heavy on the PC and Minecraft crashes.
Joined Jul 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
and please no messages like …
Tue, 07/29/2025 - 10:41
and please no messages like "learn java", my mod is extremely simple and this is the only thing that doesn't work. and I don't need to learn java just for this