Why does kill @e[type=!minecraft:bat] kill every mob
I was tired of the sheer mass of bats I had in my intentionally dimly lit tunnel, so I typed in that command. Then I died. Then I saw that all my pets and animals were also gone. I'm playing in 1.14.2, is there a bug I do not know of or am I doing it wrong?
Solution 1:
Your selector, @e[type=!minecraft:bat]
includes a !
, which inverts the selection. In this case, the kill command killed every entity that was not a bat, when you really wanted @e[type=minecraft:bat]
. Unfortunately, unless you have a backup, there's no real way to recover from this as far as I know.