3

Help wanted with command.build

WatermelonFarm's Avatar WatermelonFarm1/7/21 12:43 pm
2/7/2021 11:53 pm
ImYourFwend_'s Avatar ImYourFwend_
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's Avatar
WatermelonFarm
Level 28 : Expert Engineer
29

Create an account or sign in to comment.

11

1
01/07/2021 1:53 pm
Level 36 : Artisan Toast
Supamegabread
Supamegabread's Avatar
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
01/07/2021 1:21 pm
Level 16 : Journeyman Engineer
endless_reiteration
endless_reiteration's Avatar
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
01/07/2021 2:22 pm
Level 28 : Expert Engineer
WatermelonFarm
WatermelonFarm's Avatar
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
01/07/2021 4:47 pm
Level 16 : Journeyman Engineer
endless_reiteration
endless_reiteration's Avatar
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
01/07/2021 1:12 pm
Level 43 : Master Lemon
char-png
char-png's Avatar
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
01/07/2021 12:52 pm
Level 14 : Journeyman Miner
Jah Jah
Jah Jah's Avatar
are you playing on bedrock edition or java edition?
1
01/07/2021 12:54 pm
Level 28 : Expert Engineer
WatermelonFarm
WatermelonFarm's Avatar
java
1
01/10/2021 11:44 am
Level 14 : Journeyman Miner
Jah Jah
Jah Jah's Avatar
ok idk then
1
01/07/2021 12:48 pm
Level 25 : Expert Crafter
ShrewdGazelle
ShrewdGazelle's Avatar
idk sorry
1
02/07/2021 11:53 pm
Level 26 : Expert Warrior
ImYourFwend_
ImYourFwend_'s Avatar
yea srry idk about that
1
01/08/2021 8:01 am
Level 36 : Artisan Toast
Supamegabread
Supamegabread's Avatar
Commands start to get really complicated when you start getting into nbt tags so prepare yourself
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome