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

Started by OutroNinja on

Topic category: Help with Minecraft modding (Java Edition)

Active 1 year ago
Joined Apr 2023
Points:
239

User statistics:

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

Active 6 months ago
Joined Oct 2023
Points:
301

User statistics:

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