Updated:

Entity cramming threshold game rule (max_entity_cramming)

The "Entity cramming threshold" rule is called max_entity_cramming in Java 1.21.11 and later, and maxEntityCramming in 1.21.10 and earlier. Sets how many entities can be packed into one spot before they take suffocation damage. 0 turns it off.

Basic data

NameEntity cramming threshold
Rule name (Java 1.21.11+)max_entity_cramming
Old name (Java 1.21.10 and earlier)maxEntityCramming
Bedrock nameNo rule with the same name
Value typeInteger
Default24

Commands you can copy

Set to 0

/gamerule max_entity_cramming 0

Reset to the default (24)

/gamerule max_entity_cramming 24

Check the current value

/gamerule max_entity_cramming

Java 1.21.10 and earlier

/gamerule maxEntityCramming 0

Notes

Questions

Typing maxEntityCramming gives an error

In Java 1.21.11 and later the rule is called max_entity_cramming. Write /gamerule max_entity_cramming … instead. Worlds on 1.21.10 and earlier keep the old name.

How do I check the current value?

Run /gamerule max_entity_cramming without a value. The current value is shown in chat.

Other game rules