Mobs Blocker
为你的服务器提供高级刷怪控制
Mobs Blocker 已完全重构,赋予你对实体生成进行精细控制的权限。根据特定条件(自然生成、刷怪笼、刷怪蛋)阻止怪物生成,或针对怪物类别应用全局规则。
报告错误或建议功能
⚠️ 更新通知:本模组已被重写,目前仅支持版本 1.2.0。如需使用 1.1.0 版本,请查阅 GitHub 仓库。低于 1.1.0 的版本不再提供支持。
? 工作原理与核心功能
逻辑系统
Mobs Blocker 会拦截每一次实体生成尝试,并按以下顺序检查规则:
- 具体规则:是否存在针对该确切 Entity ID 的规则?(例如
minecraft:zombie)
- 预设规则:如果没有,是否存在针对其所属类别的规则?(例如
monsters)
- 全局规则:如果没有,是否设置了全局规则?
主要功能
- 精细控制:根据生成方式(自然生成、刷怪笼、刷怪蛋、命令)阻止怪物生成。
- 智能预设:对整个类别应用规则(例如,阻止所有
monsters 或 water_creatures)。
- 全局设置:立即对服务器上的 每个 实体应用一条规则。
- 游戏内管理:完整的命令系统,支持自动补全。
- 零延迟:使用优化的
HashSet 查找机制,并挂钩 NeoForge 事件,将对性能的影响降至最低。
- 仅服务端:客户端无需安装此模组。
? 规则系统(了解阻止类型)
添加规则时,你需要定义要阻止的内容。你可以阻止特定的来源,或使用“反向模式”来仅允许特定的来源。
| 规则关键字 |
效果 |
all |
阻止针对目标的 所有 生成。 |
natural |
阻止自然生成(黑暗环境、生物群系生成)。 |
spawner |
阻止刷怪笼(地牢、试炼刷怪笼)。 |
egg |
阻止刷怪蛋和发射器。 |
command |
阻止 /summon 或命令方块生成的实体。 |
!natural |
反向:阻止除自然生成之外的所有内容。 |
!spawner |
反向:阻止除刷怪笼之外的所有内容。 |
!command |
反向:阻止除命令之外的所有内容。 |
? 命令指南(使用示例)
所有命令均需 OP 等级 4。
1. 具体怪物控制 (add)
针对单一实体类型。
- 完全阻止僵尸:
/spawnblocker add minecraft:zombie all
- 阻止苦力怕自然生成(但允许通过刷怪笼或刷怪蛋生成):
/spawnblocker add minecraft:creeper natural
- 仅允许骷髅从刷怪笼生成(反向模式):
/spawnblocker add minecraft:skeleton !spawner
2. 类别预设 (preset)
将规则应用于怪物组。
可用类别: monsters, creatures, ambient, water, misc.
3. 全局设置 (global)
对整台服务器应用备用规则。
4. 管理与实用工具
? 配置文件(手动编辑)
配置会自动保存至 config/spawnblocker.json。如果服务器已停止运行,你可以手动编辑此文件。
spawnblocker.json 示例:
{
"minecraft:phantom": [
"all"
],
"preset:monsters": [
"natural"
],
"minecraft:zombie": [
"!spawner"
],
"global_settings": [
"command"
]
}
Mobs Blocker
Advanced Spawn Control for Your Server
Mobs Blocker has been completely re-architected to give you granular control over entity spawning. Stop mobs based on specific conditions (natural spawns, spawners, eggs) or apply rules globally across mob categories.
Report a Bug or Suggest a Feature
⚠️ UPDATE NOTICE: This mod has been rewritten and currently ONLY supports version 1.2.0. For version 1.1.0, please check the GitHub repository. Versions below 1.1.0 are no longer supported.
? How It Works & Core Features
The Logic System
Mobs Blocker intercepts every entity spawn attempt and checks rules in this specific order:
- Specific Rules: Is there a rule for this exact Entity ID? (e.g.,
minecraft:zombie)
- Preset Rules: If not, is there a rule for its Category? (e.g.,
monsters)
- Global Rules: If not, is there a Global rule set?
Key Features
- Granular Control: Block mobs based on how they spawn (Natural, Spawners, Eggs, Commands).
- Smart Presets: Apply rules to entire categories (e.g., block all
monsters or water_creatures).
- Global Settings: Apply a rule to every entity on the server instantly.
- In-Game Management: Full command system with auto-completion.
- Zero Lag: Uses optimized
HashSet lookups and hooks into NeoForge events for minimal performance impact.
- Server-Side Only: Clients do not need to install this mod.
? The Rules System (Understanding Block Types)
When adding a rule, you define what to block. You can block specific sources or use "Inverse Mode" to allow only specific sources.
| Rule Keyword |
Effect |
all |
Blocks ALL spawns for this target. |
natural |
Blocks natural spawns (darkness, biome generation). |
spawner |
Blocks mob spawners (dungeons, trial spawners). |
egg |
Blocks spawn eggs and dispensers. |
command |
Blocks /summon or command block spawns. |
!natural |
Inverse: Blocks everything EXCEPT natural spawns. |
!spawner |
Inverse: Blocks everything EXCEPT spawners. |
!command |
Inverse: Blocks everything EXCEPT commands. |
? Command Guide (Usage Examples)
All commands require OP Level 4.
1. Specific Mob Control (add)
Target a single entity type.
- Block Zombies completely:
/spawnblocker add minecraft:zombie all
- Block Creepers from spawning naturally (but allow spawners/eggs):
/spawnblocker add minecraft:creeper natural
- Allow Skeletons ONLY from Spawners (Inverse Mode):
/spawnblocker add minecraft:skeleton !spawner
2. Category Presets (preset)
Apply rules to groups of mobs.
Available categories: monsters, creatures, ambient, water, misc.
3. Global Settings (global)
Apply a fallback rule to the entire server.
4. Management & Utilities
? Configuration File (Manual Editing)
The configuration is saved automatically to config/spawnblocker.json. You can edit this file manually if the server is stopped.
Example spawnblocker.json:
{
"minecraft:phantom": [
"all"
],
"preset:monsters": [
"natural"
],
"minecraft:zombie": [
"!spawner"
],
"global_settings": [
"command"
]
}
评论 0
登录后参与评分
还没有评论,来抢沙发吧