Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Arqade is a question and answer site for passionate videogamers on all platforms. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
2 months ago
I was working on a large Minecraft survival map. To achieve the perfect setting, I wanted to make it impossible for hostile mobs to spawn but still allow players to become hungry and have non-hostile mobs spawn.
I was wondering if there was a way to make players hungry in peaceful mode or simply prevent hostile mobs from spawning using commands.
2,201 2 2 gold badges 12 12 silver badges 37 37 bronze badges
/gamerule doMobSpawning false
/gamerule doInsomnia false
/gamerule doPatrolSpawning false
/gamerule doWardenSpawning false
/gamerule doTraderSpawning false
If you want random wandering traders to still spawn don't run the one above
And that should be it.
log in to answer this question.
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only