此模组允许你通过设置每个区块和全局的刷怪上限来控制生物生成,有助于防止农场过度拥挤或生物生成过多。
功能特性
- 区块限制:限制每个区块内的生物数量,避免过度拥挤。
- 世界限制:设置全球总生物数量的上限。
- 定向限制:对特定生物、类别或命名空间应用限制。
- 模组生物支持:支持在 Forge 中注册的生物。
- 溢出处理:通过无声消失或使用掉落物和经验值击杀来移除超出限制的生物。
- 消失控制:可选择原版规则、自定义消失范围或持久化生物。
- 命令:
/moblimiter reload:无需重启服务器即可刷新配置。
/moblimiter info:显示当前激活的设置。
- 优先级系统:限制优先级依次为特定生物、类别、命名空间和默认值。
- 优化性能:异步处理确保服务器运行流畅。
配置
在 config/moblimiter.json5 中自定义限制和消失行为。示例如下:
{
// 原版消失设置
// mode: "vanilla"(默认规则), "custom"(设置最小/最大距离), "disabled"(持久化生物)
"vanilla_despawn": {
"mode": "custom",
"min_distance": 32.0, // 最小消失距离(方块),适用于 "custom" 模式
"max_distance": 128.0 // 最大消失距离(方块),适用于 "custom" 模式
},
// 全服生物限制
// enabled: true/false 用于切换世界限制
// total: 世界中允许的最大生物数(-1 表示无限制)
// removal_type: "despawn"(无声消失)或 "kill"(掉落物品)
"world_limits": {
"enabled": true,
"total": 500, // 世界中允许的总生物数
"removal_type": "despawn",
"mobs": {
"minecraft:cow": 100, // 世界中最多 100 头牛
"minecraft:pig": 100, // 世界中最多 100 头猪
"minecraft:zombie": 50 // 世界中最多 50 个僵尸
}
},
// 每区块生物限制
// enabled: true/false 用于切换区块限制
// default.limit: 每个区块的默认生物上限(-1 表示无限制)
// removal_type: "despawn"(无声消失)或 "kill"(掉落物品)
"chunk_limits": {
"enabled": true,
"removal_type": "despawn",
"default": { "limit": 20 }, // 未指定生物的默认限制
"mobs": {
"minecraft:cow": 10, // 每区块最多 10 头牛
"minecraft:pig": 10, // 每区块最多 10 头猪
"minecraft:chicken": 10, // 每区块最多 10 只鸡
"minecraft:creatures": 15, // 每区块最多 15 个生物(动物)
"minecraft:*": 8 // 每区块最多 8 个其他 Minecraft 生物
}
}
}
使用方法
按照以下步骤设置并使用 Mob Limiter:
-
安装模组:
将 Mob Limiter 添加到你的服务器(客户端安装为可选)。该模组为服务端运行,无需客户端安装即可正常工作。
-
配置限制:
启动服务器后,在服务器目录中找到 config/moblimiter.json5。编辑文件以设置所需的限制和消失行为(参见上述示例)。修改完成后保存文件。
-
应用更改:
在游戏中或通过服务器控制台运行 /moblimiter reload,无需重启即可应用更改。
-
检查设置:
使用 /moblimiter info 查看当前配置,包括消失模式、世界限制和区块限制。
This mod lets you control mob spawning by setting per-chunk and world limits, helping to prevent overcrowded farms or excessive mob spawns.
Features
- Chunk Limits: Restrict mob counts per chunk to avoid overcrowding.
- World Limits: Set global caps for total mob populations.
- Targeted Limits: Apply restrictions to specific mobs, categories, or namespaces.
- Modded Mobs: Supports mobs registered in Forge.
- Excess Handling: Remove excess mobs via silent despawn or kill with loot and experience.
- Despawn Control: Choose vanilla rules, custom despawn ranges, or persistent mobs.
- Commands:
/moblimiter reload: Refresh config without server restart.
/moblimiter info: Display active settings.
- Priority System: Limits prioritize specific mobs, then categories, namespaces, and defaults.
- Optimized: Asynchronous processing ensures smooth server performance.
Configuration
Customize limits and despawn behavior in config/moblimiter.json5. Example:
{
// Vanilla despawn settings
// mode: "vanilla" (default rules), "custom" (set min/max distance), "disabled" (persistent mobs)
"vanilla_despawn": {
"mode": "custom",
"min_distance": 32.0, // Min distance (blocks) to despawn (for "custom" mode)
"max_distance": 128.0 // Max distance (blocks) to despawn (for "custom" mode)
},
// World-wide mob limits
// enabled: true/false to toggle world limits
// total: Max mobs in the world (-1 for unlimited)
// removal_type: "despawn" (silent) or "kill" (drops loot)
"world_limits": {
"enabled": true,
"total": 500, // Total mobs allowed in the world
"removal_type": "despawn",
"mobs": {
"minecraft:cow": 100, // Max 100 cows in the world
"minecraft:pig": 100, // Max 100 pigs in the world
"minecraft:zombie": 50 // Max 50 zombies in the world
}
},
// Per-chunk mob limits
// enabled: true/false to toggle chunk limits
// default.limit: Default mob cap per chunk (-1 for unlimited)
// removal_type: "despawn" (silent) or "kill" (drops loot)
"chunk_limits": {
"enabled": true,
"removal_type": "despawn",
"default": { "limit": 20 }, // Default limit for unspecified mobs
"mobs": {
"minecraft:cow": 10, // Max 10 cows per chunk
"minecraft:pig": 10, // Max 10 pigs per chunk
"minecraft:chicken": 10, // Max 10 chickens per chunk
"minecraft:creatures": 15, // Max 15 creatures (animals) per chunk
"minecraft:*": 8 // Max 8 of any other Minecraft mob per chunk
}
}
}
Usage
Follow these steps to set up and use Mob Limiter:
-
Install the Mod:
Add Mob Limiter to your server (client installation is optional). The mod is server-side and works without requiring clients to install it.
-
Configure Limits:
After launching the server, find config/moblimiter.json5 in the server directory. Edit the file to set your desired limits and despawn behavior (see the example above). Save the file after making changes.
-
Apply Changes:
Run /moblimiter reload in-game or via the server console to apply changes without restarting.
-
Check Settings:
Use /moblimiter info to view the current configuration, including despawn mode, world limits, and chunk limits.
评论 0
登录后参与评分
还没有评论,来抢沙发吧