#カスタムエンティティにトロッコの仕様を追加しても適切に動かない
1 messages · Page 1 of 1 (latest)
ありがとうございます
ビヘパのruntime_identifierをminecraft:minecartから独自のものにして、代わりに変数rail_movementを追加して、physics, collision_boxの2つをトロッコのものにしてみましたが、なんかまだ方角が固定されてるし、レールを走るものの常にぴょんぴょん飛び跳ねるんですよね……どうしたものか
minecraft:movement.basicにおけるmax_turnの角度を大きくすれば、方角の固定がマシになったりしませんかね、、、?
おそらくrail_movementコンポーネントがあると機能しないようです
現状こんな感じですね
摩擦が強いのと、レールにスナップできていないところでしょうか
{
"format_version": "1.20.0",
"minecraft:entity": {
"description": {
"identifier": "sta:test_entity",
"is_spawnable": true,
"is_summonable": true,
"is_experimental": false,
"runtime_identifier": "minecraft_minecart"
},
"components": {
"minecraft:is_stackable": {},
"minecraft:type_family": {
"family": [
"inanimate"
]
},
"minecraft:collision_box": {
"width": 0.98,
"height": 7
},
"minecraft:rail_movement": {},
"minecraft:rail_sensor": {
"eject_on_activate": true
},
"minecraft:health": {
"value": 1,
"max": 1
},
"minecraft:physics": {
"has_gravity": false,
"has_collision": true
},
"minecraft:pushable": {
"is_pushable": true,
"is_pushable_by_piston": true
},
"minecraft:rideable": {
"seat_count": 2,
"family_types": ["player"],
"interact_text": "action.interact.ride.test_entity",
"seats": [
{ "position": [0.7, 0.4, -1.6] },
{ "position": [-0.7, 0.4, -1.6] }
]
},
"minecraft:damage_sensor": {
"triggers": [
{
"on_damage": { "filters": { "test": "is_family", "subject": "other", "value": "player" } },
"deals_damage": true
}
]
},
"minecraft:loot": {
"table": "loot_tables/entities/test_entity"
}
}
}
}
進行方向へ車体が動かないのは仕様の可能性が高いです。
minecartのリソパでは、v.rail_rotationという謎のvarによってアニメーションによって向きが制御されています。
そのため、「進行方向へ車体を向ける」アニメーションを常時実行する必要があります