Custom armor ability

Started by knowburro on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jan 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Custom armor ability
Tue, 01/28/2025 - 17:13 (edited)

I'm trying to create a special ability for my hat. I followed a YouTube tutorial, and when I press the 'R' key, the ability activates correctly. However, the problem is that it doesn't recharge. Could someone help me fix this?

Edited by knowburro on Tue, 01/28/2025 - 17:13
Joined Jan 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I found the error. The issue…
Wed, 01/29/2025 - 03:58

I found the error. The issue was occurring because, when the code tries to access the item in slot 3 after the wait time, the item may have been changed or removed. So, I made the following adjustments to the 840-tick wait time.