Check item from closed inventory

Started by Mr.Gise on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Check item from closed inventory

I'm making a mod where the player can cast spells from an item with its own inventory. the problem is I want the player to hold the item while casting with its inventory closed (I'm using a keybind. an alternative option is to use the keybind with the GUI open, so that will also be useful)

Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I somewhat accomplished this…
Mon, 12/02/2024 - 02:43

I somewhat accomplished this, but it was saying there was some problems. I kinda did this by changing (the value of) an nbt tag on the player depending on what was in the slot (and a globle trigger of "on player tick update"), settting the tag to 0 when you die (if keep inventory's off) and on another on player tick procedure, apply the effect based on the tag value.