flashlight type thing

Started by Crimzon on

Topic category: Help with modding (Java Edition)

Last seen on 10:02, 14. Sep 2024
Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
flashlight type thing

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?

Last seen on 20:47, 14. Sep 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use on item right clicked…
Tue, 09/10/2024 - 00:22

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.