Files
netease-modsdk-wiki/docs/mcguide/20-玩法开发/15-自定义游戏内容/2-自定义方块/3-特殊方块/1-自定义刷怪箱.md
2025-03-18 14:46:12 +08:00

27 lines
1.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
front:
hard: 入门
time: 分钟
---
# 自定义刷怪箱
## base_block设置
- **自定义刷怪箱方块的base_block需要设为mob_spawner**
- **还应在blocks.json中进行如下设置**
![special-3](.././picture/customblock/special-3.png)
## netease:mob_spawner
可在netease:mob_spawner组件中设置刷怪的类型目前支持原生生物、微软自定义生物。
| 键 | 类型 | 默认值 | 解释 |
| ---- | ------ | ------ | -------------------------------- |
| type | string | | 必须设置,用于控制生成的生物类型 |
- 原生生物type为"minecraft:Namespaced ID",如"minecraft:parrot"Namespaced ID可参考[官方wiki](https://zh.minecraft.wiki/w/%E5%9F%BA%E5%B2%A9%E7%89%88%E6%95%B0%E6%8D%AE%E5%80%BC/%E5%AE%9E%E4%BD%93ID)中各Mob的详细信息。
- 微软自定义生物type为"minecraft:entity"中"description"的"identifier"项,可参考[自定义生物文档](../../3-自定义生物/01-自定义基础生物.md)及[CustomBlocksMod](../../../13-模组SDK编程/60-Demo示例.md#CustomBlocksMod)中的customblocks_test_mobspawner1.json。