Skip to content

50% - 100% increase to some mob caps.#789

Merged
void2012 merged 2 commits intosmartcmd:mainfrom
mutherbored:main
Mar 7, 2026
Merged

50% - 100% increase to some mob caps.#789
void2012 merged 2 commits intosmartcmd:mainfrom
mutherbored:main

Conversation

@eh-K
Copy link
Contributor

@eh-K eh-K commented Mar 7, 2026

Description

This PR slightly increases the natural spawn cap on mob spawns.

Changes

  • Monsters from 50 to 70
  • Animals from 50 to 70
  • Chickens from 8 to 16
  • Wolves from 8 to 16
  • Mooshrooms from 2 to 8
  • Squid from 5 to 10
  • Villagers + Breeding from 35 to 50

Previous Behavior

Mob Spawning was kinda limited so some mobs were kinda hard to find when they shouldn't be necessarily.

Root Cause

MobCategory.h set the hard limits.

New Behavior

Now the natural limit can be increased due to newer hardware and having access to.

Fix Implementation

Increased the hard limits that are established in MobCategory.h

AI Use Disclosure

No AI.

Related Issues

@Alexandra-Myers
Copy link

This is just my thoughts as more or less an outsider to the project, but shouldn't this be specifically for Windows? It would be nice to still be able to target the original systems this ran on with the original mob caps, but on Windows have it be higher, no?

@eh-K
Copy link
Contributor Author

eh-K commented Mar 7, 2026

This is just my thoughts as more or less an outsider to the project, but shouldn't this be specifically for Windows? It would be nice to still be able to target the original systems this ran on with the original mob caps, but on Windows have it be higher, no?

This source code contains a PC port that never released and that’s what we are playing right now with this.

Noticed that the player cap was set from 8 to 255 so I figured this could be help.

I think a slight increase is good enough to make it a bit more frequent.

@Alexandra-Myers
Copy link

Alexandra-Myers commented Mar 7, 2026

Well yes but my overall point was that I simply felt that it would be nicer since while this is mainly a PC port it feels as if it would be odd to not have a condition (when it's not inherently limiting possibilities for improvements). I am not against this though (but can't we remove the mob cap entirely, as it wasn't on Java at this point, right?)

@eh-K
Copy link
Contributor Author

eh-K commented Mar 7, 2026

Well yes but my overall point was that I simply felt that it would be nicer since while this is mainly a PC port it feels as if it would be odd to not have a condition (when it's not inherently limiting possibilities for improvements). I am not against this though (but can't we remove the mob cap entirely, as it wasn't on Java at this point, right?)

Tough to say. Lot of people prefer the mob limit but I think it’s too small and restrictive.

@MotoLegacy
Copy link

Inserting my opinion no one asked for, but it would be nice if this was a setting in the world creation menu instead of just raising the internal cap and being done with it. :)

@Alexandra-Myers
Copy link

Yes, I agree too, it would make sense if it could be defined for the world itself. Perhaps could be removed by setting it to 0 for each category respectively? Would require more code though.

@Alexandra-Myers
Copy link

In UI 0 should show up as None if possible though...

@MotoLegacy
Copy link

Yes, I agree too, it would make sense if it could be defined for the world itself. Perhaps could be removed by setting it to 0 for each category respectively? Would require more code though.

You probably still want one internally (cough cough, mob accumulation in caves). But just a checkmark in world settings akin to options like bonus chests to say "Extended Mob Spawning Limits" would be awesomesauce

@eh-K
Copy link
Contributor Author

eh-K commented Mar 7, 2026

Inserting my opinion no one asked for, but it would be nice if this was a setting in the world creation menu instead of just raising the internal cap and being done with it. :)

The guy who created the render distance slider could def do that 😂

There’s probably a way to make it set, maybe a check can be run upon loading for what the world size is and set the mob caps

@Alexandra-Myers
Copy link

Alexandra-Myers commented Mar 7, 2026

Yes, I agree too, it would make sense if it could be defined for the world itself. Perhaps could be removed by setting it to 0 for each category respectively? Would require more code though.

You probably still want one internally (cough cough, mob accumulation in caves). But just a checkmark in world settings akin to options like bonus chests to say "Extended Mob Spawning Limits" would be awesomesauce

Java doesn't have one though, was my point, there is caps for how many of an entity can spawn in MobCategory.java, but that is how much can be in one chunk, whereas this cap is global for the entire world.

@Alexandra-Myers
Copy link

LCE already has the max per chunk, so removing the global cap was what I meant, there would still be the Java restrictions there

@void2012
Copy link
Collaborator

void2012 commented Mar 7, 2026

We should stick to maximum PC edition behavior and compatibility as possible. I will merge this PR soon.

There is a divergence label for this.

@Longobardi-Eduardo
Copy link

Longobardi-Eduardo commented Mar 7, 2026

I would mantain the behaviour as much close as possible to the original. And then let the player change if he wants to. So people can have the original or a "custom" expirience by their choice.

@void2012
Copy link
Collaborator

void2012 commented Mar 7, 2026

@eh-K do these numbers align with Java Edition 1.6-1.7? If so, I merge this.

Look up on wiki please.

@Longobardi-Eduardo
Copy link

Longobardi-Eduardo commented Mar 7, 2026

Hostile Mob Cap (Constant - 70)
Passive Mob Cap (Constant - 10)
Ambient Mob Cap (Constant - 15)
Water Creature Mob Cap (Constant - 5)
Water Ambient Mob Cap (Constant - 20)

Source:
https://techmcdocs.github.io/pages/GameMechanics/MobCap/

But in java it only counts for spawing rate on loaded chunks. It has not a hard limit.

@Alexandra-Myers
Copy link

Before this is merged, I would like to note that it was odd to lower it for PC parity. As I had mentioned, the PC numbers are per chunk, whereas this cap is the maximum that can exist per level. Thus, the only analogue would be removing the hard cap.

@void2012
Copy link
Collaborator

void2012 commented Mar 7, 2026

Now this is 100% accurate? We're merging?

@eh-K
Copy link
Contributor Author

eh-K commented Mar 7, 2026

Before this is merged, I would like to note that it was odd to lower it for PC parity. As I had mentioned, the PC numbers are per chunk, whereas this cap is the maximum that can exist per level. Thus, the only analogue would be removing the hard cap.

I think that can be revisited once more eyes get familiar with this repo. Unlimited seems too much for most players but later, a toggle could be added or something.

This slight increase is just enough that it’s not annoying.

@Longobardi-Eduardo
Copy link

Longobardi-Eduardo commented Mar 7, 2026

Before this is merged, I would like to note that it was odd to lower it for PC parity. As I had mentioned, the PC numbers are per chunk, whereas this cap is the maximum that can exist per level. Thus, the only analogue would be removing the hard cap.

I think that can be revisited once more eyes get familiar with this repo. Unlimited seems too much for most players but later, a toggle could be added or something.

This slight increase is just enough that it’s not annoying.

Add a comment with the original number, and i think we are ok for now. But in the future is better that it's added an option for that.

Edit: i didn't saw it was already there.

@eh-K
Copy link
Contributor Author

eh-K commented Mar 7, 2026

Before this is merged, I would like to note that it was odd to lower it for PC parity. As I had mentioned, the PC numbers are per chunk, whereas this cap is the maximum that can exist per level. Thus, the only analogue would be removing the hard cap.

I think that can be revisited once more eyes get familiar with this repo. Unlimited seems too much for most players but later, a toggle could be added or something.
This slight increase is just enough that it’s not annoying.

Add a comment with the original number, and i think we are ok for now. But in the future is better that it's added an option for that.

I done that next to the caps ❤️

@eh-K
Copy link
Contributor Author

eh-K commented Mar 7, 2026

Should be good to merge @void2012

@void2012 void2012 merged commit b3ff7f5 into smartcmd:main Mar 7, 2026
codeHusky added a commit that referenced this pull request Mar 7, 2026
It's unclear if this change maintains mob density parity so it has been
reverted. This can be committed back in if parity is properly verified
@codeHusky
Copy link
Collaborator

This change has been reverted for now. We need to determine if increasing these mob caps affect mob density at all before this can be incorporated again. @eh-K Please make a new PR once you've tested for this

@eh-K
Copy link
Contributor Author

eh-K commented Mar 7, 2026

I ran two instances of before and after of this change sitting afk in a plains biome for a few two in-game days.

I think the density could increase if a player is around the same area for a period of time.
Screenshot 2026-03-07 134037
Screenshot 2026-03-07 133634

Not the best example but I could see the density becoming large over time.

While waiting, I did find this comment/snippet in MobSpawner.cpp from 4J.
There appears to be no chunk limit at all in LCE. Only world limit.
Screenshot 2026-03-07 133819

Maybe leaving the default values is the best choice because that slight increase could be noticed overtime.

Instead, maybe increasing the spawn egg limits would be better but this is completely subjective to player choice.
image

@codeHusky

@codeHusky
Copy link
Collaborator

It would make sense to revamp the code to have some chunk based entity spawn limiting then for long term since we allow many more chunks to be loaded than LCE ever intended.

tm5k pushed a commit to tm5k/RickCraft that referenced this pull request Mar 7, 2026
* 50% increase to most mob caps, doubling some.

* Changed from 75 to 70 to match PC parity. Ambient is back to 20
tm5k pushed a commit to tm5k/RickCraft that referenced this pull request Mar 7, 2026
It's unclear if this change maintains mob density parity so it has been
reverted. This can be committed back in if parity is properly verified
@Alexandra-Myers
Copy link

Alexandra-Myers commented Mar 8, 2026

I decided to do my own PR for this, that does a few things alongside keeping LCE behavior default. I believe that LCE is different to Java though and Java's impl is already using a magic number that came out of nowhere as its control over the mob cap...

@Alexandra-Myers
Copy link

Java's impl most likely would require a lot of vibes-based approximations to make it match LCE considering the fact that it is literally using a magic number to adjust the mob cap

tm5k pushed a commit to tm5k/RickCraft that referenced this pull request Mar 8, 2026
* 50% increase to most mob caps, doubling some.

* Changed from 75 to 70 to match PC parity. Ambient is back to 20
tm5k pushed a commit to tm5k/RickCraft that referenced this pull request Mar 8, 2026
It's unclear if this change maintains mob density parity so it has been
reverted. This can be committed back in if parity is properly verified
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants