Servercore
Servercore
What is it?
Servercore is a server-side optimization mod for modded servers. It provides a few key features:
- Dynamic view distance, simulation distance, chunk tick distance, and mob cap percentage based on MSPT (milliseconds per tick; lower is better) performance, with a configurable threshold in
config.yml. - Entity activation range, which lets you set a radius around players where entities are active.
- Mobcap limits, which let you set hard limits on entity counts by type and adjust spawn intervals in the config.
- Villager lobotomization, which reduces villager AI activity in large trading halls, or when villagers are stuck in a 1x1 space.
- And more!
How to install ServerCore on your server
- Modrinth page of servercore & Curseforge page of servercore
- Download the jar matching your loader (Fabric/Forge/NeoForge) and MC version.
- In the Duck Panel, open File Manager and upload the jar into the
mods/folder. - Restart the server from the panel.
- Config files generate under
config/servercore/config.ymlandconfig/servercore/optimizations.ymlwhen the server starts. Edit them directly in File Manager. This guide does not coveroptimizations.yml.
Is it useful for you?
Servers that benefit most from Servercore include:
- Large modpacks with many entities that don't need to spawn as often. Servercore helps with mobcaps and entity activation range settings.
- Servers with many players online at once, especially when they are spread out and generating chunks. Servercore helps with dynamic view distance, simulation distance, and chunk tick distance settings based on MSPT performance.
- Servers with large villager farms, trading halls, and similar builds that can cause lag. Servercore helps with villager lobotomization settings.
Compatibility check (before you touch the config)
Check compatibility with other performance mods first. ServerCore has had issues with mods like night-config-fixes and some Lithium versions, so verify the current modpack before assuming everything works together.
How to edit it
- Two files:
config/servercore/config.ymlfor general settings,optimizations.ymlfor the actual performance toggles. - In-game commands (verified against the mod's own docs):
/servercore reload- reload config without restart/servercore settings- modify dynamic settings live/servercore status- see current dynamic settings/mobcaps- per-player mobcap breakdown/statistics entities//statistics block-entities- find what's actually eating performance
Optimization levels
Review the changes and only use them if they fit your server.
This optimization guide will not be updated for every new version of ServerCore, so check the changelog for new features or changes that could affect your setup.
To use these presets, copy the contents of the code block into your config/servercore/config.yml file.
- Light Optimization
- Moderate Optimization
For servers that want to test ServerCore's features without major gameplay impact. This preset increases item and XP merge radius, prevents players from moving into unloaded chunks, and enables the default dynamic view distance, simulation distance, chunk tick distance, and mobcaps. Everything else stays at default values and can be tuned later if needed.
# The main configuration file for ServerCore.
# Most of these settings can be reloaded without restarting using /servercore reload.
# Most miscellaneous feature toggles.
features:
# Reverts enderpearl behavior to pre-1.21.2. The following will change when this setting is enabled:
# ► Enderpearls will no longer load chunks around them.
# ► Enderpearls will load / unload with chunks again instead of with their owner joining / leaving the game.
# Note: Toggling this setting may cause some old enderpearls from before the toggle to be lost.
prevent-enderpearl-chunkloading: false
# Whether the chunk-tick-distance dynamic setting should affect random ticks.
# Enabling this will stop chunks from performing random ticks when they are outside of this distance from any player.
# That includes chunks loaded by enderpearls or portals, breaking vanilla behavior.
chunk-tick-distance-affects-random-ticks: false
# Prevents lagspikes caused by players moving into unloaded chunks.
prevent-moving-into-unloaded-chunks: true # Enabled
# The amount of seconds between auto-saves when /save-on is active.
autosave-interval-seconds: 300
# The fraction that decides the chance of experience orbs being able to merge with each other. (1 = 100%, 40 = 2.5%)
# Note that just like in vanilla, experience orbs will still need to be of the same size to actually merge.
xp-merge-fraction: 10 # Decreased from 40, lower = more merging
# The radius in blocks that experience orbs will merge at.
xp-merge-radius: 5 # Increased from 0.5
# The radius in blocks that items will merge at.
item-merge-radius: 3 # Increased from 0.5
lobotomize-villagers:
# Makes villagers tick less often if they are stuck in a 1x1 space.
enabled: false
# Decides the interval in between villager ticks when lobotomized.
tick-interval: 20
# Automatically modifies dynamic settings based on the server performance.
dynamic:
# Enables dynamic performance checks.
enabled: true
# The average MSPT to target.
target-mspt: 45 # Increased from the default 35
# The default values for dynamic settings.
# If left unspecified, the maximum value will be used.
# Note: adding view / simulation distance here will override their value in server.properties.
default-values:
MOBCAP_PERCENTAGE: 100
CHUNK_TICK_DISTANCE: 10
# The settings that will be decreased when the server is overloaded, in the specified order.
# You can remove settings from the list that you don't want to be dynamically adjusted.
# ► max = The maximum value the server will increase the setting to.
# ► min = The minimum value the server will decrease the setting to.
# ► increment = The amount the setting will be increased or decreased by.
# ► interval = The amount of seconds between each check to increase or decrease.
dynamic-settings:
- setting: 'CHUNK_TICK_DISTANCE'
max: 10
min: 6
increment: 1
interval: 15
- setting: 'MOBCAP_PERCENTAGE'
max: 100
min: 50
increment: 10
interval: 15
- setting: 'SIMULATION_DISTANCE'
max: 10
min: 6
increment: 1
interval: 15
- setting: 'VIEW_DISTANCE'
max: 10
min: 5
increment: 1
interval: 150
# A special mobcap that only affects the breeding of animals and villagers.
breeding-cap:
# Enables breeding caps.
enabled: false
# The breeding cap for villagers.
# ► limit = The limit of mobs of the same type within range. Setting this to negative will disable the breeding cap.
# ► range = The range it will check for entities of the same type.
# ► unlimited-height = Whether to ignore the vertical distance when checking for entities of the same type.
villagers:
limit: 32
range: 64
unlimited-height: false
# The breeding cap for happy ghasts.
# Dried ghast blocks will wait until there is space in the breeding cap to hatch.
happy-ghasts:
limit: 32
range: 64
unlimited-height: false
# The breeding cap for animals.
# Note that this cap only checks for animals of the same type.
# If the limit is 32 you can still breed 32 cows and 32 pigs next to each other.
animals:
limit: 32
range: 64
unlimited-height: false
# Gives more control over mob spawning.
mob-spawning:
# Mobcap settings for zombie reinforcements.
# ► enforce-mobcap = Whether to enforce mobcaps for this type of mobspawning.
# ► additional-capacity = Additional capacity for this specific mobcap. Decides how much it can spawn over the regular mobcap.
# It is recommended to allow them to spawn a bit over the regular mobcap as they would otherwise never get a chance to spawn.
zombie-reinforcements:
enforce-mobcap: false
additional-capacity: 32
# Mobcap settings for zombified piglin spawning from nether portal random ticks.
nether-portal-randomticks:
enforce-mobcap: false
additional-capacity: 32
# Mobcap settings for mobs spawned from monster spawners.
monster-spawners:
enforce-mobcap: false
additional-capacity: 32
# Mobcap settings for silverfish spawned from the infested potion effect.
infested:
enforce-mobcap: false
additional-capacity: 32
# A list of mob categories with their respective mobcap and spawn interval.
# This setting lets you modify the values in vanilla's mobcap implementation.
# ► category = The mob spawning category.
# ► mobcap = The maximum amount of entities in the same category that can spawn near a player.
# ► spawn-interval = The interval between spawn attempts in ticks. Higher values will make mobs spawn much slower.
# ► despawn-distance = The distance in blocks from players where non-persistent mobs of this category will immediately despawn.
categories:
- category: 'MONSTER'
mobcap: 70
spawn-interval: 1
despawn-distance: 128
- category: 'CREATURE'
mobcap: 10
spawn-interval: 400
despawn-distance: 128
- category: 'AMBIENT'
mobcap: 15
spawn-interval: 1
despawn-distance: 128
- category: 'AXOLOTLS'
mobcap: 5
spawn-interval: 1
despawn-distance: 128
- category: 'UNDERGROUND_WATER_CREATURE'
mobcap: 5
spawn-interval: 1
despawn-distance: 128
- category: 'WATER_CREATURE'
mobcap: 5
spawn-interval: 1
despawn-distance: 128
- category: 'WATER_AMBIENT'
mobcap: 20
spawn-interval: 1
despawn-distance: 64
# Settings for commands and their formatting.
commands:
# Enables the /servercore status command.
status-enabled: true
# Enables the /mobcaps command.
mobcaps-enabled: true
colors:
# The colors used in command feedback. You can use hex codes or minecraft legacy color names.
# The primary color is the most used color in command feedback.
primary: 'dark_aqua'
# The secondary color is used for highlighting important information, like values.
secondary: 'green'
# The tertiary color is mostly used for text in titles.
tertiary: 'aqua'
# Activation range can drastically reduce the amount of lag caused by ticking entities.
# It does this by cleverly skipping certain entity ticks based on the distance to players and other factors, like immunity checks.
# Immunity checks determine whether an entity should be ticked even when it's outside the activation range, like for example when it is falling or takes damage.
# Note: while this is a very powerful feature, it can still slow down mobfarms and break very specific technical contraptions.
activation-range:
# Enables activation range.
enabled: false
# Briefly ticks entities newly added to the world for 10 seconds (includes both spawning and loading).
# This gives them a chance to properly immunize when they are spawned if they should be. Can be helpful for mobfarms.
tick-new-entities: true
# Enables vertical range checks. By default, activation ranges only work horizontally.
# This can greatly improve performance on taller worlds, but might break a few very specific ai-based mobfarms.
use-vertical-range: false
# Skips 1/4th of entity ticks whilst not immune.
# This affects entities that are within the activation range, but not immune (for example by falling or being in water).
skip-non-immune: false
# Allows villagers to tick regardless of the activation range when panicking.
villager-tick-panic: true
# The time in seconds that a villager needs to be inactive for before obtaining work immunity (if it has work tasks).
villager-work-immunity-after: 20
# The amount of ticks an inactive villager will wake up for when it has work immunity.
villager-work-immunity-for: 20
# A list of entity types that should be excluded from activation range checks.
excluded-entity-types:
- 'minecraft:ghast'
- 'minecraft:hopper_minecart'
- 'minecraft:warden'
# The activation type that will get assigned to any entity that doesn't have a custom activation type.
# ► activation-range = The range an entity is required to be in from a player to be activated.
# ► tick-interval = The interval between 'active' ticks whilst the entity is inactive. Negative values will disable these active ticks.
# ► wakeup-interval = The interval between inactive entity wakeups in seconds.
# ► extra-height-up = Allows entities to be ticked when far above the player when vertical range is in use.
# ► extra-height-down = Allows entities to be ticked when far below the player when vertical range is in use.
default-activation-type:
activation-range: 16
tick-interval: 20
wakeup-interval: -1
extra-height-up: false
extra-height-down: false
# A list of custom activation types.
# ► name = The name of the activation type.
# ► entity-matcher = A list of conditions to filter entities. Only one of these conditions needs to be met for an entity to match.
# ► If an entity matches multiple activation types, the one highest in the list will be used. The conditions accept the following formats:
# - Entity type matching | Uses the entity type's identifier. | 'minecraft:zombie' matches zombies, but for example not husks or drowned.
# - Typeof class matching | Uses the 'typeof:' prefix. | 'typeof:monster' matches all monsters.
# ► Available typeof classes: mob, monster, raider, neutral, ambient, animal, water_animal, flying_animal, villager, projectile.
custom-activation-types:
- name: 'raider'
activation-range: 48
tick-interval: 20
wakeup-interval: 20
extra-height-up: true
extra-height-down: false
entity-matcher:
- 'typeof:raider'
- name: 'water'
activation-range: 16
tick-interval: 20
wakeup-interval: 60
extra-height-up: false
extra-height-down: false
entity-matcher:
- 'typeof:water_animal'
- name: 'villager'
activation-range: 16
tick-interval: 20
wakeup-interval: 30
extra-height-up: false
extra-height-down: false
entity-matcher:
- 'typeof:villager'
- name: 'zombie'
activation-range: 16
tick-interval: 20
wakeup-interval: 20
extra-height-up: true
extra-height-down: false
entity-matcher:
- 'minecraft:zombie'
- 'minecraft:husk'
- name: 'monster-below'
activation-range: 32
tick-interval: 20
wakeup-interval: 20
extra-height-up: true
extra-height-down: true
entity-matcher:
- 'minecraft:creeper'
- 'minecraft:slime'
- 'minecraft:magma_cube'
- 'minecraft:hoglin'
- name: 'flying-monster'
activation-range: 48
tick-interval: 20
wakeup-interval: 20
extra-height-up: true
extra-height-down: false
entity-matcher:
- 'minecraft:ghast'
- 'minecraft:phantom'
- name: 'monster'
activation-range: 32
tick-interval: 20
wakeup-interval: 20
extra-height-up: true
extra-height-down: false
entity-matcher:
- 'typeof:monster'
- name: 'animal'
activation-range: 16
tick-interval: 20
wakeup-interval: 60
extra-height-up: false
extra-height-down: false
entity-matcher:
- 'typeof:animal'
- 'typeof:ambient'
- name: 'creature'
activation-range: 24
tick-interval: 20
wakeup-interval: 30
extra-height-up: false
extra-height-down: false
entity-matcher:
- 'typeof:mob'
For servers that have already tested ServerCore and want stronger optimization with minor gameplay impact. This preset lowers view and simulation distance, enables villager lobotomization, increases mob spawn speed, and reduces mobcap limits.
# The main configuration file for ServerCore.
# Most of these settings can be reloaded without restarting using /servercore reload.
# Most miscellaneous feature toggles.
features:
# Reverts enderpearl behavior to pre-1.21.2. The following will change when this setting is enabled:
# ► Enderpearls will no longer load chunks around them.
# ► Enderpearls will load / unload with chunks again instead of with their owner joining / leaving the game.
# Note: Toggling this setting may cause some old enderpearls from before the toggle to be lost.
prevent-enderpearl-chunkloading: false
# Whether the chunk-tick-distance dynamic setting should affect random ticks.
# Enabling this will stop chunks from performing random ticks when they are outside of this distance from any player.
# That includes chunks loaded by enderpearls or portals, breaking vanilla behavior.
chunk-tick-distance-affects-random-ticks: false
# Prevents lagspikes caused by players moving into unloaded chunks.
prevent-moving-into-unloaded-chunks: true # Changed to true
# The amount of seconds between auto-saves when /save-on is active.
autosave-interval-seconds: 300
# The fraction that decides the chance of experience orbs being able to merge with each other. (1 = 100%, 40 = 2.5%)
# Note that just like in vanilla, experience orbs will still need to be of the same size to actually merge.
xp-merge-fraction: 4 # Increased from 40
# The radius in blocks that experience orbs will merge at.
xp-merge-radius: 8 # Increased from 0.5
# The radius in blocks that items will merge at.
item-merge-radius: 4 # Increased from 0.5
lobotomize-villagers:
# Makes villagers tick less often if they are stuck in a 1x1 space.
enabled: true # Changed to true
# Decides the interval in between villager ticks when lobotomized.
tick-interval: 100 # Increased from 20
# Automatically modifies dynamic settings based on the server performance.
dynamic:
# Enables dynamic performance checks.
enabled: true # Changed to true
# The average MSPT to target.
target-mspt: 35
# The default values for dynamic settings.
# If left unspecified, the maximum value will be used.
# Note: adding view / simulation distance here will override their value in server.properties.
default-values:
MOBCAP_PERCENTAGE: 100
CHUNK_TICK_DISTANCE: 10
# The settings that will be decreased when the server is overloaded, in the specified order.
# You can remove settings from the list that you don't want to be dynamically adjusted.
# ► max = The maximum value the server will increase the setting to.
# ► min = The minimum value the server will decrease the setting to.
# ► increment = The amount the setting will be increased or decreased by.
# ► interval = The amount of seconds between each check to increase or decrease.
dynamic-settings:
- setting: 'CHUNK_TICK_DISTANCE'
max: 8 # Default 10
min: 4 # Default 6
increment: 1
interval: 15
- setting: 'MOBCAP_PERCENTAGE'
max: 85 # Default 100
min: 30 # Default 50
increment: 10
interval: 15
- setting: 'SIMULATION_DISTANCE'
max: 8 # Default 10
min: 4 # Default 6
increment: 1
interval: 15
- setting: 'VIEW_DISTANCE'
max: 8 # Default 10
min: 4 # Default 5
increment: 1
interval: 150
# A special mobcap that only affects the breeding of animals and villagers.
breeding-cap:
# Enables breeding caps.
enabled: false
# The breeding cap for villagers.
# ► limit = The limit of mobs of the same type within range. Setting this to negative will disable the breeding cap.
# ► range = The range it will check for entities of the same type.
# ► unlimited-height = Whether to ignore the vertical distance when checking for entities of the same type.
villagers:
limit: 32
range: 64
unlimited-height: false
# The breeding cap for happy ghasts.
# Dried ghast blocks will wait until there is space in the breeding cap to hatch.
happy-ghasts:
limit: 32
range: 64
unlimited-height: false
# The breeding cap for animals.
# Note that this cap only checks for animals of the same type.
# If the limit is 32 you can still breed 32 cows and 32 pigs next to each other.
animals:
limit: 32
range: 64
unlimited-height: false
# Gives more control over mob spawning.
mob-spawning:
# Mobcap settings for zombie reinforcements.
# ► enforce-mobcap = Whether to enforce mobcaps for this type of mobspawning.
# ► additional-capacity = Additional capacity for this specific mobcap. Decides how much it can spawn over the regular mobcap.
# It is recommended to allow them to spawn a bit over the regular mobcap as they would otherwise never get a chance to spawn.
zombie-reinforcements:
enforce-mobcap: false
additional-capacity: 32
# Mobcap settings for zombified piglin spawning from nether portal random ticks.
nether-portal-randomticks:
enforce-mobcap: false
additional-capacity: 32
# Mobcap settings for mobs spawned from monster spawners.
monster-spawners:
enforce-mobcap: false
additional-capacity: 32
# Mobcap settings for silverfish spawned from the infested potion effect.
infested:
enforce-mobcap: false
additional-capacity: 32
# A list of mob categories with their respective mobcap and spawn interval.
# This setting lets you modify the values in vanilla's mobcap implementation.
# ► category = The mob spawning category.
# ► mobcap = The maximum amount of entities in the same category that can spawn near a player.
# ► spawn-interval = The interval between spawn attempts in ticks. Higher values will make mobs spawn much slower.
# ► despawn-distance = The distance in blocks from players where non-persistent mobs of this category will immediately despawn.
categories:
- category: 'MONSTER'
mobcap: 45 # Default 70
spawn-interval: 1
despawn-distance: 128
- category: 'CREATURE'
mobcap: 10
spawn-interval: 400
despawn-distance: 128
- category: 'AMBIENT'
mobcap: 15
spawn-interval: 4 # Default 1
despawn-distance: 128
- category: 'AXOLOTLS'
mobcap: 5
spawn-interval: 10 # Default 10
despawn-distance: 128
- category: 'UNDERGROUND_WATER_CREATURE'
mobcap: 5
spawn-interval: 10 # Default 10
despawn-distance: 128
- category: 'WATER_CREATURE'
mobcap: 5
spawn-interval: 10 # Default 10
despawn-distance: 128
- category: 'WATER_AMBIENT'
mobcap: 20
spawn-interval: 10 # Default 10
despawn-distance: 64
# Settings for commands and their formatting.
commands:
# Enables the /servercore status command.
status-enabled: true
# Enables the /mobcaps command.
mobcaps-enabled: true
colors:
# The colors used in command feedback. You can use hex codes or minecraft legacy color names.
# The primary color is the most used color in command feedback.
primary: 'dark_aqua'
# The secondary color is used for highlighting important information, like values.
secondary: 'green'
# The tertiary color is mostly used for text in titles.
tertiary: 'aqua'
# Activation range can drastically reduce the amount of lag caused by ticking entities.
# It does this by cleverly skipping certain entity ticks based on the distance to players and other factors, like immunity checks.
# Immunity checks determine whether an entity should be ticked even when it's outside the activation range, like for example when it is falling or takes damage.
# Note: while this is a very powerful feature, it can still slow down mobfarms and break very specific technical contraptions.
activation-range:
# Enables activation range.
enabled: false
# Briefly ticks entities newly added to the world for 10 seconds (includes both spawning and loading).
# This gives them a chance to properly immunize when they are spawned if they should be. Can be helpful for mobfarms.
tick-new-entities: true
# Enables vertical range checks. By default, activation ranges only work horizontally.
# This can greatly improve performance on taller worlds, but might break a few very specific ai-based mobfarms.
use-vertical-range: false
# Skips 1/4th of entity ticks whilst not immune.
# This affects entities that are within the activation range, but not immune (for example by falling or being in water).
skip-non-immune: false
# Allows villagers to tick regardless of the activation range when panicking.
villager-tick-panic: true
# The time in seconds that a villager needs to be inactive for before obtaining work immunity (if it has work tasks).
villager-work-immunity-after: 20
# The amount of ticks an inactive villager will wake up for when it has work immunity.
villager-work-immunity-for: 20
# A list of entity types that should be excluded from activation range checks.
excluded-entity-types:
- 'minecraft:ghast'
- 'minecraft:hopper_minecart'
- 'minecraft:warden'
# The activation type that will get assigned to any entity that doesn't have a custom activation type.
# ► activation-range = The range an entity is required to be in from a player to be activated.
# ► tick-interval = The interval between 'active' ticks whilst the entity is inactive. Negative values will disable these active ticks.
# ► wakeup-interval = The interval between inactive entity wakeups in seconds.
# ► extra-height-up = Allows entities to be ticked when far above the player when vertical range is in use.
# ► extra-height-down = Allows entities to be ticked when far below the player when vertical range is in use.
default-activation-type:
activation-range: 16
tick-interval: 20
wakeup-interval: -1
extra-height-up: false
extra-height-down: false
# A list of custom activation types.
# ► name = The name of the activation type.
# ► entity-matcher = A list of conditions to filter entities. Only one of these conditions needs to be met for an entity to match.
# ► If an entity matches multiple activation types, the one highest in the list will be used. The conditions accept the following formats:
# - Entity type matching | Uses the entity type's identifier. | 'minecraft:zombie' matches zombies, but for example not husks or drowned.
# - Typeof class matching | Uses the 'typeof:' prefix. | 'typeof:monster' matches all monsters.
# ► Available typeof classes: mob, monster, raider, neutral, ambient, animal, water_animal, flying_animal, villager, projectile.
custom-activation-types:
- name: 'raider'
activation-range: 48
tick-interval: 20
wakeup-interval: 20
extra-height-up: true
extra-height-down: false
entity-matcher:
- 'typeof:raider'
- name: 'water'
activation-range: 16
tick-interval: 20
wakeup-interval: 60
extra-height-up: false
extra-height-down: false
entity-matcher:
- 'typeof:water_animal'
- name: 'villager'
activation-range: 16
tick-interval: 20
wakeup-interval: 30
extra-height-up: false
extra-height-down: false
entity-matcher:
- 'typeof:villager'
- name: 'zombie'
activation-range: 16
tick-interval: 20
wakeup-interval: 20
extra-height-up: true
extra-height-down: false
entity-matcher:
- 'minecraft:zombie'
- 'minecraft:husk'
- name: 'monster-below'
activation-range: 32
tick-interval: 20
wakeup-interval: 20
extra-height-up: true
extra-height-down: true
entity-matcher:
- 'minecraft:creeper'
- 'minecraft:slime'
- 'minecraft:magma_cube'
- 'minecraft:hoglin'
- name: 'flying-monster'
activation-range: 48
tick-interval: 20
wakeup-interval: 20
extra-height-up: true
extra-height-down: false
entity-matcher:
- 'minecraft:ghast'
- 'minecraft:phantom'
- name: 'monster'
activation-range: 32
tick-interval: 20
wakeup-interval: 20
extra-height-up: true
extra-height-down: false
entity-matcher:
- 'typeof:monster'
- name: 'animal'
activation-range: 16
tick-interval: 20
wakeup-interval: 60
extra-height-up: false
extra-height-down: false
entity-matcher:
- 'typeof:animal'
- 'typeof:ambient'
- name: 'creature'
activation-range: 24
tick-interval: 20
wakeup-interval: 30
extra-height-up: false
extra-height-down: false
entity-matcher:
- 'typeof:mob'
Final note
If you encounter issues with ServerCore, please check their GitHub issues page.
If you are in need of further help or optimization support, we suggest reading our Spark guide.
For further assistance reach out to our community support to get answers from our community.