first commit
This commit is contained in:
59
docs/mcguide/20-玩法开发/15-自定义游戏内容/1-自定义物品/7-自定义桶.md
Normal file
59
docs/mcguide/20-玩法开发/15-自定义游戏内容/1-自定义物品/7-自定义桶.md
Normal file
@@ -0,0 +1,59 @@
|
||||
---
|
||||
front:
|
||||
hard: 入门
|
||||
time: 分钟
|
||||
---
|
||||
|
||||
# 自定义桶
|
||||
|
||||
## 概述
|
||||
|
||||
自定义桶主要用于装载自定义流体,一般需配合自定义流体使用,使用后可以倒出指定的流体方块
|
||||
|
||||
|
||||
|
||||
## custom_item_type设置
|
||||
|
||||
- 自定义桶的**custom_item_type**需要设为**bucket**
|
||||
|
||||
|
||||
|
||||
## 注册
|
||||
|
||||
1. 与自定义基础物品的注册1-6步相同
|
||||
2. 在behavior/netease_items_beh的json中设置custom_item_type为**bucket**
|
||||
3. 添加自定义桶相关的定义,包括一个必填的**netease:bucket组件**,组件的参数见[json组件](#json组件)。注:自定义桶的最大堆叠数为1,无法通过max_stack_size进行修改
|
||||
|
||||
|
||||
|
||||
```json
|
||||
{
|
||||
"format_version": "1.10",
|
||||
"minecraft:item": {
|
||||
"description": {
|
||||
"identifier": "customBucket:green_bucket",
|
||||
"custom_item_type": "bucket",
|
||||
"register_to_create_menu": true
|
||||
},
|
||||
"components": {
|
||||
"netease:bucket": {
|
||||
"fill_liquid": "flowing_green_water"
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
## JSON组件
|
||||
|
||||
### 网易components
|
||||
|
||||
* netease:bucket
|
||||
|
||||
| 键 | 类型 | 默认值 | 解释 |
|
||||
| ----------- | ------ | --------------- | ---------------------------- |
|
||||
| fill_liquid | string | "flowing_water" | 可选,使用时倒出的流体方块id |
|
||||
|
||||
**注:该流体方块需为自定义流体的动态流体**
|
||||
Reference in New Issue
Block a user