BossArea — 命令参考
Fabric 1.20.1 · 需要操作者权限等级 2
所有数据保存在世界的 data/bossarea.dat 文件中,并会在服务器重启后保留。
目录
选择法杖
/give @s bossarea:selection_wand
- 左键点击方块 → 设置角 A
- 右键点击方块 → 设置角 B
选择轮廓会以粒子的形式显示,仅对你可见,并且在持有法杖时持续刷新。
创建和管理区域
/bossarea set <name>
根据你当前的法杖选择创建一个新的 Boss 区域。
/bossarea remove <name>
/bossarea list
/bossarea info <name>
/bossarea status <name>
/bossarea enable <name> <true|false>
info 会显示完整的配置,并提供可点击的 [edit] 按钮,这些按钮会将命令预填到你的聊天栏中。list 会列出所有区域 —— 点击名称即可打开其信息页面。所有接受区域名称的命令都支持 Tab 自动补全。
/bossarea edit <name> setcorners
根据你当前的法杖选择重新定义区域边界,同时保留所有现有配置。
怪物波次
怪物会在区域的中心四分之一部分(每个轴上的 37.5%–62.5%)且在有效的固体地面上生成。
简单方法 —— addmob
/bossarea edit <name> addmob minecraft:zombie 10
→ 每次战斗生成 10 只僵尸。
带有可选的玩家缩放:
/bossarea edit <name> addmob minecraft:zombie 10 25
→ 基础 10 只僵尸,超出第 1 名玩家后每增加一名玩家 +25%。
/bossarea edit <name> addmob minecraft:zombie 10 25 1
→ 同上,外加每增加一名玩家额外 +1 只僵尸。
N 名玩家的缩放公式:
total = base + (flat × (N-1)) + round(base × percent% × (N-1))
/bossarea edit <name> clearmobs
高级方法 —— setmobs
一条命令替换整个怪物列表:
/bossarea edit <name> setmobs minecraft:zombie 10 percent:25 flat:1, minecraft:skeleton 5
注意:setmobs 使用 percent: 和 flat: 前缀(值之前没有空格)。如果你觉得此语法令人困惑,请多次使用 addmob —— 它们在功能上是完全等效的。
Boss 序列
Boss 按顺序一次生成一个。每个 Boss 只有在上一个 Boss 死亡后才会生成。顺序由通过 reorderboss 设置的 order 值控制。
/bossarea edit <name> addboss minecraft:wither 1
在序列末尾添加一个 Boss。
/bossarea edit <name> addboss minecraft:wither 1 50 0
带有缩放:超出第 1 名玩家后每增加一名玩家额外 +50%,固定值 +0。
带有自定义 NBT(参见 自定义 NBT):
/bossarea edit <name> addboss minecraft:wither_skeleton 1 0 0 {CustomName:'"The Ancient"',Health:200f}
/bossarea edit <name> setboss <entity> <amount> [percent] [flat] [nbt]
用单个条目替换整个 Boss 列表(向后兼容的简写)。
/bossarea edit <name> clearboss
Boss 计时
/bossarea edit <name> bosstiming with_mobs
/bossarea edit <name> bosstiming after_clear
| 值 |
行为 |
with_mobs (默认) |
Boss #1 与怪物一同生成。每个后续 Boss 在前一个 Boss 和所有怪物死亡后生成。 |
after_clear |
必须先清除所有怪物,然后 Boss 依次生成。 |
重排 Boss
/bossarea edit <name> reorderboss "minecraft:wither" 0
/bossarea edit <name> reorderboss "mobs_woof:spawn_spectre" 1
order 值(0 = 第一个)控制生成顺序。对于 MobSpawnEntry 类型的 Boss 使用实体 ID,或者对于基于函数的 Boss 使用带引号的函数名。
数据包函数
函数允许通过数据包 .mcfunction 文件生成任何实体 —— 自定义怪物、模组实体、多实体组合等。BossArea 会通过你在 mcfunction 中添加的 记分板标签 来追踪生成的实体。
标签命名
| 角色 |
标签格式 |
区域 dungeon 的示例 |
mob |
bossarea_<zone> |
bossarea_dungeon |
boss |
bossarea_boss_<zone> |
bossarea_boss_dungeon |
你所在区域的精确标签会在 /bossarea info <name> 下的“Functions”部分显示。
在 mcfunction 中添加标签
将标签直接放在 summon 命令的 Tags:[...] NBT 中:
summon minecraft:cave_spider ~ ~ ~ {PersistenceRequired:1b,...,Tags:["bossarea_boss_dungeon"]}
如果你的实体使用 Passengers,请将标签添加到 坐骑和乘客 两者上,以便 BossArea 等待两者都死亡。
注册函数
简单(角色 mob,调用 1 次,无缩放):
/bossarea edit <name> addfunc mobs_woof:spawn_elite_zombie
带有缩放和角色:
/bossarea edit <name> addfuncscaled "mobs_woof:spawn_boss" 1 100 0 boss
参数:"function" count percent flat mob|boss
count = 基础调用次数(每次调用运行一次 mcfunction)
percent = 每增加一名玩家额外增加 X% 的调用次数
flat = 每增加一名玩家额外增加 X 次调用
mob = 实体计为普通怪物(必须在 after_clear 模式下 Boss 生成前死亡)
boss = 实体属于 Boss 序列
/bossarea edit <name> removefunc "mobs_woof:spawn_boss"
/bossarea edit <name> listfuncs
注意: 包含 : 的函数名在 addfuncscaled、removefunc 和 reorderboss 中必须用双引号括起来。
修改数据包 mcfunction 文件后,在游戏中运行 /reload 以应用更改,而无需重启服务器。
自定义 NBT
将自定义 NBT 数据传递给通过 addmob、addboss 或 setboss 添加的任何生物或 Boss。NBT 数据作为最后一个参数提供,位于 amount percent flat(数量、百分比、固定值)之后(这三个参数都必须提供,即使 percent 和 flat 为 0):
/bossarea edit <name> addboss minecraft:wither_skeleton 1 0 0 {CustomName:'"The Guardian"',Health:200f,Attributes:[{Id:"minecraft:generic.max_health",Base:200}]}
/bossarea edit <name> addmob minecraft:zombie 5 0 0 {HandItems:[{id:"minecraft:diamond_sword",Count:1b},{}],CustomName:'"Elite Zombie"'}
输入时会对 NBT 数据进行即时验证。建议先使用 /summon 命令(利用游戏内的自动补全功能)构建并测试你的 NBT 数据,然后再复制 {...} 部分。
门
使用魔杖选择门的体积区域,然后执行以下操作:
/bossarea edit <name> door set <doorName> <blocktype>
隐形门(没有可见方块的屏障):
/bossarea edit <name> door invisible <doorName>
通过坐标定义门(无需使用魔杖):
/bossarea edit <name> door setcoords <doorName> <x1> <y1> <z1> <x2> <y2> <z2> <blocktype>
/bossarea edit <name> door list
/bossarea edit <name> door remove <doorName>
door list 会显示可点击的 [A: x y z] / [B: x y z] 按钮,点击后可从聊天栏传送到各个角落。
注意: 门体积区域内的原始方块不会被保留——请为门设计一个专用的空框架。
计时
/bossarea edit <name> setgrace <seconds>
门关闭前的宽限期(默认:3 秒)。在此窗口期间离开的玩家将被移除出战斗。如果所有玩家都离开,战斗将完全取消。
/bossarea edit <name> setcooldown <seconds>
战斗结束后的冷却时间(默认:300 秒),在此期间房间无法再次触发。
胜利传送
/bossarea edit <name> setvictorytp <x> <y> <z>
在胜利时将幸存的参战玩家传送走(与所在区域相同的维度)。
/bossarea edit <name> setvictorytp <x> <y> <z> <dimension>
传送到指定维度。维度 ID 会在输入时立即进行验证。
| 维度 ID |
维度 |
minecraft:overworld |
主世界 |
minecraft:the_nether |
下界 |
minecraft:the_end |
末地 |
对于模组维度,请使用该模组的标识符(例如 aether:the_aether)。已死亡的玩家不会被传送。被传送的玩家会保持其朝向角(yaw)和俯仰角(pitch)。
/bossarea edit <name> clearvictorytp
消息
四个事件中的每一个都可以设置自定义消息或禁用:
| 事件 |
默认触发条件 |
grace |
玩家进入区域 |
combat |
门关闭,战斗开始 |
victory |
所有敌人被击败 |
defeat |
所有参战玩家死亡 |
/bossarea edit <name> setmessage <event> <text>
/bossarea edit <name> setmessage <event> default
/bossarea edit <name> setmessage <event> off
/bossarea edit <name> disablemessage <event>
/bossarea edit <name> enablemessage <event>
消息仅显示在动作栏上,仅对物理上位于区域内的玩家可见。
玩家进度
一旦一组玩家清空了房间,每个参战玩家(包括在最后一击前死亡的玩家)都会被永久标记为已完成。已完成的玩家可以自由通行——除非他们与至少一名尚未完成的玩家一起进入,此时所有人都会触发战斗。
/bossarea completed <name> <player>
显示该玩家是否已完成此房间。
/bossarea completed <name> <player> <true|false>
强制设置完成状态。false 重置进度(他们必须重新战斗)。true 授予免费通行权限。
可重复模式
/bossarea edit <name> setrepeatable true
/bossarea edit <name> setrepeatable false
当设置为 true 时,无论完成状态如何,每次都会触发战斗。
重置与调试
/bossarea forcereset <name>
立即完全重置:移除所有剩余实体,打开门,返回空闲状态。
/bossarea resettimer <name>
取消冷却时间或重启宽限倒计时,而不会中断正在进行的战斗。如果当前有活跃的战斗,则拒绝执行——在这种情况下请使用 forcereset。
完整示例
# 1. 获取魔杖并选择房间
/give @s bossarea:selection_wand
# 左键点击一个角落,右键点击对角角落
/bossarea set dragon_lair
# 2. 定义入口门(先用魔杖选择体积区域)
/bossarea edit dragon_lair door set entrance minecraft:stone
# 3. 普通生物
/bossarea edit dragon_lair addmob minecraft:zombie 8 20 1
/bossarea edit dragon_lair addmob minecraft:skeleton 4 20
# 4. 通过数据包函数依次生成两个 Boss
/bossarea edit dragon_lair addfuncscaled "mobs:spawn_spider_mount" 1 0 0 boss
/bossarea edit dragon_lair addfuncscaled "mobs:spawn_ancient_spectre" 1 0 0 boss
/bossarea edit dragon_lair reorderboss "mobs:spawn_spider_mount" 0
/bossarea edit dragon_lair reorderboss "mobs:spawn_ancient_spectre" 1
/bossarea edit dragon_lair bosstiming after_clear
# 5. 计时设置
/bossarea edit dragon_lair setgrace 3
/bossarea edit dragon_lair setcooldown 300
# 6. 在胜利时将幸存者传送至下界
/bossarea edit dragon_lair setvictorytp 100 64 200 minecraft:the_nether
# 7. 查看配置
/bossarea info dragon_lair
# 测试期间:立即跳过冷却时间
/bossarea resettimer dragon_lair
BossArea — Command Reference
Fabric 1.20.1 · Requires operator permission level 2
All data is saved in the world's data/bossarea.dat file and survives server restarts.
Table of Contents
Selection wand
/give @s bossarea:selection_wand
- Left-click a block → sets corner A
- Right-click a block → sets corner B
The selection outline displays as particles visible only to you, refreshed continuously while you hold the wand.
Creating and managing areas
/bossarea set <name>
Creates a new boss area from your current wand selection.
/bossarea remove <name>
/bossarea list
/bossarea info <name>
/bossarea status <name>
/bossarea enable <name> <true|false>
info shows the full configuration with clickable [edit] buttons that pre-fill commands in your chat bar. list shows all areas — click a name to open its info page. All commands that accept an area name support tab-autocomplete.
/bossarea edit <name> setcorners
Redefines the zone bounds from your current wand selection, preserving all existing configuration.
Mob waves
Mobs spawn in the central quarter of the zone (37.5%–62.5% on each axis) on a valid solid floor.
Simple method — addmob
/bossarea edit <name> addmob minecraft:zombie 10
→ 10 zombies per fight.
With optional player scaling:
/bossarea edit <name> addmob minecraft:zombie 10 25
→ 10 base zombies, +25% per player beyond the first.
/bossarea edit <name> addmob minecraft:zombie 10 25 1
→ same, plus +1 flat zombie per extra player.
Scaling formula for N players:
total = base + (flat × (N-1)) + round(base × percent% × (N-1))
/bossarea edit <name> clearmobs
Advanced method — setmobs
Replaces the entire mob list in one command:
/bossarea edit <name> setmobs minecraft:zombie 10 percent:25 flat:1, minecraft:skeleton 5
Note: setmobs uses percent: and flat: prefixes (no space before the value). Use addmob multiple times if you find this syntax confusing — it is strictly equivalent.
Boss sequence
Bosses spawn one at a time, in order. Each boss spawns only after the previous one is dead. The order is controlled by the order value set with reorderboss.
/bossarea edit <name> addboss minecraft:wither 1
Adds a boss at the end of the sequence.
/bossarea edit <name> addboss minecraft:wither 1 50 0
With scaling: +50% extra per player beyond the first, +0 flat.
With custom NBT (see Custom NBT):
/bossarea edit <name> addboss minecraft:wither_skeleton 1 0 0 {CustomName:'"The Ancient"',Health:200f}
/bossarea edit <name> setboss <entity> <amount> [percent] [flat] [nbt]
Replaces the entire boss list with a single entry (backward-compatible shorthand).
/bossarea edit <name> clearboss
Boss timing
/bossarea edit <name> bosstiming with_mobs
/bossarea edit <name> bosstiming after_clear
| Value |
Behaviour |
with_mobs (default) |
Boss #1 spawns alongside the mobs. Each subsequent boss spawns after the previous boss and all mobs are dead. |
after_clear |
All mobs must be cleared first, then bosses spawn one after another. |
Reordering bosses
/bossarea edit <name> reorderboss "minecraft:wither" 0
/bossarea edit <name> reorderboss "mobs_woof:spawn_spectre" 1
The order value (0 = first) controls the spawn sequence. Use the entity ID for MobSpawnEntry bosses, or the function name in quotes for function-based bosses.
Datapack functions
Functions allow spawning any entity — custom mobs, modded entities, multi-entity setups — via a datapack .mcfunction file. BossArea tracks the spawned entities via a scoreboard tag that you add in the mcfunction.
Tag naming
| Role |
Tag format |
Example for zone dungeon |
mob |
bossarea_<zone> |
bossarea_dungeon |
boss |
bossarea_boss_<zone> |
bossarea_boss_dungeon |
The exact tags for your zone are shown in /bossarea info <name> under "Functions".
Adding the tag in your mcfunction
Put the tag directly in the Tags:[...] NBT of the summon command:
summon minecraft:cave_spider ~ ~ ~ {PersistenceRequired:1b,...,Tags:["bossarea_boss_dungeon"]}
If your entity uses Passengers, add the tag to both the mount and the passenger so BossArea waits for both to die.
Registering a function
Simple (role mob, 1 call, no scaling):
/bossarea edit <name> addfunc mobs_woof:spawn_elite_zombie
With scaling and role:
/bossarea edit <name> addfuncscaled "mobs_woof:spawn_boss" 1 100 0 boss
Arguments: "function" count percent flat mob|boss
count = base number of calls (each call runs the mcfunction once)
percent = +X% more calls per extra player
flat = +X more calls per extra player
mob = entities count as normal mobs (must die before bosses spawn on after_clear)
boss = entities are part of the boss sequence
/bossarea edit <name> removefunc "mobs_woof:spawn_boss"
/bossarea edit <name> listfuncs
Note: function names containing : must be wrapped in double quotes in addfuncscaled, removefunc, and reorderboss.
After modifying a datapack mcfunction file, run /reload in-game to apply the changes without restarting the server.
Custom NBT
Pass custom NBT to any mob or boss added with addmob, addboss, or setboss. The NBT goes as the last argument, after amount percent flat (all three must be supplied, even if percent and flat are 0):
/bossarea edit <name> addboss minecraft:wither_skeleton 1 0 0 {CustomName:'"The Guardian"',Health:200f,Attributes:[{Id:"minecraft:generic.max_health",Base:200}]}
/bossarea edit <name> addmob minecraft:zombie 5 0 0 {HandItems:[{id:"minecraft:diamond_sword",Count:1b},{}],CustomName:'"Elite Zombie"'}
The NBT is validated immediately on entry. Build and test your NBT with /summon first (using in-game autocomplete), then copy the {...} block.
Doors
Select the door volume with the wand, then:
/bossarea edit <name> door set <doorName> <blocktype>
Invisible door (barrier without a visible block):
/bossarea edit <name> door invisible <doorName>
Define a door by coordinates (no wand needed):
/bossarea edit <name> door setcoords <doorName> <x1> <y1> <z1> <x2> <y2> <z2> <blocktype>
/bossarea edit <name> door list
/bossarea edit <name> door remove <doorName>
door list shows clickable [A: x y z] / [B: x y z] buttons that teleport you to each corner from chat.
Note: the original blocks inside the door volume are not preserved — design a dedicated empty frame for doors.
Timing
/bossarea edit <name> setgrace <seconds>
Grace period before doors close (default: 3 s). Players who leave during this window are removed from the fight. If all players leave, the fight is cancelled entirely.
/bossarea edit <name> setcooldown <seconds>
Cooldown after a fight ends (default: 300 s) before the room can trigger again.
Victory teleport
/bossarea edit <name> setvictorytp <x> <y> <z>
Teleports surviving engaged players on victory (same dimension as the zone).
/bossarea edit <name> setvictorytp <x> <y> <z> <dimension>
Teleports to a specific dimension. The dimension ID is validated immediately.
| Dimension ID |
Dimension |
minecraft:overworld |
Overworld |
minecraft:the_nether |
Nether |
minecraft:the_end |
The End |
For modded dimensions, use the mod's identifier (e.g. aether:the_aether). Players who died are not teleported. Teleported players keep their yaw and pitch.
/bossarea edit <name> clearvictorytp
Messages
Four events can each have a custom message or be disabled:
| Event |
Default trigger |
grace |
A player enters the zone |
combat |
Doors close, fight begins |
victory |
All enemies defeated |
defeat |
All engaged players are dead |
/bossarea edit <name> setmessage <event> <text>
/bossarea edit <name> setmessage <event> default
/bossarea edit <name> setmessage <event> off
/bossarea edit <name> disablemessage <event>
/bossarea edit <name> enablemessage <event>
Messages display on the actionbar only, visible to players physically inside the zone.
Player progression
Once a group clears a room, every engaged player (including those who died before the final blow) is permanently marked as having completed it. Completed players can walk through freely — unless they enter alongside at least one player who has not yet completed it, in which case the fight triggers for everyone.
/bossarea completed <name> <player>
Shows whether that player has completed this room.
/bossarea completed <name> <player> <true|false>
Forces the completion status. false resets progress (they must fight again). true grants free passage.
Repeatable mode
/bossarea edit <name> setrepeatable true
/bossarea edit <name> setrepeatable false
When true, the fight triggers every time regardless of completion status.
Reset and debug
/bossarea forcereset <name>
Immediate full reset: removes all remaining entities, reopens doors, returns to idle.
/bossarea resettimer <name>
Cancels the cooldown or restarts the grace countdown without interrupting an active fight. Refuses to act if a fight is currently active — use forcereset in that case.
Full example
# 1. Get the wand and select the room
/give @s bossarea:selection_wand
# Left-click one corner, right-click the opposite corner
/bossarea set dragon_lair
# 2. Define the entrance door (select volume with wand first)
/bossarea edit dragon_lair door set entrance minecraft:stone
# 3. Regular mobs
/bossarea edit dragon_lair addmob minecraft:zombie 8 20 1
/bossarea edit dragon_lair addmob minecraft:skeleton 4 20
# 4. Two bosses in sequence via datapack functions
/bossarea edit dragon_lair addfuncscaled "mobs:spawn_spider_mount" 1 0 0 boss
/bossarea edit dragon_lair addfuncscaled "mobs:spawn_ancient_spectre" 1 0 0 boss
/bossarea edit dragon_lair reorderboss "mobs:spawn_spider_mount" 0
/bossarea edit dragon_lair reorderboss "mobs:spawn_ancient_spectre" 1
/bossarea edit dragon_lair bosstiming after_clear
# 5. Timing
/bossarea edit dragon_lair setgrace 3
/bossarea edit dragon_lair setcooldown 300
# 6. Teleport survivors to the nether on victory
/bossarea edit dragon_lair setvictorytp 100 64 200 minecraft:the_nether
# 7. Review the config
/bossarea info dragon_lair
# During testing: skip the cooldown instantly
/bossarea resettimer dragon_lair
评论 0
登录后参与评分
还没有评论,来抢沙发吧