1

I need help with command

Silverfish003's Avatar Silverfish0038/26/19 7:47 am
1 emeralds 143 3
8/28/2019 2:45 pm
Silverfish003's Avatar Silverfish003
Hey there Minecrafters!
I just wanted to ask one question.

I´m making a Super Mario Bros. map and I´ve got a problem.
I want to make it so if you punch your head against a brick block, the bricks would dissapear above players head, and question block would turn into block that does nothing, like in original (Of course you would say me /execute), But that is not working. It just breaks blocks just up the command block, that is running command /setblock ~ ~1 ~ air destroy and then bye-bye. If anyone knows how to do this, I will put this person in credits when the map will be finished.

Thank you to anyone!
Posted by Silverfish003's Avatar
Silverfish003
Level 18 : Journeyman Cake
4

Create an account or sign in to comment.

3

1
08/27/2019 5:13 am
Level 52 : Grandmaster Blob
HoboMaggot
HoboMaggot's Avatar
Its best to summon a floating armor stand in the same position as the block

As a test:
On top of brick block: /summon armor_stand ~ ~-1 ~ {NoGravity:1b}

In your command block (repeating, active): /execute as @a at @s if block ~ ~1 ~ minecraft:bricks run setblock ~ ~1 ~ air destroy

Chain command block or another repeating command block (active): /execute if block (actual cords) minecraft:air run as @e[type=armorstand,x=(x_cord),y=(y_cord),z(z_cord),distance=..2] run setblock ~ ~ ~ (desired non-functioning block)

The armor stand is useful if you want to summon coins/mushrooms as well.

Since you've already figured this out, just keep this in mind for future use
1
08/28/2019 2:45 pm
Level 18 : Journeyman Cake
Silverfish003
Silverfish003's Avatar
I found an easier way. You will see once Mario map is released.
1
08/26/2019 9:09 am
Level 18 : Journeyman Cake
Silverfish003
Silverfish003's Avatar
This thread is NOT functioning from now on, because I figured it out by accident.
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome