2

How do you disable mob spawning in Java?

_Versa_ 2/23/19 10:00 pm
28k
3/1/2019 2:34 am
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_
Level 3 : Apprentice Explorer
3

  Have something to say?

JoinSign in

10

HoboMaggot
02/25/2019 3:08 am
Level 55 : Grandmaster Blob
history
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
_Versa_
02/28/2019 8:51 pm
Level 3 : Apprentice Explorer
I cant find a command block in Java. Im in 1.13.2
1
HoboMaggot
03/01/2019 2:34 am
Level 55 : Grandmaster Blob
/give @p command_block
1
Captain_JEK
02/23/2019 10:12 pm
He/Him • Level 90 : Overlord Deity
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.
3
_Versa_
02/23/2019 10:56 pm
Level 3 : Apprentice Explorer
Thanks!!!! :D
1
Captain_JEK
02/24/2019 11:45 am
He/Him • Level 90 : Overlord Deity
You're welcome ^^
1
TheCyanShyGuy
02/25/2019 8:30 am
Level 33 : Artisan Explorer
wow i didnt know you were on the forums xD nor did i know you did commands
1
Captain_JEK
02/25/2019 9:09 am
He/Him • Level 90 : Overlord Deity
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...
2
TheCyanShyGuy
02/25/2019 9:17 am
Level 33 : Artisan Explorer
i hear you! maybe we should work on commands together xD
maybe you can make a rumbling noise for your vehicles lol
1
Geeri
02/24/2019 8:51 am
Level 9 : Apprentice Blacksmith
history
/gamerule doMobSpawning false
Edit: Wow you got it already, don't mind me
1

Welcome