feat:上传mcguide-开发指南部份
This commit is contained in:
90
mcguide/20-玩法开发/15-自定义游戏内容/3-自定义生物/03-生物位置绑定.md
Normal file
90
mcguide/20-玩法开发/15-自定义游戏内容/3-自定义生物/03-生物位置绑定.md
Normal file
@@ -0,0 +1,90 @@
|
||||
---
|
||||
front:
|
||||
hard: 入门
|
||||
time: 分钟
|
||||
---
|
||||
|
||||
# 实体位置绑定
|
||||
|
||||
开发者也可以在entity json中增加位置组件来增加可以骑乘的位置,该组件以 `minecraft:rideable` 开头,以**minecraft:boat**:
|
||||
|
||||
```json
|
||||
"format_version": "1.13.0",
|
||||
"minecraft:entity": {
|
||||
"description": {
|
||||
"identifier": "minecraft:boat",
|
||||
"is_spawnable": false,
|
||||
"is_summonable": true,
|
||||
"is_experimental": false
|
||||
},
|
||||
|
||||
"components": {
|
||||
//省略不关注的组件
|
||||
"minecraft:rideable": {
|
||||
"seat_count": 2,
|
||||
"interact_text": "action.interact.ride.boat",
|
||||
"pull_in_entities": true,
|
||||
|
||||
"seats": [
|
||||
{
|
||||
"position": [ 0.0, -0.2, 0.0 ],
|
||||
"min_rider_count": 0,
|
||||
"max_rider_count": 1,
|
||||
|
||||
"rotate_rider_by": -90,
|
||||
"lock_rider_rotation": 90
|
||||
},
|
||||
{
|
||||
"position": [ 0.2, -0.2, 0.0 ],
|
||||
"min_rider_count": 2,
|
||||
"max_rider_count": 2,
|
||||
|
||||
"rotate_rider_by": -90,
|
||||
"lock_rider_rotation": 90
|
||||
},
|
||||
{
|
||||
"position": [ -0.6, -0.2, 0.0 ],
|
||||
"min_rider_count": 2,
|
||||
"max_rider_count": 2,
|
||||
"lock_rider_rotation": 90
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**minecraft:horse_wild**:
|
||||
|
||||
```
|
||||
"minecraft:rideable": {
|
||||
"seat_count": 1,
|
||||
"family_types": [
|
||||
"player",
|
||||
"zombie"
|
||||
],
|
||||
"interact_text": "action.interact.mount",
|
||||
"seats": {
|
||||
"position": [ 0.0, 1.1, -0.2 ]
|
||||
}
|
||||
|
||||
},
|
||||
```
|
||||
|
||||
**参数解释**:
|
||||
|
||||
- seat_count:默认值 1, 改生物拥有的骑乘位置数目
|
||||
- crouching_skip_interact:默认值 true,为true时,如果与该实体互动的实体蹲伏,则无法与该实体互动
|
||||
- interact_text:默认值“” ,与玩家交互时显示的UI按钮上的文本内容
|
||||
- family_types:默认值 ”“,能够骑乘该实体的实体种类
|
||||
- controlling_seat:默认值 0, 控制该实体的位置index
|
||||
- pull_in_entities:默认值 false,如果为true,则此实体会将正确family_type的实体拉入任何可用的座位
|
||||
- rider_can_interact:默认值 false,如果为true,则由骑手查看时将选择此实体
|
||||
- seats: 默认值 “”,位置的详细内容:
|
||||
- position:默认值 [0.0,0.0,0.0],该座位的位置相对于该实体的位置
|
||||
- min_rider_count:默认值 0, 定义在可以使用此座位之前必须乘坐此实体的最少乘客数量
|
||||
- max_rider_count:默认值 0,定义在可以使用此座位之前必须乘坐此实体的最大乘客数量
|
||||
- rotate_rider_by:默认值 0.0,骑乘者旋转角度
|
||||
- lock_rider_rotation:默认值 181.0,允许骑乘者在旋转此实体时旋转的角度(以度为单位),忽略此设置时则无限制。
|
||||
Reference in New Issue
Block a user