2

I'm working on a one command creation, Magical Weapons, and I'm currently working on a weapon called Black-Hole-In-A-Box. The idea is when you right-click with it, it clears all the blocks in a 5x5x5 box around you. So, I have this command (in a command block):

/execute @p ~ ~ ~ fill ~5 ~5 ~5 minecraft:air

but when I run it, I get this error message:

Failed to execute fill ~5 ~5 ~5 minecraft:air

But I don't know why it's not working. It should. I've worked for hours on this and I've tried tons of variations. What is the proper command to fill a 5x5x5 box around me with air?

1
  • 3
    You should probably test execute commands in normal command blocks or chat, that way you get a clearer error message. :)
    – Nebula
    Jun 21, 2016 at 20:56

2 Answers 2

5

Fill needs two sets of coordinates, one for each corner of the box you want to fill. Try this:

/execute @p ~ ~ ~ fill ~-2.5 ~-2.5 ~-2.5 ~2.5 ~2.5 ~2.5 minecraft:air
2
  • Just a question: what is 2.5 equal to: 2 blocks or 3?
    – rappatic
    Jun 27, 2016 at 0:50
  • @hyperviper11 Neither. -2.5 to 2.5 on each axis makes it 5 blocks, centered around the player.
    – SirBenet
    Jun 27, 2016 at 16:06
-1

try the command /fill ~5 ~5 ~5 ~ ~ ~ air

1
  • Hi Elyiana, welcome to Arqade! Could you perhaps elaborate on your command and what might be the issue with the current command in the question?
    – Gigazelle
    Dec 3, 2018 at 3:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .