3

Help wanted with command.build

WatermelonFarm 1/7/21 12:43 pm
426
2/7/2021 11:53 pm
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?
Posted by
WatermelonFarm
Level 32 : Artisan Engineer Engineer
41

  Have something to say?

JoinSign in

11

Supamegabread
01/07/2021 1:53 pm
Level 36 : Artisan Toast
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
In2itivity
01/07/2021 1:21 pm
Level 18 : Journeyman System
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
WatermelonFarm
01/07/2021 2:22 pm
Level 32 : Artisan Engineer Engineer
This would abosolutely work if there was a way in wich just the chest item always gets destroyed
let me know if there is
1
In2itivity
01/07/2021 4:47 pm
Level 18 : Journeyman System
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
char-png
01/07/2021 1:12 pm
Level 46 : Master Lemon
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
Jah Jah
01/07/2021 12:52 pm
Level 16 : Journeyman Miner
are you playing on bedrock edition or java edition?
1
WatermelonFarm
01/07/2021 12:54 pm
Level 32 : Artisan Engineer Engineer
java
1
Jah Jah
01/10/2021 11:44 am
Level 16 : Journeyman Miner
ok idk then
1
ShrewdGazelle
01/07/2021 12:48 pm
Level 25 : Expert Crafter
idk sorry
1
ImYourFwend_
02/07/2021 11:53 pm
Level 26 : Expert Warrior
yea srry idk about that
1
Supamegabread
01/08/2021 8:01 am
Level 36 : Artisan Toast
Commands start to get really complicated when you start getting into nbt tags so prepare yourself
1

Welcome