In Control!

In Control!

82M Downloads

is there a way to limit total mob spawns?

Closed this issue · 7 comments

commented

I'm making a mod pack and mobs tend to build up when i stay in one place for too long, is there a way to make it so there can only be a total of 20 mobs around the player? I can't seem to find anything on the wiki for this.

commented

nvm i figured it out🙏

commented

wait nvm i didn't

commented

Show me what you tried. Also the discord is a better place to get help for this

commented

this is what i tried:
[
{
"mob": "minecraft:chicken",
"result": "allow"
},
{
"result": "deny"
},
{
"maxcount": 20,
"result": "deny"
}
]
i also tried putting the "maxcount" to "mincount"

commented

Ok, let's break this down. Rules are executed from top to bottom. First rule that matches is executed, the rest is ignored. Let's say a mob spawns. It will scan these three rules one by one:

  • Rule 1: is it a chicken? If yes it will spawn (regardless of the count). Otherwise on to the next rule
  • Rule 2: deny the mob. No more rules will get executed since this one will always work. It has no conditions
  • Rule 3: not really important since this rule will never get executed but note that you need 'mincount' in combination with deny

So think about this a bit more. Consider that order is important

commented

where can i find the link to the discord?