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?

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

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
  • Just a question: what is 2.5 equal to: 2 blocks or 3? – rappatic Jun 27 '16 at 0:50
  • @hyperviper11 Neither. -2.5 to 2.5 on each axis makes it 5 blocks, centered around the player. – SirBenet Jun 27 '16 at 16:06
-1

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

  • 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 '18 at 3:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.