Avoid mobs from spawning automatically

I made a swimming pool in Minecraft and squids are spawned automatically in the water

I tried to set difficulty to Peaceful but it not working

Any solution?

1

1 Answer

Turn off the doMobSpawning gamerule to prevent mobs spawning naturally:

/gamerule doMobSpawning false

You will need to have cheats enabled to run the above command. If you have not, you can temporarily enable them by the following:

  1. Open the menu while on the world (ESC)
  2. Press Open to LAN
  3. Switch Allow Cheats to ON, then press Start LAN World
1

You Might Also Like