max_entity_cramming
integerJava 26.2 onlyControls 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 024Default24 entities in the same space before extras start taking damage.
Java
/gamerule max_entity_cramming 248StrictTighter limit — useful for preventing lag from mob farms.
Java
/gamerule max_entity_cramming 8Default: 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.