Is it possible to display a gui when the player hovers the mouse over an entity?

Started by OutroNinja on

Topic category: Help with modding (Java Edition)

Last seen on 20:10, 5. Feb 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is it possible to display a gui when the player hovers the mouse over an entity?

I thought about using raycasting but from what I saw it only accepts blocks. I would like to display the health and armor the player is wearing when I hover my hand over them, but so far I haven't thought of an alternative.

Thank you in advance for the response.

Last seen on 19:48, 21. Apr 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What if you use raycasting,…
Mon, 01/22/2024 - 20:57

What if you use raycasting, then check if the entity is in a 1 by 1 cube nearby?