Check if block inventory has item/remove 1 of item

Started by redwoodsteve on

Topic category: Help with MCreator software

Last seen on 03:55, 2. Jan 2023
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Check if block inventory has item/remove 1 of item

Hello, I was wondering if there was any way to check if a block inventory (a barrel in my case) contains an item (im checking for dirt). Also, is there a way to remove 1 of an item from an inventory? 

So I want to check if a barrel contains dirt. If it does, then remove 1 dirt from the barrel. 

Also, I want to add an item (bread) to a container without replacing any items.

 

Thanks!

Last seen on 03:55, 2. Jan 2023
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
h a l p
Sun, 01/01/2023 - 22:46

h a l p

Last seen on 03:55, 2. Jan 2023
Joined Jun 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
bruh someone help meh im…
Mon, 01/02/2023 - 01:14

bruh someone help meh im gonna die of old age before some1 replies

Last seen on 10:34, 23. Mar 2024
Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hi! There is nothing…
Fri, 01/06/2023 - 06:36

Hi! There is nothing complicated here, first we need "if", then in the block procedures we find a block - "the block on x y z is - " then through logic we equate it to our barrel. Then, through the GUI procedures, we find out if there is our dirt in this GUI, through the logic of "and", and if we do everything correctly, we do it, "remove 1 dirt from the inventory", like everything, as I'm not busy, I can send a photo