Can't figure out how to get an entity I right click to appear in GUI

Started by Veloc1raptor030 on

Topic category: Help with modding (Java Edition)

Last seen on 18:02, 12. Aug 2024
Joined Dec 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Can't figure out how to get an entity I right click to appear in GUI

I am trying to make it so when I right click an entity that same entity will show up in a gui. If you ever played Jurassic Craft I am basically trying to do something like that where you have the entity model pop up with it's stats next to it.

Last seen on 20:43, 20. Aug 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can add entity models to…
Fri, 08/09/2024 - 23:21

You can add entity models to a custom GUI, you just need to make a procedure that returns the entity you want to display. Your procedure should return an entity, probably by getting the entity the player is riding, or checking if an entity of that type exists in a certain radius, and returning the nearest one.