how do i render an overlay only when i pull out a specific item?

Started by RishonRJ on Sat, 05/28/2022 - 14:44

Topic category: Help with modding (Java Edition)

Last seen on 17:03, 28. May 2022
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
how do i render an overlay only when i pull out a specific item?
Sat, 05/28/2022 - 14:44

how do i render an overlay only when i pull out a specific item? i have been trying to make a procedure to render only if my custom item is in the main hand. how do i do this?

Last seen on 23:51, 26. Jun 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
There's a box in the overlay…
Sun, 05/29/2022 - 06:47

There's a box in the overlay editor called "Display overlay in-game" which wants a procedure that returns a boolean. If the procedure returns true, the overlay is displayed and vice versa...

In the procedure, you could check the item in player's main hand if it's equal to your specific item. If true, then return true.

 

Image: https://imgur.com/RdCwo2V