Spawn Mobs Active
Spawn Mobs Active 是一款轻量级、完全可配置的模组生成管理器,适用于 Fabric 1.21.1。通过简单的规则列表,你可以精确决定哪些生物可以生成以及哪些被阻止——支持按生物种类、类别、生成来源、维度、高度、光照等级和生物群系进行筛选。无需使用命令或编写代码:所有内容都保存在一个易于编辑的 JSON 文件中。
无论你是想要一个和平的主世界(怪物仅从刷怪笼生成)、一个仅限洞穴的僵尸体验,还是仅仅想移除一种烦人的生物 —— Spawn Control 只需几行配置即可实现。
功能特性
- 单独阻止或允许任何生物(
minecraft:creeper、minecraft:zombie、…)
- 通过类别阻止或允许整组生物(例如一次性禁止所有
MONSTER 类生物——也适用于模组添加的生物)
- 按生成来源过滤:自然生成、刷怪笼、结构生成、巡逻队等
- 按维度过滤(主世界 / 下界 / 末地 / 模组维度)
- 按高度过滤(
minY / maxY)——非常适合“仅限洞穴”场景
- 按光照等级和天空可见性过滤(地表 vs 洞穴)
- 按生物群系过滤
- 专门处理鸡骑士的选项
- 游戏内重载配置——无需重启游戏
- 可选的日志记录功能,打印每个被阻止的生成事件及其确切的生物 ID
工作原理(核心部分)
你编写的是一个规则列表。每条规则要么是 ALLOW(允许生成),要么是 DENY(阻止生成)。
当有生物尝试生成时,Spawn Control 会从上到下检查规则,并应用第一条匹配的规则——然后停止检查。如果没有规则匹配,则使用 defaultAction(默认为 ALLOW,即原版行为)。
第一条匹配的规则优先生效。
这就是为什么“例外情况”(ALLOW)总是放在通用禁令(DENY)上方的原因。
一条规则由条件(必须为真的内容)加上一个动作组成。任何未填写的字段都会被忽略,意味着“适用于所有情况”。在单条规则内,所有列出的条件必须同时满足(AND 逻辑)。
配置文件
位置:config/spawncontrol.json(首次启动时自动创建,包含示例)。
顶层设置
| 设置项 |
含义 |
enabled |
整个模组的总开关(true / false) |
defaultAction |
当没有规则匹配时发生什么:"ALLOW"(原版行为)或 "DENY" |
disableChickenJockeys |
true = 不会生成作为骑乘者的鸡;幼年生物留在地面上 |
removeChickenJockeyRiders |
true = 移除整个鸡骑士(骑乘者和鸡),来自任何生成来源 |
logBlockedSpawns |
true = 将每个被阻止的生成事件及其生物 ID 打印到控制台(非常适合查找 ID) |
rules |
规则列表,从上到下依次检查 |
规则字段
| 字段 |
含义 |
action |
"ALLOW" 或 "DENY" |
entities |
生物 ID 列表,例如 ["minecraft:zombie", "minecraft:creeper"]。为空 = 全部 |
categories |
生物类别(见下文)。为空 = 全部 |
spawnReasons |
生成来源(见下文)。为空 = 全部 |
dimensions |
例如 ["minecraft:overworld", "minecraft:the_nether"]。为空 = 全部 |
biomes |
例如 ["minecraft:plains"]。为空 = 全部 |
minY / maxY |
高度范围(包含边界) |
requireSkyVisible |
true = 仅地表,false = 仅洞穴 |
minBlockLight / maxBlockLight |
方块光照范围(0–15) |
minSkyLight / maxSkyLight |
天空光照范围(0–15) |
comment |
供自己查看的自由文本备注;无实际效果 |
类别
MONSTER、CREATURE、AMBIENT、WATER_CREATURE、WATER_AMBIENT、UNDERGROUND_WATER_CREATURE、AXOLOTLS、MISC
MONSTER 涵盖敌对生物(僵尸、骷髅、苦力怕、蜘蛛、末影人、女巫、掠夺者、…)——包括注册在该类别中的模组生物。
生成原因
NATURAL、SPAWNER、STRUCTURE、CHUNK_GENERATION、PATROL、JOCKEY、REINFORCEMENT 及其他。
示例(“配方”)
完全禁用一种生物(任何来源):
{ "action": "DENY", "entities": ["minecraft:creeper"] }
禁用所有敌对怪物(全维度):
{ "action": "DENY", "categories": ["MONSTER"] }
怪物仅从刷怪笼生成(允许刷怪笼,阻止其他来源):
{ "action": "ALLOW", "categories": ["MONSTER"], "spawnReasons": ["SPAWNER"] },
{ "action": "DENY", "categories": ["MONSTER"] }
仅在主世界阻止怪物(下界和末地保持正常):
{ "action": "DENY", "categories": ["MONSTER"], "dimensions": ["minecraft:overworld"] }
僵尸仅在洞穴中生成(Y 坐标 50 以下),地表不生成:
{ "action": "ALLOW", "entities": ["minecraft:zombie"], "spawnReasons": ["NATURAL"], "dimensions": ["minecraft:overworld"], "maxY": 50 },
{ "action": "DENY", "entities": ["minecraft:zombie"], "spawnReasons": ["NATURAL"], "dimensions": ["minecraft:overworld"] }
提示: 构建规则时,先问自己*“哪些应该作为例外被允许?”* → 将其作为顶部的 ALLOW 规则,然后将通用的 DENY 规则放在其下方。
鸡骑士
鸡骑士以特殊方式生成,不经过正常的生成检查,因此它们拥有自己的设置:
removeChickenJockeyRiders: true → 移除整个鸡骑士(骑乘的幼年生物和它的鸡),无论生成来源如何。已保存的鸡骑士在加载时也会被清理。普通的僵尸和普通幼年僵尸不受影响。
disableChickenJockeys: true → 仅防止生成作为骑乘者的鸡;正常的幼年生物仍留在地面上。
- 基于规则的替代方案(仅移除鸡):
{ "action": "DENY", "entities": ["minecraft:chicken"], "spawnReasons": ["JOCKEY"] }
这两个开关默认均为 false。
命令
需要 OP 权限 / 权限等级 2:
/spawncontrol reload — 重载配置文件而无需重启游戏
/spawncontrol on / /spawncontrol off — 全局切换模组启用/禁用
/spawncontrol status — 显示当前状态和规则数量
须知
- 试炼刷怪笼(来自试炼密室)使用其自身的逻辑,不受本模组影响。
- Spawn Control 仅阻止新的生成;世界中已加载的实体不会被移除(请让它们自然消失或自行清除)。
- 修改了某些设置?运行
/spawncontrol reload 即可生效。
依赖项
- Minecraft 1.21.1 (Fabric)
- Fabric API
- Java 21
来源:
Spawn Mobs Active
Spawn Mobs Active is a lightweight, fully configurable mob-spawning manager for Fabric 1.21.1. With a simple rule list you decide exactly which mobs may spawn and which are blocked — by mob, category, spawn source, dimension, height, light level, and biome. No commands or coding required: everything lives in one easy JSON file.
Whether you want a peaceful overworld where monsters only come from spawners, a cave-only zombie experience, or just to get rid of one annoying mob — Spawn Control makes it a couple of lines.
Features
- Block or allow any mob individually (
minecraft:creeper, minecraft:zombie, …)
- Block or allow whole groups via category (e.g. all
MONSTERs at once — works for modded mobs too)
- Filter by spawn source: natural, spawner, structure, patrol, and more
- Filter by dimension (Overworld / Nether / End / modded dimensions)
- Filter by height (
minY / maxY) — great for "caves only"
- Filter by light level and sky visibility (surface vs. cave)
- Filter by biome
- Dedicated options to handle chicken jockeys
- In-game reload — no restart needed
- Optional logging that prints every blocked spawn with its exact mob ID
How it works (the important part)
You write a list of rules. Each rule is either ALLOW (let it spawn) or DENY (block it).
When a mob tries to spawn, Spawn Control checks the rules top to bottom and applies the first rule that matches — then it stops. If no rule matches, the defaultAction is used (normally ALLOW, i.e. vanilla behaviour).
The first matching rule wins.
That's why "exceptions" (ALLOW) always go above the general ban (DENY).
A rule is just conditions (what must be true) plus one action. Any field you leave out is ignored, meaning "applies to everything." Within a single rule, all listed conditions must match (AND).
Config file
Location: config/spawncontrol.json (created automatically on first launch, with examples).
Top-level settings
| Setting |
Meaning |
enabled |
Master switch for the whole mod (true / false) |
defaultAction |
What happens when no rule matches: "ALLOW" (vanilla) or "DENY" |
disableChickenJockeys |
true = no chicken is created as a mount; the baby mob stays on the ground |
removeChickenJockeyRiders |
true = removes the entire chicken jockey (rider and chicken), from any spawn source |
logBlockedSpawns |
true = print every blocked spawn + its mob ID to the console (great for finding IDs) |
rules |
The list of rules, checked top to bottom |
Rule fields
| Field |
Meaning |
action |
"ALLOW" or "DENY" |
entities |
List of mob IDs, e.g. ["minecraft:zombie", "minecraft:creeper"]. Empty = all |
categories |
Mob categories (see below). Empty = all |
spawnReasons |
Spawn sources (see below). Empty = all |
dimensions |
e.g. ["minecraft:overworld", "minecraft:the_nether"]. Empty = all |
biomes |
e.g. ["minecraft:plains"]. Empty = all |
minY / maxY |
Height range (inclusive) |
requireSkyVisible |
true = surface only, false = caves only |
minBlockLight / maxBlockLight |
Block-light range (0–15) |
minSkyLight / maxSkyLight |
Sky-light range (0–15) |
comment |
Free text note for yourself; has no effect |
Categories
MONSTER, CREATURE, AMBIENT, WATER_CREATURE, WATER_AMBIENT, UNDERGROUND_WATER_CREATURE, AXOLOTLS, MISC
MONSTER covers hostile mobs (zombies, skeletons, creepers, spiders, endermen, witches, pillagers, …) — including modded mobs registered in that category.
Spawn reasons
NATURAL, SPAWNER, STRUCTURE, CHUNK_GENERATION, PATROL, JOCKEY, REINFORCEMENT, and others.
Examples ("recipes")
Disable one mob completely (any source):
{ "action": "DENY", "entities": ["minecraft:creeper"] }
Disable all hostile monsters everywhere:
{ "action": "DENY", "categories": ["MONSTER"] }
Monsters only from spawners (allow spawners, block the rest):
{ "action": "ALLOW", "categories": ["MONSTER"], "spawnReasons": ["SPAWNER"] },
{ "action": "DENY", "categories": ["MONSTER"] }
Only block monsters in the Overworld (Nether and End stay normal):
{ "action": "DENY", "categories": ["MONSTER"], "dimensions": ["minecraft:overworld"] }
Zombies only in caves (below Y 50), not on the surface:
{ "action": "ALLOW", "entities": ["minecraft:zombie"], "spawnReasons": ["NATURAL"], "dimensions": ["minecraft:overworld"], "maxY": 50 },
{ "action": "DENY", "entities": ["minecraft:zombie"], "spawnReasons": ["NATURAL"], "dimensions": ["minecraft:overworld"] }
Tip: Build rules by asking first "what should be allowed as an exception?" → put that as ALLOW near the top, then put the general DENY below it.
Chicken jockeys
Chicken jockeys are created in a special way and don't go through the normal spawn check, so they have their own settings:
removeChickenJockeyRiders: true → removes the whole jockey (the riding baby mob and its chicken), no matter the spawn source. Already-saved jockeys are also cleaned up on load. Normal zombies and normal baby zombies are untouched.
disableChickenJockeys: true → only prevents the chicken mount from being created; a normal baby mob remains on the ground.
- Per-rule alternative (removes just the chicken):
{ "action": "DENY", "entities": ["minecraft:chicken"], "spawnReasons": ["JOCKEY"] }
Both switches default to false.
Commands
Requires OP / permission level 2:
/spawncontrol reload — reload the config without restarting
/spawncontrol on / /spawncontrol off — toggle the mod globally
/spawncontrol status — show current status and rule count
Good to know
- Trial spawners (from Trial Chambers) use their own logic and are not affected by this mod.
- Spawn Control only prevents new spawns; mobs already loaded in the world are not removed (let them despawn or clear them yourself).
- Tweaked something? Run
/spawncontrol reload and you're set.
Requirements
- Minecraft 1.21.1 (Fabric)
- Fabric API
- Java 21
Source:
评论 0
登录后参与评分
还没有评论,来抢沙发吧