13

I want to make a Hunger Games LAN world, but I keep getting killed by mobs. I want hunger to diminish, but to prevent monsters from spawning. Is there a command for that? If there is, what is it?

6
  • 1
    Welcome to the ArQAde. Your question is difficult to understand, could you please edit in some details and grammar? Do you mean you want a monster free world (as in creative mode) but still be hungry (as in survival mode)?
    – Zommuter
    Apr 28, 2013 at 14:24
  • 1
    @Zommuter Player being in Creative mode has no impact on world, monsters still do spawn. You probably meant Peaceful difficulty.
    – Orc JMR
    Apr 28, 2013 at 15:43
  • @OrcJMR I was thinking about the godmode-ish behaviour of creative, but you're right, peaceful describes it better
    – Zommuter
    Apr 28, 2013 at 15:44
  • 5
    I dont feel this should be closed.
    – Ender
    Apr 28, 2013 at 16:00
  • 1
    @Ender It probably won't be since the edit. It wasn't even closeable before though, just badly written—some people must still be abusing close-votes as super-downvotes. Apr 28, 2013 at 16:23

1 Answer 1

21

If you have cheats enabled, you can do the following:

  1. Make sure the difficulty is set to Easy or higher.
  2. Type in the command: /gamerule doMobSpawning false. (This is case sensitive!)

Now monsters will no longer spawn, but you will still get hungry. This works because, when you set doMobSpawning to false it prevents monsters from ever spawning, and when you set the difficulty to anything other than Peaceful you get hungry.

Monsters will still spawn using Spawn Eggs or from Mob Spawners (including those naturally generated in dungeons), but they will not naturally spawn.

Source: Minecraft Wiki

4
  • why dose it say no such gamerule noMobspawn?
    – user51637
    Jul 10, 2013 at 19:56
  • 2
    @aba It's doMobSpawning with a 'd'.
    – badp
    Jul 10, 2013 at 20:09
  • 1
    It's also case sensitive. Jul 11, 2013 at 2:10
  • Wouldn't this prevent spawning of peaceful creatures as well? Dec 30, 2020 at 17:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .