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?
I ran the
First off: Don't panic - it's probably not as bad as you think it is.
/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:
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
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:
This results in a console error:
No entity was found - another confirmation that entities in unloaded chunks cannot be killed using the