2

When I discovered a command block, I did the dumbest thing you could possibly do on minecraft pe. I wrote in a command block saying (summon dragon) repeat! So how do I get rid of a large number of dragons?

  • /kill @e maybe? – somebody Oct 17 '17 at 22:23
  • @somebody That will kill all entities including items, itemframes and players. – Azoraqua Oct 18 '17 at 11:13
  • Wouldnt setting the world to peaceful mode effectively kill all mobs? – Kyle Rone Oct 18 '17 at 13:50
  • Yes, but maybe he doesn't want to remove all other hostile mobs. I'll put it in my answer anyway. – Fabian Röling Oct 18 '17 at 14:26
  • True, that would screw up any farms that the OP has. But the other mobs will eventually come back. So I guess it depends on if the OP cared if other mobs were killed. – Kyle Rone Oct 18 '17 at 14:55
4

If you don't care about keeping other hostile mobs, you can just set the world to peaceful. Otherwise:

Since you can apparently use commands, you just have to enter this command into chat:

/kill @e[type=ender_dragon]

If not all dragons are currently loaded, you have to fly around a bit and repeat the command until you got them all.

That answers your main question, but you still have the problem that your repeating command block is still constantly spawning new dragons. You could open the world on a server with command blocks disabled, use NBTEdit, MCEdit or other tools, but in your case there's an easier solution:

You can just put down another repeating command block, this one having this command in it:

/tp @e[type=ender_dragon] ~ 255 ~

That teleports all dragons away so that you can go to the summoning command block and break it. It might happen that each dragon is still there for one tick, in that case, you just go near the command block and execute this command to break it:

/fill ~-15 ~-15 ~-15 ~15 ~15 ~15 air replace repeating_command_block

Then just do

/kill @e[type=ender_dragon]

again and all dragons up in the sky should be gone. Now just break the second command block and all the mess is cleaned up.

-1

You can possibly remove the command from the command block using external tools like NBTEditor.

Here is an answer on a similar questions: https://gaming.stackexchange.com/a/212333/182734 .

Hope it helps. :)

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.