概要
こんばんわ。投稿時間的にはこんにちは。
かしわもちです。
最近となってプレイヤーモデルをいじった発光アドオンなどで「腕を振るアニメーションが再生されません!」
というのや、「槍のアニメーションがおかしい!」みたいなコメントをよく拝見します。
そして、プレイヤーモデルをいじっているアドオン鯖などもあったりするので、
アドオン制作者さんたちの参考になるかなと思って、対処法または解決法をまとめました。
解決方法
ほとんどの腕が動かなくなる原因が、
bedrock-samplesフォルダの、player.entity.jsonを参考にしている説
だと私は思います。
まず、bedrock-samplesフォルダのplayer.entity.jsonは何故か1.21.130以降から更新されてないです。
マイクソソフト恒例のやつですね。はい。
1.21.130以降だと槍が追加されているため、腕を振るアニメーションと槍のアニメーションが
別の奴に更新されているので、腕が動かなくなります。
そのため、以下のコードを参考にしてまた書き直してみてください。
{
"format_version": "1.26.0",
"minecraft:client_entity": {
"description": {
"identifier": "minecraft:player",
"materials": {
"default": "entity_alphatest",
"cape": "entity_alphatest",
"animated": "player_animated",
"spectator": "player_spectator"
},
"textures": {
"default": "textures/entity/steve",
"cape": "textures/entity/cape_invisible"
},
"geometry": {
"default": "geometry.humanoid.custom",
"cape": "geometry.cape"
},
"scripts": {
"scale": "0.9375",
"variables": {
"variable.fp_melee_spear_use_attachable_rotation_z": "public",
"variable.tp_melee_spear_use_attachable_rotation_z": "public",
"variable.fp_melee_spear_attack_attachable_rotation_z": "public",
"variable.tp_melee_spear_attack_attachable_position_z": "public",
"variable.attack_time": "public",
"variable.item_use_normalized": "public"
},
"initialize": [
"v.is_holding_right = 0.0;",
"v.is_blinking = 0.0;",
"v.last_blink_time = 0.0;",
"v.hand_bob = 0.0;",
"v.melee_spear_java_to_bedrock_scale = 40.0;"
],
"pre_animation": [
// Layers
"v.helmet_layer_visible = !query.has_head_gear;",
"v.leg_layer_visible = 1.0;",
"v.boot_layer_visible = 1.0;",
"v.chest_layer_visible = 1.0;",
// Body
"v.attack_body_rot_y = Math.sin(360 * Math.sqrt(v.attack_time)) * 10.0;",
"v.tcos0 = math.cos(query.modified_distance_moved * 38.17) * query.modified_move_speed / v.gliding_speed_value * 57.3;",
"v.first_person_item_rotation_factor = math.sin((1 - v.attack_time) * 180.0);",
"v.hand_bob = query.life_time < 0.01 ? 0.0 : v.hand_bob + ((query.is_on_ground && query.is_alive ? math.clamp(math.sqrt(math.pow(query.position_delta(0), 2.0) + math.pow(query.position_delta(2), 2.0)), 0.0, 0.1) : 0.0) - v.hand_bob) * 0.02;",
// Items
"v.map_angle = math.clamp(1 - v.player_x_rotation / 45.1, 0.0, 1.0);",
"v.item_use_duration = query.main_hand_item_use_duration > 0.0 ? (query.main_hand_item_max_duration - (query.main_hand_item_use_duration - query.frame_alpha + 1.0)) : 0.0;",
"v.item_use_normalized = query.main_hand_item_use_duration / query.main_hand_item_max_duration;",
// Riding
"v.riding_y_offset = query.is_riding_any_entity_of_type('minecraft:minecart', 'minecraft:boat', 'minecraft:chest_boat', 'minecraft:strider') ? -3.0 : 0.0;",
// Melee spear
"v.melee_spear_equipped = query.equipped_item_any_tag('slot.weapon.mainhand', 'minecraft:is_spear');",
"v.tp_melee_spear_base_arm_rotation_x = (query.is_swimming || query.is_gliding) ? (-115.0 - query.target_x_rotation) : (query.is_crawling ? -115.0 : -30.0);",
"(v.melee_spear_equipped) ? {",
// Melee spear use
" t.melee_spear_use_finish_raise_tick = query.kinetic_weapon_delay;",
" t.melee_spear_use_finish_sway_tick = t.melee_spear_use_finish_raise_tick + query.kinetic_weapon_dismount_duration;",
" t.melee_spear_use_start_sway_tick = t.melee_spear_use_finish_sway_tick - 20.0;",
" t.melee_spear_use_finish_lower_tick = t.melee_spear_use_finish_raise_tick + query.kinetic_weapon_knockback_duration;",
" t.melee_spear_use_start_lower_tick = t.melee_spear_use_finish_lower_tick - 40.0;",
" t.melee_spear_use_finish_raise_back_tick = t.melee_spear_use_finish_raise_tick + query.kinetic_weapon_damage_duration;",
" t.melee_spear_use_start_raise_back_tick = t.melee_spear_use_finish_raise_back_tick - 5.0;",
" t.melee_spear_use_raise_progress = math.clamp(math.inverse_lerp(0.0, t.melee_spear_use_finish_raise_tick, v.item_use_duration), 0.0, 1.0);",
" t.melee_spear_use_raise_progress_start = math.clamp(math.inverse_lerp(0.0, 0.5, t.melee_spear_use_raise_progress), 0.0, 1.0);",
" t.melee_spear_use_raise_progress_middle = math.clamp(math.inverse_lerp(0.5, 0.8, t.melee_spear_use_raise_progress), 0.0, 1.0);",
" t.melee_spear_use_raise_progress_end = math.clamp(math.inverse_lerp(0.8, 1.0, t.melee_spear_use_raise_progress), 0.0, 1.0);",
" t.melee_spear_use_sway_progress = math.clamp(math.inverse_lerp(t.melee_spear_use_start_sway_tick, t.melee_spear_use_finish_sway_tick, v.item_use_duration), 0.0, 1.0);",
" t.melee_spear_use_lower_progress = math.ease_in_out_elastic(0.0, 1.0, math.clamp(math.inverse_lerp(t.melee_spear_use_start_lower_tick, t.melee_spear_use_finish_lower_tick, v.item_use_duration - 20.0), 0.0, 1.0));",
" t.melee_spear_use_raise_back_progress = math.clamp(math.inverse_lerp(t.melee_spear_use_start_raise_back_tick, t.melee_spear_use_finish_raise_back_tick, v.item_use_duration), 0.0, 1.0);",
" t.melee_spear_use_sway_intensity = math.ease_out_circ(0.0, 2.0, t.melee_spear_use_sway_progress) + math.ease_in_circ(0.0, -2.0, t.melee_spear_use_raise_back_progress);",
" t.melee_spear_use_sway_scale_slow = math.sin(v.item_use_duration * 19.0) * t.melee_spear_use_sway_intensity;",
" t.melee_spear_use_sway_scale_fast = math.sin(v.item_use_duration * 30.0) * t.melee_spear_use_sway_intensity;",
// First person
" v.fp_melee_spear_use_item_position_x = (t.melee_spear_use_raise_progress_start * 0.05 + t.melee_spear_use_raise_progress_end * -0.05 + t.melee_spear_use_sway_scale_slow * 0.005) * v.melee_spear_java_to_bedrock_scale;",
" v.fp_melee_spear_use_item_position_y = (t.melee_spear_use_raise_progress_start * -0.075 + t.melee_spear_use_raise_progress_middle * 0.075 + t.melee_spear_use_sway_scale_fast * 0.01) * v.melee_spear_java_to_bedrock_scale;",
" v.fp_melee_spear_use_item_position_z = (t.melee_spear_use_raise_progress_start * 0.05 + t.melee_spear_use_raise_progress_end * -0.05 + t.melee_spear_use_sway_scale_slow * 0.005) * v.melee_spear_java_to_bedrock_scale;",
" v.fp_melee_spear_use_item_rotation_y = t.melee_spear_use_raise_progress * 20.0 + t.melee_spear_use_lower_progress * 20.0 + t.melee_spear_use_sway_scale_slow * 0.5 + t.melee_spear_use_raise_back_progress * -40.0;",
" v.fp_melee_spear_use_item_rotation_z = math.ease_in_out_back(0.0, -60.0, t.melee_spear_use_raise_progress) + t.melee_spear_use_lower_progress * -25.0 + t.melee_spear_use_raise_back_progress * 85.0 + t.melee_spear_use_sway_scale_fast * 0.5;",
" v.fp_melee_spear_use_attachable_rotation_z = math.clamp(math.inverse_lerp(0.5, 0.55, t.melee_spear_use_raise_progress), 0.0, 1.0) * -50.0 + t.melee_spear_use_sway_progress * 90.0 + t.melee_spear_use_raise_back_progress * -40.0;",
// Third person
" v.tp_melee_spear_use_arm_rotation_x = t.melee_spear_use_raise_progress_start * -40.0 + t.melee_spear_use_raise_progress_middle * 30.0 + t.melee_spear_use_raise_progress_end * -20.0 + t.melee_spear_use_lower_progress * 20.0 + t.melee_spear_use_raise_back_progress * 10.0;",
" v.tp_melee_spear_use_arm_rotation_x = v.tp_melee_spear_use_arm_rotation_x + t.melee_spear_use_sway_scale_slow * 0.6;",
" v.tp_melee_spear_use_arm_rotation_y = t.melee_spear_use_sway_scale_fast * 1.0;",
" v.tp_melee_spear_use_arm_rotation_z = t.melee_spear_use_sway_scale_slow * 0.5;",
" v.tp_melee_spear_use_item_rotation_x = t.melee_spear_use_raise_progress * 60.0 + t.melee_spear_use_raise_back_progress * -60.0;",
" v.tp_melee_spear_use_attachable_rotation_z = t.melee_spear_use_raise_progress * 90.0 + t.melee_spear_use_sway_progress * -90.0;",
// Melee spear attack
" t.melee_spear_attack_duration_ratio = 1.0 / query.base_swing_duration;",
" t.melee_spear_attack_raise_end = 0.05 * t.melee_spear_attack_duration_ratio;",
" t.melee_spear_attack_thrust_end = 0.2 * t.melee_spear_attack_duration_ratio;",
" t.melee_spear_attack_recover_start = 1.0 - (0.6 * t.melee_spear_attack_duration_ratio);",
" t.melee_spear_attack_raise_progress = math.clamp(math.inverse_lerp(0.0, t.melee_spear_attack_raise_end, v.attack_time), 0.0, 1.0);",
" t.melee_spear_attack_thrust_progress = math.clamp(math.inverse_lerp(t.melee_spear_attack_raise_end, t.melee_spear_attack_thrust_end, v.attack_time), 0.0, 1.0);",
" t.melee_spear_attack_recover_progress = math.clamp(math.inverse_lerp(t.melee_spear_attack_recover_start, 1.0, v.attack_time), 0.0, 1.0);",
" t.melee_spear_attack_raise_scale = math.ease_in_out_sine(0.0, 1.0, t.melee_spear_attack_raise_progress);",
" t.melee_spear_attack_thrust_scale = math.ease_in_quad(0.0, 1.0, t.melee_spear_attack_thrust_progress);",
" t.melee_spear_attack_recover_scale = math.ease_in_out_expo(0.0, 1.0, t.melee_spear_attack_recover_progress);",
// First person
" v.fp_melee_spear_attack_item_position_x = (t.melee_spear_attack_raise_scale * 0.1 + t.melee_spear_attack_thrust_scale * -0.1) * v.melee_spear_java_to_bedrock_scale;",
" v.fp_melee_spear_attack_item_position_y = (t.melee_spear_attack_raise_scale * -0.075 + t.melee_spear_attack_recover_scale * 0.075) * v.melee_spear_java_to_bedrock_scale;",
" v.fp_melee_spear_attack_item_position_z = (t.melee_spear_attack_raise_scale * 0.65 + t.melee_spear_attack_thrust_scale * -0.65) * v.melee_spear_java_to_bedrock_scale;",
" v.fp_melee_spear_attack_item_rotation_y = t.melee_spear_attack_raise_scale * 20.0 + t.melee_spear_attack_recover_scale * -20.0;",
" v.fp_melee_spear_attack_item_rotation_z = t.melee_spear_attack_raise_scale * -60.0 + t.melee_spear_attack_recover_scale * 60.0;",
" v.fp_melee_spear_attack_attachable_rotation_z = t.melee_spear_attack_raise_scale * 40.0 + t.melee_spear_attack_recover_scale * -40.0;",
// Third person
" v.tp_melee_spear_attack_arm_rotation_x = t.melee_spear_attack_raise_scale * 90.0 + t.melee_spear_attack_thrust_scale * -120.0 + t.melee_spear_attack_recover_scale * 30.0;",
" v.tp_melee_spear_attack_item_rotation_x = t.melee_spear_attack_thrust_scale * 60.0 + t.melee_spear_attack_recover_scale * -60.0;",
" v.tp_melee_spear_attack_attachable_position_z = (t.melee_spear_attack_thrust_scale * -0.15 + t.melee_spear_attack_recover_scale * 0.15) * v.melee_spear_java_to_bedrock_scale;",
"};"
],
"animate": [
"root"
],
"should_update_effects_offscreen": "1.0"
},
"animations": {
"root": "controller.animation.player.root",
"base_controller": "controller.animation.player.base",
"hudplayer": "controller.animation.player.hudplayer",
"humanoid_base_pose": "animation.humanoid.base_pose",
"look_at_target": "controller.animation.humanoid.look_at_target",
"look_at_target_ui": "animation.player.look_at_target.ui",
"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",
"look_at_target_inverted": "animation.player.look_at_target.inverted",
"cape": "animation.player.cape",
"move.arms": "animation.player.move.arms",
"move.legs": "animation.player.move.legs",
"swimming": "animation.player.swim",
"swimming.no_right_arm": "animation.player.swim.no_right_arm",
"swimming.legs": "animation.player.swim.legs",
"crawling": "animation.player.crawl",
"crawling.no_right_arm": "animation.player.crawl.no_right_arm",
"crawling.legs": "animation.player.crawl.legs",
"riding.root": "animation.player.riding.root",
"riding.arms": "animation.player.riding.arms",
"riding.legs": "animation.player.riding.legs",
"holding": "animation.player.holding",
"holding_heavy_core": "animation.player.holding_heavy_core",
"brandish_spear": "animation.humanoid.brandish_spear",
"holding_spyglass": "animation.humanoid.holding_spyglass",
"charging": "animation.humanoid.charging",
"attack.positions": "animation.player.attack.positions",
"attack.rotations": "animation.player.attack.rotations",
"sneaking": "animation.player.sneaking",
"bob": "animation.player.bob",
"damage_nearby_mobs": "animation.humanoid.damage_nearby_mobs",
"bow_and_arrow": "animation.humanoid.bow_and_arrow",
"use_item_progress": "animation.humanoid.use_item_progress",
"skeleton_attack": "animation.skeleton.attack",
"sleeping": "animation.player.sleeping",
"first_person_base_pose": "animation.player.first_person.base_pose",
"first_person_empty_hand": "animation.player.first_person.empty_hand",
"first_person_swap_item": "animation.player.first_person.swap_item",
"first_person_shield_block": "animation.player.first_person.shield_block",
"first_person_attack_controller": "controller.animation.player.first_person_attack",
"first_person_attack_rotation": "animation.player.first_person.attack_rotation",
"first_person_vr_attack_rotation": "animation.player.first_person.vr_attack_rotation",
"first_person_walk": "animation.player.first_person.walk",
"first_person_map_controller": "controller.animation.player.first_person_map",
"first_person_map_hold": "animation.player.first_person.map_hold",
"first_person_map_hold_attack": "animation.player.first_person.map_hold_attack",
"first_person_map_hold_off_hand": "animation.player.first_person.map_hold_off_hand",
"first_person_map_hold_main_hand": "animation.player.first_person.map_hold_main_hand",
"first_person_crossbow_equipped": "animation.player.first_person.crossbow_equipped",
"third_person_crossbow_equipped": "animation.player.crossbow_equipped",
"third_person_bow_equipped": "animation.player.bow_equipped",
"first_person_melee_spear_use": "animation.player.first_person.melee_spear_use",
"first_person_melee_spear_hold": "animation.player.first_person.melee_spear_hold",
"first_person_melee_spear_attack": "animation.player.first_person.melee_spear_attack",
"first_person_melee_spear_controller": "controller.animation.player.first_person_melee_spear",
"third_person_melee_spear_use": "animation.humanoid.melee_spear_use",
"third_person_melee_spear_hold": "animation.humanoid.melee_spear_hold",
"third_person_melee_spear_attack": "animation.player.melee_spear_attack",
"third_person_melee_spear_controller": "controller.animation.player.melee_spear",
"crossbow_hold": "animation.player.crossbow_hold",
"crossbow_controller": "controller.animation.player.crossbow",
"shield_block_main_hand": "animation.player.shield_block_main_hand",
"shield_block_off_hand": "animation.player.shield_block_off_hand",
"blink": "controller.animation.persona.blink",
"tooting_goat_horn": "animation.humanoid.tooting_goat_horn",
"holding_brush": "animation.humanoid.holding_brush",
"brushing": "animation.humanoid.brushing"
},
"render_controllers": [
{ "controller.render.player.first_person_spectator": "variable.is_first_person && query.is_spectator" },
{ "controller.render.player.third_person_spectator": "!variable.is_first_person && !variable.map_face_icon && query.is_spectator" },
{ "controller.render.player.first_person": "variable.is_first_person && !query.is_spectator" },
{ "controller.render.player.third_person": "!variable.is_first_person && !variable.map_face_icon && !query.is_spectator" },
{ "controller.render.player.map": "variable.map_face_icon" }
],
"enable_attachables": true
}
}
}
これは 1.21.130以降に更新された現在使われているplayer.entity.jsonの中身です。
これを動かなくなったアドオンと合体させたら腕も戻ります。
ちなみに、毎回ここにアクセスしてコピペもめんどくさいと思うので
Windowの方限定ですが、このコードが乗っている場所を教えます。
コードの在処
まず、Win+Rキーを押すと左下によくわからないやつが出てきます。
この下にあるヤツですね。

こいつは、ファイルのパスを書いた場所へと移動させてくれます。
他の機能もありますけど。
そして、名前の部分に
C:\XboxGames\Minecraft for Windows\Content\data\resource_packs\vanilla_1.21.130と書いてから、OKボタンを押してください。参照は違いますよ。
そうしたら、下の画像のようなフォルダが開かれると思います。

そしたらentityフォルダの中にさきほどのコードとして掲載したplayer.entity.jsonがあるので、
これで毎回このブログにアクセスしなくてもよくなります。
注意
マイクラの非公式ランチャーを使っている方はそもそもフォルダが開かれず、
存在しないパスだとエラーが出てくるので気を付けてください!
最後に
意外とMinecraft日本アドオンコミュニティとかだと知られてる情報なんですけど、修正されない
アドオンがいくつもあるので書いてみました。
アドオンがもっと活発になるといいですね。
それではさようなら。



コメント