Carpet

Carpet

2M Downloads

[Feature Request] Neutral Mob Cap Increase / Per Type Mob Cap Adjustment

SulpherStaer opened this issue ยท 3 comments

commented

At the moment, the mob cap can be increased as a whole.

My players are having issues finding enough neutral mobs. I want to up only the neutral mobcap.

If this is already possible, how? The documentation does not tell me.

commented

Neutral mobs cannot be upped as a whole, cos some of them count as hostile, some as passive and others as misc (golems). This means that yo up the neutral mobcap you would need to up all mobcaps.

And you can't only up one mobcap at a time, you gotta up them all. Why, I don't exactly know tho.

commented

And you can't only up one mobcap at a time, you gotta up them all. Why, I don't exactly know tho.

According to the source code, changing the mob caps using the /spawn mobcaps set command internally changes a multiplier (actually an exponent), which is applied to all mob caps at all times.

The mob cap exponent is set here...

SpawnReporter.mobcap_exponent = 4.0*Math.log(desired_ratio)/Math.log(2.0);

...and used here:
int newCap = (int) ((double)entityCategory.getCapacity()*(Math.pow(2.0,(SpawnReporter.mobcap_exponent/4))));

commented

Well, there you go.