In Control!

In Control!

72M Downloads

How actually mob counter works?

Closed this issue ยท 7 comments

commented

Maybe I don't undestand something, but it looks like mob counter doesn't work, or works not for all mobs.
I try to limit spawn of "minecraft:squid":

	{
		"dimension": 0,
		"biometype": ["BEACH","WATER"],
		"mob": "minecraft:squid",
		"result": "allow"
	},
	{
		"mob": "minecraft:squid",
		"mincount": {
		  "amount": 3,
		  "mod": "minecraft",
		  "perplayer": true
		},
		"result": "deny"
	},
	{
		"mob": "minecraft:squid",
		"mincount": {
		  "amount": 1,
		  "mod": "minecraft",
		  "perpchunk": true
		},
		"result": "deny"
	},
	{
		"mob": "minecraft:squid",
		"result": "deny"
	}

But, the squids still spawning in large amount around me.

If I try to remove minecraft squids spawn (remove: minecraft:squid) and then add my potetntial spawn rule:

	{
		"dimension": 0,
		"biometype": ["BEACH","WATER"],
		"mobs": [
			{
				"mob": "minecraft:squid",
				"weight": 15,
				"groupcountmin": 1,
				"groupcountmax": 5
			}
		]
	}

Result: squids starts unstopable spawn until the game freezes.

Versions:
InControl: 3.9.12
Forge: 14.23.5.2838

commented

Rules are evaluated from top to bottom and if a rule succeeds the rest is not evaluated. So your first squid rule will make squids spawn forever

commented

Hmm. Thus, deny rules must stay before allowing. Ok, I'll make a change now.

commented

Ok. I've changed the order. It looks like:

	{
		"mob": "minecraft:squid",
		"mincount": {
		  "amount": 5,
		  "perpchunk": true
		},
		"result": "deny"
	},
	{
		"mob": "minecraft:squid",
		"mincount": {
		  "amount": 10,
		  "perplayer": true
		},
		"result": "deny"
	},
	{
		"dimension": 0,
		"biometype": ["BEACH","WATER"],
		"mob": "minecraft:squid",
		"result": "allow"
	},
	{
		"mob": "minecraft:squid",
		"result": "deny"
	}

And now no one squid spawns. :/
Same with additional spawn or not.

Variant:

	{
		"dimension": 0,
		"biometype": ["BEACH","WATER"],
		"mob": "minecraft:squid",
		"maxcount": {
		  "amount": 10,
		  "perplayer": true
		},
		"result": "allow"
	},
	{
		"mob": "minecraft:squid",
		"result": "deny"
	}

Doesn't work too. No one squid spawns.

commented

Perpchunk doesn't exist. Check your syntax

commented

Ouch. Yes, it's typo, sorry. I've corrected it, but squids still not spawns. :(

commented

Here's my full files with spawn rules:
https://gist.github.com/Bulldog83/90913b414f09b5c46c1d2aa1c565e951

It works perfect for all mobs except Squids and Androids from Matter Overdrive.

commented

After last update all works fine. Thanks!