MobRules
MobRules 是一款适用于 Minecraft 1.21.1 & 26.2 的轻量级模组,通过三个不同的类别提供全面且细粒度的生物生成控制:
- 敌对生物:所有具有攻击性的生物,包括怪物、亡灵和其他威胁
- 农场动物:通常用于获取资源或作为伴侣的家畜和被动陆地动物
- 水生动物:所有水生生物,从鱼类到两栖动物
每个类别提供三种控制级别:
- 全部允许 (
allow_all):正常的原版生成行为
- 全部禁止 (
block_all):完全阻止整个类别的生物生成
- 选择性控制 (
allowlist):使用可自定义的 JSON 白名单来指定允许生成的具体生物
类别是根据每个生物的原版生成类别解析的,因此自动涵盖模组添加的生物。每个生物仅属于一个类别,因此每次生成评估只执行一次。
高级配置
当使用“部分”模式时,MobRules 会在你的 config/mobrules/ 目录中生成 JSON 白名单文件:
hostile_mobs_allowlist.json - 控制哪些敌对生物可以生成
farm_animals_allowlist.json - 控制哪些农场动物可以生成
aquatic_animals_allowlist.json - 控制哪些水生动物可以生成
这些文件会自动创建并包含合理的默认值,你可以编辑它们以仅包含你希望允许的具体生物 ID。例如:
[
"minecraft:zombie",
"minecraft:skeleton",
"minecraft:creeper"
]
重新分类生物
要将生物移动到不同的类别(例如,将两栖动物视为水生而非农场动物),请编辑 config/mobrules/category_overrides.json:
{
"minecraft:frog": "aquatic"
}
有效的类别为 hostile、farm 和 aquatic。
游戏内命令
所有命令都需要权限等级 2(操作员):
/mobrules status — 显示当前控制模式和每个类别的白名单大小
/mobrules reload — 从磁盘重新加载白名单和覆盖文件,无需重启
/mobrules allow <category> <mobId> — 将生物添加到类别的白名单中
/mobrules disallow <category> <mobId> — 从类别的白名单中移除生物
为什么需要 MobRules
每个 Minecraft 玩家都遇到过默认生成机制与他们的目标不一致的情况:
- 创造模式建造者:希望从一个充满生机的世界中获得灵感,而不受战斗干扰
- 服务器管理员:通过选择性地管理生物种群或创建主题区域来优化性能
- 整合包创作者:需要精确控制哪些生物填充他们的自定义世界
- 注重无障碍体验的玩家:希望在保持游戏玩法的同时减少特定的压力源
- 角色扮演服务器:需要特定的氛围条件以及自定义的生物种群
- 冒险地图制作者:需要精确控制不同区域出现的生物
MobRules 弥合了 Minecraft 默认生成机制与其社区多样化需求之间的差距,提供了从简单的开关到通过易于编辑的配置文件进行精确的单生物控制的各类功能。
MobRules
MobRules is a lightweight mod for Minecraft 1.21.1 & 26.2 that provides comprehensive and granular control over mob spawning through three distinct categories:
- Hostile Mobs: All aggressive creatures including monsters, undead, and other threats
- Farm Animals: Domestic and passive land animals typically used for resources or companionship
- Aquatic Animals: All water-dwelling creatures from fish to amphibians
Each category offers three levels of control:
- Allow All (
allow_all): Normal vanilla spawning behavior
- Block All (
block_all): Completely prevent spawning for the entire category
- Selective Control (
allowlist): Use customizable JSON allowlists to specify exactly which mobs can spawn
Categories are resolved from each mob's vanilla spawn category, so modded mobs are covered automatically. Every mob belongs to exactly one category, so a spawn is only ever evaluated once.
Advanced Configuration
When using "partial" mode, MobRules generates JSON allowlist files in your config/mobrules/ directory:
hostile_mobs_allowlist.json - Controls which hostile mobs can spawn
farm_animals_allowlist.json - Controls which farm animals can spawn
aquatic_animals_allowlist.json - Controls which aquatic animals can spawn
These files are automatically created with sensible defaults and can be edited to include only the specific mob IDs you want to allow. For example:
[
"minecraft:zombie",
"minecraft:skeleton",
"minecraft:creeper"
]
Reclassifying mobs
To move a mob into a different category (for example, treating an amphibian as aquatic rather than farm), edit config/mobrules/category_overrides.json:
{
"minecraft:frog": "aquatic"
}
Valid categories are hostile, farm, and aquatic.
In-game commands
All commands require permission level 2 (operator):
/mobrules status — show the current control mode and allowlist size for each category
/mobrules reload — reload the allowlist and override files from disk without restarting
/mobrules allow <category> <mobId> — add a mob to a category's allowlist
/mobrules disallow <category> <mobId> — remove a mob from a category's allowlist
Why MobRules Exists
Every Minecraft player has encountered situations where default spawning mechanics don't align with their goals:
- Creative builders who want inspiration from a living world without combat interruptions
- Server administrators managing performance with selective mob populations or creating themed areas
- Modpack creators needing precise control over which creatures populate their custom worlds
- Accessibility-focused players who want to reduce specific stressors while maintaining gameplay
- Role-playing servers requiring specific atmospheric conditions with custom creature populations
- Adventure map makers who need exact control over which mobs appear in different areas
MobRules bridges the gap between Minecraft's default spawning and the diverse needs of its community, offering everything from simple on/off switches to precise per-mob control through easy-to-edit configuration files.
评论 0
登录后参与评分
还没有评论,来抢沙发吧