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 16:42, 13. Feb 2024
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 06:27, 11. Feb 2024
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