Skip to content
[/craft]

max_entity_cramming

integerJava 26.2 only

Controls how many entities can occupy the same block before entities above the limit start taking suffocation damage. Set to 0 to disable cramming damage entirely.

Common values

0DisabledNo entity cramming damage — unlimited entities can stack in one block.
Java/gamerule max_entity_cramming 0
24Default24 entities in the same space before extras start taking damage.
Java/gamerule max_entity_cramming 24
8StrictTighter limit — useful for preventing lag from mob farms.
Java/gamerule max_entity_cramming 8

Default: 24. Restore with /gamerule max_entity_cramming 24

What max_entity_cramming does

Controls how many entities can occupy the same block before entities above the limit start taking suffocation damage. Set to 0 to disable cramming damage entirely.

max_entity_cramming is a Java Edition-only gamerule and is not available in Bedrock.

Frequently asked questions

Is max_entity_cramming in Bedrock?
No — Java Edition only. Old name was maxEntityCramming.
Does this affect players?
Yes — players also take cramming damage if inside a pile of entities above the limit.

Related gamerules

All Gamerule commandsJava vs Bedrock guide