This question already has an answer here:

i had this amazing skyblock map until someone /fill barrier block all over i need to get rid of all of it with 1 command please helpenter image description here

enter image description here

marked as duplicate by galacticninja, Wondercricket, Ivo Coumans, Virusbomb, Karlyr Aug 19 at 18:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • In your situation I would probably just put a command like /execute at @a run fill ~-10 ~-10 ~-10 ~10 ~10 ~10 air replace barrier into a repeating command block and then fly around in the affected area. Would that be an acceptable solution? – bearb001 Aug 17 at 0:53
  • Shouldn't /replace near work? – Robbie Aug 17 at 5:44
  • @Robbie I haven't heard of a /replace near command before, are you talking about some mod? – bearb001 Aug 17 at 10:19
  • I guess it is. I've used it on multiplayer servers before and assumed it was just a vanilla command. – Robbie Aug 17 at 17:43

What you could do is use the /fill command

/fill x y z x2 y2 z2 block block variant replace block2

block variant

It goes as follows:

x y z - the coordinates of the bottom left area of where the barriers you want to replace are

x2 y2 z2 - the coordinates of the top right area of where the barriers you want to replace are

block - This is the type of block you want to replace e.g. Minecraft:barriers

block variant - In this case you don't need to use this. This would be used if you wanted to replace planks or logs

block2 - The block you want to replace the barriers with e.g. Minecraft:air

Hope this helps!

  • Please don't answer duplicate questions. – pppery Aug 18 at 21:47

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