1
0
mirror of https://github.com/Mojang/bedrock-samples.git synced 2024-11-27 04:38:56 +00:00
bedrock-samples/resource_pack/entity/camel.entity.json
Mike Ammerlaan e304be6ab8 v1.20.80.5
2024-04-23 09:20:49 -07:00

59 lines
2.1 KiB
JSON

{
"format_version": "1.8.0",
"minecraft:client_entity": {
"description": {
"identifier": "minecraft:camel",
"materials": {
"default": "camel"
},
"textures": {
"default": "textures/entity/camel/camel"
},
"geometry": {
"default": "geometry.camel"
},
"spawn_egg": {
"base_color": "#fcc369",
"overlay_color": "#cb9337"
},
"scripts": {
"pre_animation": [
"variable.dash_cooldown = (!(variable.last_dash_cooldown ?? true) && query.has_dash_cooldown) ? 2.75 : ( variable.dash_cooldown ?? 0 );",
"variable.dash_cooldown = math.max(0, variable.dash_cooldown-query.delta_time);",
"variable.dash_cooldown_progress = (2.75 - variable.dash_cooldown) / 2.75;",
"variable.last_dash_cooldown = query.has_dash_cooldown;",
"variable.moving = query.modified_move_speed > 0.05 || query.vertical_speed > 0.05;",
"variable.xTargetRot = math.clamp(query.target_x_rotation, -30, 30);",
"variable.xHeadRot = variable.dash_cooldown_progress > 0 ? math.clamp(variable.xTargetRot + (45 * (1 - variable.dash_cooldown_progress)), -25, 70) : variable.xTargetRot;",
"variable.yHeadRot = math.clamp(query.target_y_rotation, -30, 30);"
]
},
"animations": {
"moving": "animation.camel.walk",
"sit_down": "animation.camel.sit_down",
"sitting": "animation.camel.sit",
"stand_up": "animation.camel.stand_up",
"look_at_target": "animation.camel.look_at_target",
"dashing": "animation.camel.dash",
"dashing_sound": "animation.camel.dash_sound",
"idle": "animation.camel.idle"
},
"sound_effects": {
"sit_down": "mob.camel.sit",
"stand_up": "mob.camel.stand",
"dash": "mob.camel.dash"
},
"animation_controllers": [
{
"general": "controller.animation.camel.general"
},
{
"idle": "controller.animation.camel.idle"
}
],
"render_controllers": [
"controller.render.camel"
]
}
}
}