3
Help wanted with command.build
Hello there,
I am on my way with a project, however I have come to a halt. I want to create a system where you input items in a chest to defeat an enemy and when you've put the correct item in, the chest gets broken and drops the items you have put in. There should be a way to do this with command blocks but I do not know what commands I should use for it. Do any of you know what command to use?
I am on my way with a project, however I have come to a halt. I want to create a system where you input items in a chest to defeat an enemy and when you've put the correct item in, the chest gets broken and drops the items you have put in. There should be a way to do this with command blocks but I do not know what commands I should use for it. Do any of you know what command to use?
Create an account or sign in to comment.
11
1
i believe that if you use a chest with a comparator you could do this. i don't know comparators well so you will have to figure that out yourself but I know that if you do it right you will get it to emit a redstone signal only if its a specific item. the redstone signal will lead into the first command block with the command " /setblock <coords of chest> minecraft_air destroy " this will break the chest. then another strand of redstone will lead into the second command block with command /kill <target>
1
Assuming you're playing the latest version of MCJE, try this repeating command chain:
execute if block 12 23 34 minecraft:chest{Items:[{id:"minecraft:gold_block"}]} run setblock 12 23 34 minecraft:air destroy
1
This would abosolutely work if there was a way in wich just the chest item always gets destroyed
let me know if there is
let me know if there is
1
Try using this afterwards in a conditional command block to remove the chest but not the items:
kill @e[type=item,nbt={Item:{id:"minecraft:chest"}}]
1
I cant help but you should say what edition and version you're playing on in your forum, commands are sometimes different in different versions and editions
1
are you playing on bedrock edition or java edition?
1
java
1
ok idk then
1
idk sorry
1
yea srry idk about that
1
Commands start to get really complicated when you start getting into nbt tags so prepare yourself