Files
netease-bedrock-wiki/mconline/10-addon教程/第12章:更完善的自定义掉落物/课程05.简易教学①自定义掉落一种颜色的羊毛.md
2026-03-09 14:14:44 +08:00

57 lines
946 B
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: https://mc.res.netease.com/pc/zt/20201109161633/mc-dev/assets/img/4_1.af85ce66.jpg
hard: 进阶
time: 10分钟
---
# 简易教学①:自定义掉落一种颜色的羊毛
#### 作者:境界
![](./images/5_1.jpg)
1创建一个在行为包主目录中loot_tables文件夹下的战利品配置文件。
2根据内容格式写入
```
{
"pools": [
{
"rolls": 1,
"entries": []
}
]
}
```
由于只掉落一种颜色的羊毛筛选次数写1即可
3插入战利品内容
```
{
"pools": [
{
"rolls": 1,
"entries": [
{"type": "item", "name": "minecraft:wool", "function": [{"function": "set_data", "data":15}]}
]
}
]
}
```
将战利品类型设置为物品将物品名称设置为minecraft:wool最后再加入战利品功能设置物品附加值为15这样就会在战利品出现时出现一个黑色羊毛。