2

How do you disable mob spawning in Java?

_Versa_'s Avatar _Versa_2/23/19 10:00 pm
2 emeralds 26.9k 10
3/1/2019 2:34 am
HoboMaggot's Avatar HoboMaggot
I am creating a world in single player, and the animals and bats are driving me nuts!! How do I get ride of them! Help me!



I also need help on how to turn off the day-light cycle.
Posted by _Versa_'s Avatar
_Versa_
Level 3 : Apprentice Explorer
3

Create an account or sign in to comment.

10

1
02/25/2019 3:08 amhistory
Level 52 : Grandmaster Blob
HoboMaggot
HoboMaggot's Avatar
For future reference if you want only certain mobs to spawn (zombies for example), you can set up a repeating command block and copy the command (Assuming you are in 1.13)

/kill @e[type=!entity]
This will kill everything except that entity (be sure to put minecraft:player there otherwise you'll make a kill loop for players)

If you dont want to kill more than 1 entity
/kill @e[type=!entity,type=!entity,etc]
1
02/28/2019 8:51 pm
Level 3 : Apprentice Explorer
_Versa_
_Versa_'s Avatar
I cant find a command block in Java. Im in 1.13.2
1
03/01/2019 2:34 am
Level 52 : Grandmaster Blob
HoboMaggot
HoboMaggot's Avatar
/give @p command_block
1
02/24/2019 8:51 amhistory
Level 9 : Apprentice Blacksmith
Geeri
Geeri's Avatar
/gamerule doMobSpawning false
Edit: Wow you got it already, don't mind me
3
02/23/2019 10:12 pm
Level 87 : Elite Deity
Captain_JEK
Captain_JEK's Avatar
For disabling the mob spawning use the command
  /gamerule doMobSpawning false

and for stopping the sun use
  /gamerule doDaylightCycle false

Cheats have to be enabled in your world to use these commands.
1
02/23/2019 10:56 pm
Level 3 : Apprentice Explorer
_Versa_
_Versa_'s Avatar
Thanks!!!! :D
1
02/24/2019 11:45 am
Level 87 : Elite Deity
Captain_JEK
Captain_JEK's Avatar
You're welcome ^^
1
02/25/2019 8:30 am
Level 32 : Artisan Explorer
TheCyanShyGuy
TheCyanShyGuy's Avatar
wow i didnt know you were on the forums xD nor did i know you did commands
2
02/25/2019 9:09 am
Level 87 : Elite Deity
Captain_JEK
Captain_JEK's Avatar
I totally do commands xD They are very helpful for many things. But sometimes I found it difficult myself to find the right commands for something I needed on the internet because so few people care about them or so.
So, I am glad to help with commands as much as you need, cause I know the struggle of searching for the right one xD
Especially the syntax made me go crazy sometimes...
1
02/25/2019 9:17 am
Level 32 : Artisan Explorer
TheCyanShyGuy
TheCyanShyGuy's Avatar
i hear you! maybe we should work on commands together xD
maybe you can make a rumbling noise for your vehicles lol
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome