Started by
Crimzon
on
Topic category: Help with Minecraft modding (Java Edition)
basically, if you right click while holding the item, it gives you night vision forever pretty much, puts an overlay on but changes durability by -1 every second
If you right click again, then it stops the night vision, hides the overlay and stops durability drain.
Any idea how?
Use on item right clicked trigger. Then use on item inventory tick trigger on each tick add 1 tick of night vision to event target entity and add 1 damage to item. Then if you right click item, the night vision stops on its own. You can also use a logic variable which connects to the conditional trigger of the overlay, which will be set to true when the item is right clicked.