Help with inventory type detection

Started by Emanatnawtnodi on Fri, 09/02/2022 - 09:06

Topic category: Help with modding (Java Edition)

Last seen on 08:38, 15. Sep 2022
Joined Sep 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Help with inventory type detection
Fri, 09/02/2022 - 09:06

I am very new to using mcreator (i started a few days ago) and want to make a mod that moves lapis lazuli and an enchantable item on the press of a button from the top 9 slots of the players inventory into the slots in an enchanting table, when the player has the enchanting table GUI opened. The player can then select the enchantment level (as i dont think that is possible to codeto be automated) and the enchanted item gets moved out of the slot again. The lapis lazuli should also get restocked when it gets below 3. I want it to be client side only as the server i play on wont install it. 

My problem is now, that i dont know how to detect the inventory the player is in, so it doesnt activate in some other GUI. I have found nothing in any tutorial ive watched or in any related forum post.