I want to be able to play survival mode on 1.8.0(with mods) without hostile mobs spawning but with hunger going down. Basically, I want the mobs to act like peaceful mode, but everything else to act like normal mode.
Đang xem: How to turn off natural mob spawning in minecraft


Found on the wiki:
doMobSpawning — Whether mobs should naturally spawn
=> /gamerule doMobSpawning false
There is no command to disable spawning of a specific mob, nor all hostiles one; you might achieve your result with some server configuration.
Minecraft peaceful mode: spawn hostile mobs, give them creative mode AI
The answer to this question might be useful to you though.

It”s not strictly ideal, but you could have a group of repeating commandblocks (1 for each mob to block) either setting the mob”s AI to false (so they won”t move/attack), or straight up killing them. If you didn”t want the drops, you could tp them to some negative y-value such that they despawn before they die.
For example, stopping all Creepers from moving and attacking:
/entitydata

I found a way to do something similar. It won”t stop mobs from spawning but the second they spawn they will die.
Read more: Tricks Of The Trade Wow – How Does Tricks Of The Trade Work
You first give yourself a command block. Then, type this command:
/kill
e
Set the command block to repeat and always active.
You can type any mob name in place of the word zombie but you have to individually put in a command block for each mob.

Thanks for contributing an answer to Arqade!
Please be sure to answer the question. Provide details and share your research!
But avoid …
Asking for help, clarification, or responding to other answers.Making statements based on opinion; back them up with references or personal experience.
Read more: how do you change your loot specialization in wow
To learn more, see our tips on writing great answers.
Post Your Answer Discard
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 minecraft-java-edition minecraft-commands or ask your own question.
site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev2021.3.25.38904