Started by
MisterSmeet
on
Topic category: Help with Minecraft modding (Java Edition)
How do I make the item usable when the player is wearing the entire set of armor? I have an item and I want the player to be able to use it only when the player is wearing the entire set of armor.
I couldn't fit the whole code snippet in the screenshot but it's like this^
The term "use" is a bit vague; you can replace the "Player uses item" event trigger(which calls whenever the player 'eats' an item) with the player left clicks or player right clicks or whatever other event trigger.
The bit that got cut off is just 4 ANDs concatenated together.
It's just important to know that "Get item from armor slot [number] of [Event/target entity]" returns the item in the [number] slot of the player's inventory. 3 is helmet, 2 is chestplate, 1 is leggings, and 0 is boots. Replace the diamond armor bits with the modded armor bits you want.
You can run whatever code you want inside the 'if's body or call another procedure that controls what the item does.