0

I ran the /kill @e command expecting that it would kill all hostile mobs, but it actually killed all entities, not just the hostile ones! I'm afraid that I might have accidentally killed all villagers (and they probably don't spawn anymore). Also I am not sure if the Ender Dragon has despawned and it would totally suck if it did. I do have a backup of the world from a long time ago, and I could restore it if it came down to it, but we have made a lot of progress on the world and I don't want to lose it all. How can I fix my mistake?

1
  • The short answer is: There is no "undo" command in Minecraft, even though it would be useful often. Commented Aug 10, 2019 at 21:42

1 Answer 1

3

First off: Don't panic - it's probably not as bad as you think it is.

The /kill command only kills entities in loaded chunks, so your villagers are safe if the chunks that the village is in were not loaded when you ran the command. Similarly for the Ender Dragon, if nobody was in The End when you ran the command, it'll still be alive.

Secondly: Let this be a lesson learned - don't forget to make regular backups of your world!


I verified this by spinning up a brand new 1.14.4 world, finding a village (to make sure it had living villagers in it in the first place) and then moving far enough away to unload the village chunks, then running the following:

/kill @e[type=!minecraft:player]

I then moved back to the village and could see the villagers still wandering around and very much alive.

If your village was loaded at the time, then you will have killed all of the villagers there, but that's not the end of the world. You have several options open to you for repopulation. The easiest thing to do would be to give yourself some villager spawn eggs via the /give command (or pulling them from the creative mode inventory):

After version 1.13 the syntax would be:

/give @p minecraft:villager_spawn_egg COUNT

Where COUNT is the number of eggs to give yourself. You can then simply spawn a new batch of villagers with them.

Alternatively you could purify some Zombie Villagers and repopulate that way, or you could move some villagers from another village using minecarts.


For further peace-of-mind, I also ran the following from the Overworld:

/kill @e[type=minecraft:ender_dragon]

This results in a console error: No entity was found - another confirmation that entities in unloaded chunks cannot be killed using the /kill command.

1
  • 1
    Ty. You have answered all of my questions! There's nothing to worry about anymore
    – EdwardTW
    Commented Aug 10, 2019 at 21:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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