1
0
mirror of https://github.com/Mojang/bedrock-samples.git synced 2025-10-23 17:34:18 +00:00
Files
bedrock-samples/resource_pack/entity/piglin.entity.json
2025-10-22 08:56:34 -07:00

89 lines
3.9 KiB
JSON

{
"format_version": "1.10.0",
"minecraft:client_entity": {
"description": {
"identifier": "minecraft:piglin",
"materials": {
"default": "piglin"
},
"textures": {
"default": "textures/entity/piglin/piglin"
},
"geometry": {
"default": "geometry.piglin"
},
"spawn_egg": {
"texture": "spawn_egg_piglin"
},
"scripts": {
"pre_animation": [
"variable.tcos0 = (Math.cos(query.modified_distance_moved * 38.17) * query.modified_move_speed / variable.gliding_speed_value) * 57.3;",
"variable.attack = Math.sin((1.0 - (1.0 - variable.attack_time) * (1.0 - variable.attack_time)) * 180.0) * 57.3;",
"variable.attack2 = Math.sin(variable.attack_time * 180.0) * 57.3;",
"variable.z_bob = Math.cos(query.life_time * 103.13244) * 2.865 + 2.865;",
"variable.x_bob = Math.sin(query.life_time * 76.776372) * 2.865;",
"variable.riding_y_offset_baby_scaling = query.is_baby ? -3.5 : 0.0;",
"variable.riding_y_offset_with_respect_to_player = 1.0;",
"variable.riding_y_offset_on_vehicle_where_other_entites_can_stand = query.is_riding_any_entity_of_type('minecraft:minecart', 'minecraft:boat', 'minecraft:chest_boat') ? -3.0 : 0.0;",
"variable.unscaled_riding_y_offset = variable.riding_y_offset_with_respect_to_player + variable.riding_y_offset_on_vehicle_where_other_entites_can_stand;",
"variable.riding_y_offset = variable.riding_y_offset_baby_scaling * math.abs(variable.unscaled_riding_y_offset) + variable.unscaled_riding_y_offset + variable.riding_y_offset_baby_scaling * 0.2f;"
],
"animate": [
{
"admire": "query.is_admiring"
},
{
"humanoid_big_head": "query.is_baby"
},
{
"celebrate_hunt": "query.is_celebrating"
},
{
"celebrate_hunt_special": "query.is_celebrating_special"
},
"move",
"bob",
"look_at_target_controller",
"piglin_attack_controller",
"riding_controller"
],
"variables": {
"variable.item_use_normalized": "public",
"variable.tp_melee_spear_attachable_rotation_z": "public"
},
"initialize": [
"v.tp_melee_spear_base_arm_rotation_x = -30.0;"
],
"should_update_effects_offscreen": "1.0"
},
"animations": {
"move": "animation.piglin.move",
"bob": "animation.humanoid.bob",
"humanoid_big_head": "animation.humanoid.big_head",
"admire": "animation.piglin.admire",
"celebrate_hunt": "animation.piglin.celebrate_hunt",
"celebrate_hunt_special": "animation.piglin.celebrate_hunt_special",
"look_at_target_controller": "controller.animation.humanoid.look_at_target",
"look_at_target_default": "animation.humanoid.look_at_target.default",
"look_at_target_gliding": "animation.humanoid.look_at_target.gliding",
"look_at_target_swimming": "animation.humanoid.look_at_target.swimming",
"piglin_attack_controller": "controller.animation.piglin.attack",
"crossbow_hold": "animation.piglin.crossbow.hold",
"crossbow_charge": "animation.piglin.crossbow.charge",
"melee_attack": "animation.piglin.sword.attack",
"hand_attack": "animation.piglin.hand.attack",
"riding_controller": "controller.animation.humanoid.riding",
"riding.arms": "animation.humanoid.riding.arms",
"riding.legs": "animation.humanoid.riding.legs",
"riding.body": "animation.humanoid.riding.body",
"melee_spear_use": "animation.humanoid.melee_spear_use",
"melee_spear_hold": "animation.humanoid.melee_spear_hold",
"melee_spear_controller": "controller.animation.humanoid.melee_spear"
},
"render_controllers": [
"controller.render.piglin"
],
"enable_attachables": true
}
}
}