mirror of
https://github.com/Mojang/bedrock-samples.git
synced 2024-11-27 05:48:55 +00:00
46 lines
1.7 KiB
JSON
46 lines
1.7 KiB
JSON
{
|
|
"format_version": "1.10.0",
|
|
"minecraft:attachable": {
|
|
"description": {
|
|
"identifier": "minecraft:crossbow",
|
|
"materials": {
|
|
"default": "entity_alphatest",
|
|
"enchanted": "entity_alphatest_glint"
|
|
},
|
|
"textures": {
|
|
"default": "textures/items/crossbow_standby",
|
|
"crossbow_pulling_0": "textures/items/crossbow_pulling_0",
|
|
"crossbow_pulling_1": "textures/items/crossbow_pulling_1",
|
|
"crossbow_pulling_2": "textures/items/crossbow_pulling_2",
|
|
"crossbow_arrow": "textures/items/crossbow_arrow",
|
|
"crossbow_rocket": "textures/items/crossbow_firework",
|
|
"enchanted": "textures/misc/enchanted_item_glint"
|
|
},
|
|
"geometry": {
|
|
"default": "geometry.crossbow_standby",
|
|
"crossbow_pulling_0": "geometry.crossbow_pulling_0",
|
|
"crossbow_pulling_1": "geometry.crossbow_pulling_1",
|
|
"crossbow_pulling_2": "geometry.crossbow_pulling_2",
|
|
"crossbow_arrow": "geometry.crossbow_arrow",
|
|
"crossbow_rocket": "geometry.crossbow_rocket"
|
|
},
|
|
"animations": {
|
|
"wield": "animation.crossbow.wield",
|
|
"wield_first_person_pull": "animation.crossbow.wield_first_person_pull"
|
|
},
|
|
"scripts": {
|
|
"pre_animation": [
|
|
"variable.charge_amount = math.clamp((query.main_hand_item_max_duration - (query.main_hand_item_use_duration - query.frame_alpha + 1.0)) / 10.0, 0.0, 1.0f);"
|
|
],
|
|
"animate": [
|
|
"wield",
|
|
{
|
|
"wield_first_person_pull": "query.main_hand_item_use_duration > 0.0f && c.is_first_person"
|
|
}
|
|
]
|
|
},
|
|
"render_controllers": [ "controller.render.crossbow" ]
|
|
}
|
|
}
|
|
}
|