About gamerule maxentityCramming

There are 25 minecart and more than 25 witches
But the witch will not be hurt
I want to know why and how do you change it

I use spongeforge-1.11.2-2393-6.1.0-BETA-2458
Nucleus-1.0.1-LTS-1.11.2-1.12-S6.0-plugin
LuckPerms-Sponge-3.2.60

/gamerule maxEntityCramming 24 is standard and should do the job. Did you tried it with other mobs?

The maximum number of other pushable entities a mob or player can push, before taking 3 (Heart.svgHalf Heart.svg) suffocation damage per half-second. Setting to 0 disables the rule. Damage affects survival-mode or adventure-mode players, and all mobs but bats. Pushable entities include non-spectator-mode players, any mob except bats, as well as boats and minecarts.

Before max entity cramming exists we had a optimization in place to prevent these ‘mob singularity’ from causing lag.

Setting max-entities-within-aabb in the config to 0 ( /sponge config max-entities-within-aabb 0) will disable this optimization and return the Mojang default of suffocating them.

I’m not sure if it should be considered a bug or not as it could be argued that it’s working as designed, even if it has a difference of vanilla mechanics by default.

2 Likes

Best would be to write that info somewhere down or change the description of the entry in the documentation to also find it via “maxEntityCramming”

https://docs.spongepowered.org/stable/en/server/getting-started/configuration/sponge-conf.html?highlight=max%20entities%20within%20aabb

1 Like

Thanks for your answer.You’re great

1 Like

Thanks for the suggestion, I’ve taken it on board and created a pull request on your behalf.

2 Likes

On our server I’ve set the max-entities-within-aabb in the config to 0 (/sponge config max-entities-within-aabb 0) to 0 and set Minecraft’s maxEntityCramming to 24 but there is no effect, unlimited entities can still be put into a single 1x1 space. Is there any other fix for this issue? Running Forge 14.23.1.2555 and current latest version of Sponge. Any help much appreciated, thanks.

This may be a bug, try setting it to something rediculously high like 999 instead?

Tried it, still no effect. If it’s a bug, should I report it somewhere other than here?

I’ve tested this with Faithcaio dev setup (1.12.2-2555-7.1.0-BETA-2834), so unless it’s a production vs development thing, setting the maxEntityCramming gamerule to 9 worked for me.

If you have modified the config version, rather then changing the gamerule, I assume you have tried restarting, as well as ensuring that you either modified global config, or enabled any per world configs that you edited it in (if applicable)

Really very useful info

Seems max-entities-within-aabb not working correctly with the latest version…

My server contains:

  • forge-1.12.2-14.23.5.2847-universal.jar
  • spongeforge-1.12.2-2838-7.2.0.jar

The default value of max-entities-within-aabb is 8, but when I put more than 8 cows into a 1x1 space and they won’t die, and when I disable this config by setting the value to 0 and use /gamerule maxEntityCramming 8 also not working. Any idea?

I fixed a bug with that a few weeks ago. Unfortunately, since the downloads server is currently broken, the builds including that fix aren’t available right now. Once the downloads are working again, it’ll be in the latest builds.

A build with those fixes is available - you can use the “latest (for testing)” builds from the announcement thread.

1 Like

I used this link (SpongeForge) and I still can’t get entities to cram…minecraft gamerule was set at default 24…Sponge was at 8…nothing…set both to 9…still nothing.

Just to double-check - which version did you use?

The sponge forge one in dual’s reply just above.