Tutorial: Morph Tools - ssomar1607/ExecutableItems GitHub Wiki
Tutorial: How the Morph Tools was created
1) CREATE THE INDIVIDUAL TOOL ITEMS
You first need to prepare the items that you will cycle through. For each tool in the image, that will be the "state" of the Morph Tool.
2) SET THE ITEM'S USAGE TO 0
You COULD set this to 1 but in my opinion, not displaying the usage remaining looks and feels cleaner. The main reason why it has to be 1 or 0 so when the activator activates, the item get's deleted so the next state of the Morph Tool may appear in your inventory slot.
3) PLAN HOW THE TOOL WILL CYCLE BETWEEN STATES
This is important because you need to plan how will the item transform for everytime you are going to activate the activator.
4) CREATE THE ACTIVATOR
You will have to create an activator that will help you cycle through the states of the item
5) SET THE USAGE MODIFICATION VALUE TO -1
Since the Usage is 0, the item's usage is going to be 0 when the activator activates, deleting the item so the next "state" may appear in the inventory slot.
6) SET THE SNEAK CONDITION
Other tools actually need you to right-click to use its functions so it's better if you need to sneak for it to cycle.
Step-By-Step to how to find the condition
Don't forget that you can hide the error message if you right-click using the item if you aren't sneaking
7) ADD THE COMMANDS
You will mainly need the giveslot command for this to work properly
For example, The order was, "AXE -> PICKAXE -> HOE". You are editing the "Axe" state of the Morph Tools and you want it to go to the "Pickaxe" state after you SHIFT-RIGHT CLICK the item so you will add this command, ei giveslot %player% (item id of the Pickaxe state) %slot%.
While editing In the "Pickaxe" state, you want it transform into the "Hoe" state, you will add the command, ei giveslot %player% (item id of the Hoe state) %slot%
Then you want to make the "Hoe" state go back to the "Axe" state so you will add the command, ei giveslot %player% (item id of the Axe state) %slot%
Extra Notes
Add unbreakable to all states of the Morph Tools because if it breaks, it will be gone for good
Enchanting one state of the item will not carry on into the next state so you neither add enchants the item in the item file / editor or prevent players from putting it on an anvil or in an enchanting table