← Назад к ресурсам

Mob Spawn Control

This mod gives you complete control over mob spawning with per-rule filters, category caps, loot/XP scaling, attribute multipliers, and mob replacement — no coding required, just edit the JSON config and reload. 🔌✨

Modrinth management technology utility

Описание

# Mob Spawn Control Mob Spawn Control is a server-side Fabric mod for controlling Minecraft mob spawning through configuration and in-game admin commands. It supports per-mob spawn rules, global category caps, spawn replacement, attribute scaling, loot scaling, experience scaling, biome spawn additions, and hot-reloaded JSON configuration. ## What this mod does Mob Spawn Control intercepts mob spawning and applies configurable rules before a mob is allowed to enter the world. It can: - Allow or deny mobs globally, per dimension, per biome, or per spawn type. - Apply spawn-chance percentages globally, per dimension, or per biome. - Restrict spawning by Y height, light level, spawn block, time, world age, weather, player distance, and distance from world origin. - Replace one mob with another when the original mob would have spawned. - Remove all existing entities of a banned mob from loaded worlds. - Scale mob health, movement speed, and attack damage. - Scale loot drops and experience drops. - Disable experience for mobs created by specific spawn types, such as mob spawners. - Override vanilla spawn-category population caps. - Add mobs to biome spawn tables at startup. - Reload configuration without restarting the server. - Provide administrative commands with mob, dimension, biome, and spawn-type suggestions. The mod is intended for survival servers, modpacks, minigame servers, and performance-oriented servers that need predictable mob spawning. ## Supported versions | Minecraft | Java | Fabric Loader | Status | |---|---|---:|---| | 1.21 through 1.21.11 | 21 | 0.16.x or newer compatible release | Supported | | 26.1 through 26.1.2 | 25 | 0.17.x or newer compatible release | Supported | | 26.2 | 25 | 0.19.3 or newer | Supported | | 26.3 | 25 | 0.19.5 or newer | Supported | Use the download whose Minecraft version matches your game or server. The 1.21 file will not work on 26.x, and 26.x files will not work on 1.21. ## Installation ### Client or single-player installation 1. Install the correct version of Minecraft. 2. Install Fabric Loader for that Minecraft version. 3. Install the matching Fabric API release. 4. Download the Mob Spawn Control file for your Minecraft version. 5. Place the downloaded `.jar` file in the `mods` folder. 6. Start Minecraft. 7. For single-player testing, open a world and use commands with operator permission where needed. ### Server installation 1. Install the correct Minecraft server version. 2. Install the matching Fabric Loader server. 3. Install the matching Fabric API server file. 4. Download the Mob Spawn Control file for your server's Minecraft version. 5. Place the downloaded `.jar` file in the server's `mods` folder. 6. Start the server once so the mod can generate its configuration file. 7. Edit `config/viper_spawn_control.json`. 8. Run `/spawncontrol reload` to apply changes without restarting. The configuration file is created at: ```text config/viper_spawn_control.json ``` ## Configuration overview The configuration has three top-level sections: | Section | Type | Purpose | |---|---|---| | `global_mob_caps` | Object mapping spawn-category names to integers | Overrides population limits used for natural spawning categories. | | `spawn_rules` | Object mapping mob IDs to rule objects | Controls where, when, how often, and in what form each mob may spawn. | | `biome_spawn_additions` | Object mapping biome IDs to spawn-entry lists | Adds new biome spawn entries when the server starts. | Mob IDs use the form `minecraft:zombie`. Biome and dimension IDs also use namespaced IDs, such as `minecraft:plains` or `minecraft:the_nether`. ## Complete configuration example ```json { "global_mob_caps": { "monster": 70, "creature": 10, "ambient": 15, "underground_water_creature": 5, "water_creature": 5, "water_ambient": 20, "axolotls": 5 }, "spawn_rules": { "minecraft:zombie": { "global_enabled": true, "global_spawn_rate_percent": 100.0, "disabled_dimensions": [], "disabled_biomes": [], "disabled_spawn_types": [], "dimension_rates": {}, "biome_rates": {}, "height_limits": { "min_y": -64, "max_y": 320 }, "light_limits": { "min_light": 0, "max_light": 7 }, "allowed_spawn_blocks": [], "time_conditions": { "day_only": false, "night_only": true, "min_world_days": 0 }, "attribute_multipliers": { "max_health": 1.0, "movement_speed": 1.0, "attack_damage": 1.0 }, "proximity_rules": { "min_distance_to_players": 24.0, "max_distance_to_players": -1.0, "min_distance_to_origin": 100.0, "max_distance_to_origin": 10000.0 }, "weather_conditions": { "rain_only": false, "thunder_only": false, "clear_only": false }, "replace_with": "", "xp_multiplier": 1.0, "spawn_type_xp_multipliers": { "SPAWNER": 0.0 }, "loot_multiplier": 1.0 } }, "biome_spawn_additions": { "minecraft:plains": [ { "mob": "minecraft:polar_bear", "weight": 5, "min_group": 1, "max_group": 2 } ] } } ``` ## Spawn-rule configuration table Each entry under `spawn_rules` uses a mob ID as its key. | Field | Type | Description | |---|---|---| | `global_enabled` | Boolean | Set to `false` to ban the mob in every dimension and biome. | | `global_spawn_rate_percent` | Number from 0 to 100 | Default spawn chance when no dimension- or biome-specific rate applies. | | `disabled_dimensions` | List of dimension IDs | Prevents the mob from spawning in the listed dimensions. | | `disabled_biomes` | List of biome IDs | Prevents the mob from spawning in the listed biomes. | | `disabled_spawn_types` | List of uppercase spawn reasons | Prevents the mob from spawning through listed mechanisms, such as `NATURAL` or `SPAWNER`. | | `dimension_rates` | Object mapping dimension ID to percentage | Overrides the spawn chance for selected dimensions. | | `biome_rates` | Object mapping biome ID to percentage | Overrides the spawn chance for selected biomes. Biome rates take precedence over dimension rates. | | `height_limits.min_y` | Integer | Minimum Y coordinate where the mob may spawn. | | `height_limits.max_y` | Integer | Maximum Y coordinate where the mob may spawn. | | `light_limits.min_light` | Integer from 0 to 15 | Minimum light level where the mob may spawn. | | `light_limits.max_light` | Integer from 0 to 15 | Maximum light level where the mob may spawn. | | `allowed_spawn_blocks` | List of block IDs | If non-empty, the mob can spawn only when the block below it is in this list. | | `time_conditions.day_only` | Boolean | Allows spawning only during daytime when true. | | `time_conditions.night_only` | Boolean | Allows spawning only during nighttime when true. | | `time_conditions.min_world_days` | Integer | Prevents spawning before the world reaches the selected age in days. | | `attribute_multipliers.max_health` | Number | Multiplies the spawned mob's maximum health. | | `attribute_multipliers.movement_speed` | Number | Multiplies the spawned mob's movement speed. | | `attribute_multipliers.attack_damage` | Number | Multiplies the spawned mob's attack damage. | | `proximity_rules.min_distance_to_players` | Number | Requires spawns to be at least this many blocks from the nearest player. | | `proximity_rules.max_distance_to_players` | Number | Requires a player to be within this distance. Use `-1.0` to disable the upper limit. | | `proximity_rules.min_distance_to_origin` | Number | Requires spawns to be at least this many horizontal blocks from world coordinates `0, 0`. | | `proximity_rules.max_distance_to_origin` | Number | Prevents spawns farther than this horizontal distance from world coordinates `0, 0`. Use `-1.0` to disable the upper limit. | | `weather_conditions.rain_only` | Boolean | Allows spawning only while it is raining when true. | | `weather_conditions.thunder_only` | Boolean | Allows spawning only during thunderstorms when true. | | `weather_conditions.clear_only` | Boolean | Allows spawning only during clear weather when true. | | `replace_with` | Mob ID or empty string | Replaces the denied original mob with another mob. Use an empty string to disable replacement. | | `xp_multiplier` | Number | Multiplies experience dropped by the mob. Use `0.0` to disable its experience. | | `spawn_type_xp_multipliers` | Object mapping uppercase spawn reason to multiplier | Overrides `xp_multiplier` only for mobs born through the specified spawn mechanism. | | `loot_multiplier` | Number | Multiplies the quantity of dropped items. | Spawn-type experience multipliers use the spawn reason recorded when the mob is created. For example, `"SPAWNER": 0.0` removes experience from spawner-created mobs while leaving naturally spawned mobs of the same type unchanged. Origin distances use horizontal X/Z distance from the center of the spawn position to world coordinates `0, 0`. The calculation is performed separately in each dimension's own coordinate system. ## Biome spawn-addition table Each entry under `biome_spawn_additions` uses a biome ID as its key and contains a list of spawn entries. | Field | Type | Description | |---|---|---| | `mob` | Mob ID | Mob added to the biome's spawn table. | | `weight` | Integer of at least 1 | Relative selection weight for the entry. | | `min_group` | Integer of at least 1 | Minimum number of mobs spawned together. | | `max_group` | Integer | Maximum number of mobs spawned together. | Biome additions are applied during server startup. Restart the server after changing them. ## Commands All commands start with `/spawncontrol` and require gamemaster-level permission. Mob arguments accept namespaced IDs such as `minecraft:sheep`; dimension, biome, and spawn-type arguments support suggestions. | Command | Description | |---|---| | `/spawncontrol reload` | Reloads `viper_spawn_control.json` from disk. | | `/spawncontrol info` | Displays the executing player's biome, dimension, light level, Y coordinate, and world age. | | `/spawncontrol ban ` | Bans a mob globally and removes existing entities of that type from loaded worlds. | | `/spawncontrol ban global` | Bans a mob globally. | | `/spawncontrol ban dimension ` | Bans a mob in the selected dimension. | | `/spawncontrol ban biome ` | Bans a mob in the selected biome. | | `/spawncontrol unban ` | Allows a globally banned mob again. | | `/spawncontrol unban dimension ` | Removes a dimension-specific ban. | | `/spawncontrol unban biome ` | Removes a biome-specific ban. | | `/spawncontrol rate ` | Sets the global spawn-chance percentage. | | `/spawncontrol rate global` | Sets the global spawn-chance percentage explicitly. | | `/spawncontrol rate dimension ` | Sets a dimension-specific spawn-chance percentage. | | `/spawncontrol rate biome ` | Sets a biome-specific spawn-chance percentage. | | `/spawncontrol cap ` | Overrides a natural-spawning category population cap. | | `/spawncontrol spawntype ` | Allows or denies a particular spawn mechanism, such as `NATURAL` or `SPAWNER`. | | `/spawncontrol height ` | Sets permitted Y-coordinate limits. | | `/spawncontrol light ` | Sets permitted light-level limits from 0 to 15. | | `/spawncontrol attributes ` | Sets an attribute multiplier. | | `/spawncontrol weather ` | Sets a weather restriction. | | `/spawncontrol replace ` | Displays the mob's current replacement. | | `/spawncontrol replace ` | Replaces denied spawns with another mob. | | `/spawncontrol replace none` | Removes the replacement. | The mob argument comes immediately after the subcommand. For scoped commands, the scope follows the mob and value: ```text /spawncontrol ban minecraft:sheep /spawncontrol rate minecraft:zombie 50 minecraft:the_nether ``` ## Common examples ### Ban zombies everywhere and remove existing zombies ```text /spawncontrol ban minecraft:zombie ``` ### Remove experience from spawner mobs only ```json "minecraft:zombie": { "xp_multiplier": 1.0, "spawn_type_xp_multipliers": { "SPAWNER": 0.0 } } ``` ### Keep hostile mobs away from spawn ```json "minecraft:creeper": { "proximity_rules": { "min_distance_to_players": 24.0, "max_distance_to_players": -1.0, "min_distance_to_origin": 250.0, "max_distance_to_origin": -1.0 } } ``` ### Replace spiders with cave spiders ```text /spawncontrol replace minecraft:spider minecraft:cave_spider ``` ## Performance notes - Rules are evaluated only when a mob spawn is attempted. - Unused proximity checks are skipped. - Category caps use the configured values during natural-spawn calculations. - The mod does not add client-side rendering, particles, sounds, or HUD elements. Enhance your server setup with the other server-side mods in the Fabric Server Essentials organization.