How to make an item with an inventory that can activate other procedures.

Started by JakAtak02 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make an item with an inventory that can activate other procedures.

Im making a magic mod that has a many different spell items. I currently have most of the spells implemented. Im trying to create a spell book item that would hold the spells in slots in the items inventory and the player could switch the spells around as needed. Id like it to have about 6 slots that the player could put a spell item in and switch between with a keybind. Which ever one the player picks they could then right click to activate the procedure associated with the spell. The spell book would be able to hold about 18 more spells in total for 24 total slots. but only 6 of them would be used to cast from. I know how to make a an item and bind the gui to it but im lost on how to select a specfifc slot and activate the procedure connected to the item. Could someone help walk me through this?