[TUTORIAL] How to Give an Armor Set a Potion Effect

Started by SilentStarling on Sat, 02/06/2021 - 00:29

Topic category: User side tutorials

Last seen on 16:24, 20. Feb 2021
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
[TUTORIAL] How to Give an Armor Set a Potion Effect
Sat, 02/06/2021 - 00:29

Hi there, I've been seeing a lot of people ask for how to do this but I never saw an actual procedure solution posted anywhere so I wanted to throw this on here. It might not be the most "efficient" solution coding-wise, but it worked for me as intended and is easy to follow.

If you want a potion effect to trigger ONLY when a FULL armor set is equipped, you need the mod to check each armor slot before telling it to use a potion effect. So I used cascading if-else statements. Basically it says "if helmet slot = this helmet, AND chestplate slot = chestplate, AND legging slot = leggings, AND boots slot = boots, THEN add potion effect". For the armor slots, 3 is helmet, 2 is chestplate, 1 is leggings, and 0 is boots. So if you wanted only a leggings-boots combo to make you jump high, then you would do this procedure with slot 1 and slot 0 only. Hope this helps!

 

Last seen on 16:24, 20. Feb 2021
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
(No subject)
Sat, 02/06/2021 - 00:30

Last seen on 16:24, 20. Feb 2021
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
(No subject)
Sat, 02/06/2021 - 00:33

Last seen on 16:24, 20. Feb 2021
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I can't seem to get this…
Sat, 02/06/2021 - 00:34

I can't seem to get this image to post no matter what I do, sorry, feel free to delete

Last seen on 16:24, 20. Feb 2021
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
(No subject)
Sat, 02/06/2021 - 00:36

"Armor Set Potion Procedure"