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.


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.

| improve this answer | |
  • I am not looking for a generic command - I still want animals that are not normally hostile(sheep cows pigs ocelots etc). I would like to know if there is a command for each mob so I can choose which ones can and can't spawn. – Skye Apr 5 '17 at 8:35
  • Okay, I get you – your question was a bit unclear ;) – Ealhad Apr 5 '17 at 8:48
  • I don't think this is feasible with just commands then. – Ealhad Apr 5 '17 at 8:52

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 @e[type=Creeper] {NoAI:1}

Also, "killing" all zombies:

/tp @e[type=Zombie] ~ -500 ~
| improve this answer | |
  • This wouldn't work on 1.8 though, would it? – Skye Jul 1 '17 at 10:14
  • @Skye I believe it would.There were some bugs in 1.8 with it if I remember (like NoAI also affecting gravity), but I'm sure if that doesn't also work you could apply a low (0) follow range to them. See the link in Ealhad's answer for help with that. – Oliver Jul 6 '17 at 9:48

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.