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

minecraft:buoyant

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

概览

minecraft:buoyant 是一个实体组件:写在自定义生物的 components 对象中,或其中某个组件组里。 让实体像船一样漂浮在水等液体表面,还可以让它随波起伏。

字段

字段类型默认值说明
apply_gravityBoolean"true"每刻都把实体往下拉,这会让波浪运动更明显,但离开液体时也会下落得更猛。
base_buoyancyDecimal"1.0"实体向上浮的力度,数值越大浮得越高。
big_wave_probabilityDecimal"0.03"大浪打到实体的概率,仅在 "waves" 运动类型下使用。
big_wave_speedDecimal"10.0"大浪的速度倍数。
can_auto_step_from_liquidBoolean"false"实体被推到旁边的固体方块时,可以从液体中爬上去。
drag_down_on_buoyancy_removedDecimal"0.0"移除这个组件时实体被往下拉的力度。
liquid_blocksList无实体可以漂浮在上面的液体方块。
movement_typeString"waves"上下起伏的方式:"waves"、"bobbing" 或 "none"。

示例

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

BP/entities/<name>.json
{
  "minecraft:buoyant": {
    "apply_gravity": "true",
    "base_buoyancy": "1.0",
    "big_wave_probability": "0.03",
    "big_wave_speed": "10.0",
    "can_auto_step_from_liquid": "false",
    "drag_down_on_buoyancy_removed": "0.0",
    "liquid_blocks": {},
    "movement_type": "waves"
  }
}

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