Configuration
AstralStacker loads a single file, config.yml, mapped to the GlobalConfiguration record. /astralstacker reload reloads it and refreshes EntityStackService's cached max-merge-distance.
config.yml
Field | Type | Description |
|---|
enabled-groups
| Set<String>
| Server groups (AstralPaperAPI.serverInformation().group()) where the plugin is active. On any other group, onEnable returns before registering services, listeners, or commands (unless the server is in the DEVELOPMENT environment, which forces activation). |
stack-distance
| double | Max distance, in blocks, at which two eligible mobs or items are merged into (or across into) the same stack. Used both as a straight-line search radius (getNearbyEntitiesByType) and, squared, as the distance check between a stack's stored location and a candidate. |
normal-restart-hour
| int | Hour of day (0–23, Europe/Paris) the server normally restarts. Used at boot to classify the startup as normal vs. abnormal — see Startup classification. |
max-stack-size
| int | Default cap on an entity stack's amount, used for any EntityType with no custom-stack-size override. |
custom-stack-size
| Map<String, Integer>
| Per-EntityType cap overrides, keyed by entity type name (case-insensitive — normalized to upper case on load, so "zombie" and "Zombie" both match EntityType.ZOMBIE). |
entity-stack-ttl
| Duration
| How long a chunk may stay unloaded before entity stacks tagged with the plugin's session marker are purged instead of reloaded on the next chunk load. See Chunk persistence & TTL. |
max-item-stack-size
| int | Cap on an item stack's amount, applied uniformly to all item types (no per-material override). |
enabled-groups:
- "resource"
- "build"
stack-distance: 5.0
max-stack-size: 64
max-item-stack-size: 8192
normal-restart-hour: 7
entity-stack-ttl: 10m
custom-stack-size:
"Zombie": 5
With the shipped default above, a resource/build-group server merges spawner-sourced mobs within 5 blocks up to 64 per stack (only 5 for zombies), merges dropped items within 5 blocks up to 8192 per stack, and treats any boot within 30 minutes of 07:00 Europe/Paris as a scheduled restart.
See also
Overview — services and persistence model that consume these values.
Mechanics — how stack-distance, the size caps, and entity-stack-ttl are applied.
Commands — /astralstacker reload.
Last modified: 25 July 2026