Disable Entity Cramming
Stop mobs from suffocating when crowded
✅ Verified for Java 26.2 · Bedrock 26.32 — checked June 2026Sets the entity-cramming limit to 0, which disables cramming damage entirely — mobs and players packed into one block no longer suffocate. Essential for dense mob farms and animal pens where the default limit of 24 quietly kills your stock.
/gamerule maxEntityCramming 029 characters
- Java: yes
- Bedrock: no
- Command block: yes
- Needs cheats / OP: yes
How to use
- Open chat (T on Java, / on Bedrock).
- Paste the command and press Enter.
- Crowded mobs stop taking cramming damage.
- Set it back to 24 to restore vanilla behaviour.
Related commands
Keep your items when you die instead of dropping them
/gamerule keepInventory trueStop creepers, endermen, and other mobs from changing blocks
/gamerule mobGriefing false