TransWikia.com

how do i check if a certain item has been taken out of a chest

Arqade Asked on August 15, 2021

I am trying to make a custom crafting datapack for Minecraft. I have found some tutorials that show me how, but all of them use droppers that craft the item instantly after putting the items in. currently i have a chest that crafts the items but I want to be able to detect once a player has taken out the crafted item so I can delete the items used in the recipe.

One Answer

This should work:

execute unless data block 785 61 526 {Items:[{Slot:15b,id:"minecraft:netherite_block"}]} run say taken

If you want to empty the chest use:

data merge block 785 61 526 {Items:[]}

Answered by QmegaMax on August 15, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP