1. Wiki
  2. /实体
  3. /minecraft:rideable

minecraft:rideable

不想手写?在 GodCraft 里打开一个开关,就能帮你设置好 minecraft:rideable。Get GodCraft

概览

minecraft:rideable 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 让其他实体可以骑乘这个实体,并设置座位。可用于坐骑、载具或会载乘客的生物。

字段

字段类型默认值说明
controlling_seatInteger"0"哪个座位属于驾驶者;第一个座位是 0。
crouching_skip_interactBoolean"true"为 true 时,潜行的玩家无法与它互动,这样他们可以做别的事。
dismount_modeEnumerator"default"骑乘者下来后的位置:default 把他们放到附近安全的地面,on_top_center 把他们放到实体顶部。
family_typesList无允许骑乘的实体的家族名称。
interact_textString无触屏玩家可以骑上去时显示的按钮文字。
on_rider_enter_eventString无有人骑上来时在这个实体上运行的事件。
on_rider_exit_eventString无有人下来时在这个实体上运行的事件。
passenger_max_widthDecimal"0.00"骑乘者的最大宽度;设为 0 表示不限大小。
priorityInteger"N/A"已不再使用的旧字段。
pull_in_entitiesBoolean"false"为 true 时,附近允许家族的实体会被拉进空座位,就像船会把生物拉上来。
rider_can_interactBoolean"false"为 true 时,骑乘者可以看着这个实体来选中并与它互动。
seat_countInteger"1"同时能坐多少个骑乘者。
seatsList无每个骑乘者的座位位置和设置。

示例

写在 BP/entities/<name>.json 的 components 对象中(值为默认值或占位值):

BP/entities/<name>.json
{
  "minecraft:rideable": {
    "controlling_seat": "0",
    "crouching_skip_interact": "true",
    "dismount_mode": "default",
    "family_types": {},
    "interact_text": "",
    "on_rider_enter_event": "",
    "on_rider_exit_event": "",
    "passenger_max_width": "0.00"
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more