giving potion effects when armor is worn

Started by TrueFreesia on

Topic category: Help with modding (Java Edition)

Last seen on 04:19, 23. Jan 2024
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
giving potion effects when armor is worn

I'm trying to make a helmet give slow fall when worn, i looked in forums and got the tutorial at the bottom. But I can't find "if item in player's armor slot" can someone help?

 

the tutorial i got:

Add this procedure to on tick update of every armor piece:

If item in player's armor slot 0 = helmet

Set (local variable) to (local variable) +1

If...

Set...

If...

Set...

Add potion effect to player level (local variable) for 60 ticks

 

Last seen on 20:37, 26. Jul 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You've got the right idea…
Tue, 11/07/2023 - 04:46

You've got the right idea. If you look in the settings for your custom armor, there should be a section with different triggers. You can link your procedure to the trigger that says "armor update tick."

Alternatively, you could make a procedure with the global trigger "on player update tick," and have it check that the player is has their helmet in their third armor slot before applying the potion effect.