被动生物生成
Passive Mob Spawn 是一款轻量级的服务端 NeoForge 模组,专为天空岛(Skyblock)整合包设计,使被动动物能够在玩家建造的草方块平台上自然生成,即使这些平台位于高空。
该模组添加了一个受控的补充被动生物生成器,它会寻找玩家周围有效的 grass_block 平台,并在白天尝试生成配置的被动动物。
功能特性
- 允许被动生物在任何建筑高度的草方块平台上生成。
- 专为天空岛世界和虚空风格进度类整合包设计。
- 仅在服务端运行,无需客户端安装。
- 仅在白天尝试生成。
- 支持带权重的生物条目,例如
minecraft:cow=100。
- 支持可配置的生成检查延迟。
- 跳过距离玩家过近的生成位置。
- 检查附近同类型的生物数量,以减少过度拥挤。
- 包含可选的调试日志,记录生成尝试及被拒绝的原因。
生成条件
模组会在玩家周围搜索有效的生成位置。当满足以下条件时,该位置被视为有效:
- 底层方块为
minecraft:grass_block。
- 上方方块为空气、短草、高草、蕨类或花朵。
- 该位置距离玩家至少 16 个方块。
- 当前维度处于白天状态。
- 本地被动生物上限尚未达到。
- 目标位置 16 个方块范围内少于 2 只同类型生物。
- 选定的实体通过了其正常的 Minecraft 生成、阻挡和碰撞检测。
配置
首次启动后,配置文件将生成于以下路径:
config/passivemobspawn-common.toml
示例:
[spawning]
debug = false
spawnCheckDelaySeconds = 60
passiveMobs = ["minecraft:cow=100", "minecraft:sheep=100", "minecraft:pig=100", "minecraft:chicken=100", "minecraft:rabbit=100"]
配置选项
debug:启用详细的控制台日志,包括生成检查、选定生物、有效位置及被拒绝的原因。
spawnCheckDelaySeconds:两次生成检查之间的延迟时间。数值越高,被动生物生成的频率越低。
passiveMobs:模组可能生成的实体 ID 权重列表。
带权重的生物条目
使用 entity_id=weight 格式:
minecraft:cow=100
minecraft:sheep=50
minecraft:rabbit=10
纯 ID(如 minecraft:cow)也可接受,默认权重为 1。空白条目将被忽略。
适用场景
- 天空岛整合包
- 虚空世界
- 需要草方块平台支持被动动物生成的进度类整合包
- 需要可配置、可控被动生物生成的服务器
Passive Mob Spawn
Passive Mob Spawn is a lightweight server-side NeoForge mod for skyblock modpacks where passive animals need to spawn naturally on player-made grass platforms, even high in the sky.
The mod adds a controlled supplemental passive mob spawner that looks for valid grass_block platforms around players and attempts to spawn configured passive animals during the day.
Features
- Allows passive mobs to spawn on grass platforms at any build height.
- Designed for skyblock worlds and void-style progression packs.
- Runs server-side and does not require client-side installation.
- Only attempts spawning during daytime.
- Supports weighted mob entries such as
minecraft:cow=100.
- Supports configurable spawn check delay.
- Skips spawns too close to the player.
- Checks nearby mobs of the same type to reduce overcrowding.
- Includes optional debug logging for spawn attempts and denial reasons.
Spawn Conditions
The mod searches for valid spawn positions around players. A position is considered valid when:
- The base block is
minecraft:grass_block.
- The block above is air, short grass, tall grass, fern, or a flower.
- The position is at least 16 blocks away from the player.
- The dimension is currently daytime.
- The local passive mob cap has not already been reached.
- There are fewer than 2 mobs of the same type within 16 blocks of the target position.
- The selected entity passes its normal Minecraft spawn, obstruction, and collision checks.
Configuration
After launching once, the config is generated at:
config/passivemobspawn-common.toml
Example:
[spawning]
debug = false
spawnCheckDelaySeconds = 60
passiveMobs = ["minecraft:cow=100", "minecraft:sheep=100", "minecraft:pig=100", "minecraft:chicken=100", "minecraft:rabbit=100"]
Config Options
debug: Enables detailed console logs for spawn checks, selected mobs, valid positions, and denial reasons.
spawnCheckDelaySeconds: Delay between spawn checks. Higher values make passive mobs spawn less often.
passiveMobs: Weighted list of entity ids the mod may spawn.
Weighted Mob Entries
Use entity_id=weight format:
minecraft:cow=100
minecraft:sheep=50
minecraft:rabbit=10
Plain ids such as minecraft:cow are also accepted and use weight 1. Blank entries are ignored.
Recommended For
- Skyblock modpacks
- Void worlds
- Progression packs where grass platforms should support passive animal spawning
- Servers that need configurable, controlled passive mob generation
评论 0
登录后参与评分
还没有评论,来抢沙发吧