# 自定义区域 BOSS

## 什么是自定义区域 BOSS？

请 [点击这里](/elitemobs-wiki/ming-ci-jie-shi.md) 查看。

## 配置选项

这些配置选项是添加到自定义怪物配置中的，请 [点击这里](/elitemobs-wiki/pei-zhi/zi-ding-yi-guai-wu.md) 查看有关信息。

#### isRegionalBoss

`isRegionalBoss: true`

设置该怪物是否是区域 Boss，在这里你需要填写 `true`。

#### spawnLocation

设置生成坐标。你可以在游戏中输入 `/em addSpawnLocation [文件名称.yml]` 来设置生成位置。

#### spawnCooldown

`spawnCooldown: 60`

设置怪物的生成冷却时间，以分钟为单位。

#### leashRadius

`leashradius: 30`

设置怪物拉回距离，以 `spawnLocation`  坐标为半径。**请不要将其设置过低，否则会给玩家带来极其糟糕的游戏体验！**

#### onSpawnBlockStates 和 onRemoveBlockStates

设置区域 Boss 在生成和死亡/逃跑等被移除时放置或者移除的方块。

**这是一个非常炫酷的功能，你可以用它制作一个 BOSS 房间的大门、BOSS 专属挑战场地等！**

#### **相关指令：**

**/em registerblocks \<regional\_boss\_file.yml> \<on\_spawn/on\_remove>**

开启新建方块记录模式，其中：

* regional\_boss\_file.yml 即为 BOSS 的文件名称。
* on\_spawn 即为记录变更在怪物生成时生效。
* on\_remove 即为记录变更在怪物移除时生效。

要想创建在对应条件下生效时的记录变更，你只需要破坏或者挖掘方块即可，这代表在怪物生成或者移除时，这些方块会根据你的记录发生变化，也就是放置或者破坏。

举一个例子，当你进入 on\_spawn 时的方块记录模式时，此时你挖掘了一个位置的方块，那么在怪物生成时，这个位置的方块将会被移除。

请注意 on\_spawn 和 on\_remove 不同步，你需要分别设置。同时，需要保证你是以怪物的生成位置为中心进行记录，否则出现野外怪物生成了，方块在主城位置生成了这种尴尬局面。

**/em registerblocksedit \<regional\_boss\_file.yml> \<on\_spawn/on\_remove>**

同上，只是为编辑方块记录模式，在此模式下你可以更改已经被记录的方块的数据。

**/em registerblocksarea \<regional\_boss\_file.yml> \<on\_spawn/on\_remove>**

与 `/em registerblocks <regional_boss_file.yml> <on_spawn/on_remove>` 类似，但是允许你像创世神那样圈一片区域。出于安全考虑，默认情况下最多只能是 200 格的区域，你可以在 config.yml 修改它。

**/em registerblocksareaedit \<regional\_boss\_file.yml> \<on\_spawn/on\_remove>**

不再赘述，为圈区域下的编辑模式。

**/em cancelblocks**

取消上一次方块记录。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.superiormc.cn/elitemobs-wiki/pei-zhi/zi-ding-yi-qu-yu-boss.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
