Getting slot in block inventory that contains item

Started by Jaklyn on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Getting slot in block inventory that contains item

Hello,

I am trying to make a procedure that checks which slot an item is within a block inventory. For example, lets say im trying to make it so if any inventory holds a dirt block, its swapped with a diamond. 

Can anyone help?