How Do I Get The Items In The Inventory Of A Block?

Started by KillerCat8293 on

Topic category: Help with modding (Java Edition)

Last seen on 20:42, 10. Nov 2023
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How Do I Get The Items In The Inventory Of A Block?

I am trying to make a block that has an input GUI box and is supposed to spawn an item underneath it if it detects that item but how do I find what item is in the blocks inventory to go in a if then blocks code?

Last seen on 09:43, 31. Oct 2023
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
event triggered when guiā€¦
Mon, 08/21/2023 - 14:08

event triggered when gui closed:
If (red item in minecraft components) = (red one from logic) get a copy of item from slot 0 of block at x y z if it has inventory
do