but i need to be able to reset the amount of items within the chest.
could i /tp the items in the chest into lava?
i dont have too much experience with this....
what im goin for is that when there are 2 items within the chest it will detect them. then destroy them.
that way the process must be repeated to get the result.
like if i press this button twice. this happens. but i have to press the button twice. or the mechanism (like any drill from any mod that shoots the item it mines out the side of it) at the time has to go off twice before such and such happens.
i could get this to work 1 time but 1 time only because the items would obviously build up past a stack of 2.... so its not repeatable without some way to get rid of the items that are within the chest.
You could probably remove the block and then place a new one with the data you want. I'm not very familiar with how the commands work so you'll have to figure that out yourself.
You could probably remove the block and then place a new one with the data you want. I'm not very familiar with how the commands work so you'll have to figure that out yourself.
Alternatively, you can use the /blockdata command.
i have this command that will detect if there is so many items in a chest.
/testforblock ~ ~1 ~ minecraft:chest -1 {Items:[{id:"minecraft:cobblestone",Count:64b}]}
but i need to be able to reset the amount of items within the chest.
could i /tp the items in the chest into lava?
i dont have too much experience with this....
what im goin for is that when there are 2 items within the chest it will detect them. then destroy them.
that way the process must be repeated to get the result.
like if i press this button twice. this happens. but i have to press the button twice. or the mechanism (like any drill from any mod that shoots the item it mines out the side of it) at the time has to go off twice before such and such happens.
i could get this to work 1 time but 1 time only because the items would obviously build up past a stack of 2.... so its not repeatable without some way to get rid of the items that are within the chest.
im litterally on hold with my whole entire creation/structure until i can figure in this one....
so if anyone has an answer.... i would be so thankful.... so so so very thankful.
You could probably remove the block and then place a new one with the data you want. I'm not very familiar with how the commands work so you'll have to figure that out yourself.
我はメシアなり!
i hadn't thought about destroying the chest.... hmmmmm
good idea right there.
oh cool! /setblock on a chest actually destroys the chest and the items held within it. sweeeet
so ill just testfor the stuff in the chest then have that do whatever,
then link it to /setblock air
and then have it /setblock chest in the same place afterwords.
this way the items in the chest are removed.
lol thank you ^-^;
Alternatively, you can use the /blockdata command.
/blockdata [x] [y] [z] {Items:[{id:}]}
Replace the Coordinates with the ones you desire.
Check my Twitter here for absolutely nothing.
This does not work for me.
What is the matching command for 1.14.4?
Looks like /data replaced blockdata
You can use /data merge block <pos> <nbt>
To add an item
I found /replaceitem block <pos> <slot> <item> [amount]
To remove an item or replace it with another