[TaCZ] Timeless and Classics Zero

[TaCZ] Timeless and Classics Zero

3M Downloads

在1.20.1加载自定义枪械包时BedrockAnimation.getBones()返回null导致调用entrySet()时触发了空指针异常

ykmawa opened this issue · 2 comments

commented

在加载自定义枪包并进入游戏时发生了崩溃,Minecraft崩溃报告显示是由TACZ引起的。具体原因是BedrockAnimation.getBones()方法返回了null,导致了后续调用entrySet()时发生了空指针异常(NullPointerException)。

崩溃报告:

https://bytebin.lucko.me/vdGvVCdQhB

枪包:

ATNetwork-GunPack.zip

kobe_display.json:

{ "model": "atnetwork:gun/kobe_geo", "texture": "atnetwork:gun/uv/kobe", "slot": "atnetwork:gun/slot/kobe", "hud": "atnetwork:gun/hud/kobe", "third_person_animation": "default", "sounds": { "shoot": "atnetwork:kobe/kobe_shoot", "inspect": "atnetwork:kobe/kobe_inspect", "inspect_empty": "atnetwork:kobe/kobe_inspect_empty", "put_away": "atnetwork:kobe/kobe_put_away" }, "muzzle_flash": { // 枪口火焰贴图路径 "texture": "tac:flash/common_muzzle_flash", // 缩放系数 "scale": 1 }, // 调用的动画名,会在包目录下的 animations 文件夹中寻找,不建议为空 "animation": "atnetwork:kobe", // 指定使用缺省动画,可为空。如果上文指定的动画文件里缺少某个动画,如 draw 动画,则会从缺省动画拷贝。 // 值可为 rifle、pistol "use_default_animation": "rifle" }

kobe.animation.json:

{ "format_version": "1.8.0", "animations": { "static_idle": { "loop": "hold_on_last_frame" }, "reload_tactical": { "animation_length": 1.2083, "bones": { "armRight": { "rotation": { "0.25": [0, 0, 0], "0.5417": [0, 0, 0], "0.7083": [0, 0, 0], "0.8333": [0, 0, 0], "1.0": [0, 0, 0], "1.0833": [0, 0, 0], "1.2083": [0, 0, 0] }, "position": { "0.25": [0, 0, 0], "0.5417": [0, 0, 6], "0.7083": [0, -18, 4.5], "0.8333": [0, -13.5, 3.38], "1.0": [0, -1.5, 5.88], "1.0833": [0, 0.1, -0.47], "1.2083": [0, 0, 0] }, "scale": { "0.25": [1, 1, 1], "0.5417": [1, 1, 1], "0.7083": [1, 1, 1], "0.8333": [1, 1, 1], "1.0": [1, 1, 1], "1.0833": [1, 1, 1], "1.2083": [1, 1, 1] } }, "lefthand_pos": { "rotation": { "0.0": [0, 0, 0], "0.125": [11, 0, 15], "0.75": [7, 0, 10.43], "0.9583": [3, 0, 5.87], "1.0833": [2, 0, 3.26], "1.2083": [0, 0, 0] }, "position": { "0.0": [0, 0, 0], "0.25": [-2, 5, 1], "0.5417": [-1.39, 3.48, 6.7], "0.8333": [-0.78, -8.04, 3.77], "1.0": [-0.43, 4.53, 6.09], "1.0833": [-0.26, 5.72, 4.65], "1.2083": [0, 0, 0] }, "scale": { "0.0": [1, 1, 1], "0.25": [1, 1, 1], "0.5417": [1, 1, 1], "0.8333": [1, 1, 1], "1.0": [1, 1, 1], "1.0833": [1, 1, 1], "1.2083": [1, 1, 1] } }, "righthand_pos": { "rotation": { "0.0": [0, 0, 0], "1.2083": [0, 0, 0] }, "position": { "0.0": [0, 0, 0], "1.2083": [0, 0, 0] }, "scale": { "0.0": [1, 1, 1], "1.2083": [1, 1, 1] } } } }, "inspect": { "animation_length": 4, "bones": { "lefthand_pos": { "rotation": { "0.0": [0, 0, 0], "0.2917": [-35, 0, 0], "0.5417": [-13, 0, 0], "1.0": [-6, 0, -80], "1.5833": [-10, 0, -80], "2.0": [0, 0, -80], "3.0": [0, 0, -80], "3.5": [0, 0, -80], "4.0": [0, 0, -80] }, "position": { "0.0": [0, 0, 0], "0.25": [5, 11, 3], "0.4583": [5, 11, 3], "0.7083": [5, 12, 5], "1.2917": [5, 13, 5], "2.0": [5, 13, 13], "3.0": [5, 13, 13], "3.5": [5, 13, 3], "4.0": [0, -1, -3] }, "scale": { "0.0": [1, 1, 1], "0.2083": [1, 1, 1], "0.375": [1, 1, 1], "0.6667": [1, 1, 1], "1.2917": [1, 1, 1], "2.0": [1, 1, 1], "3.0": [1, 1, 1], "3.5": [1, 1, 1], "4.0": [1, 1, 1] } }, "head": { "rotation": { "0.375": [0, 0, 0], "0.6667": [0, 0, -80], "1.2917": [0, 0, -80], "2.0": [0, 0, -80], "3.0": [0, 0, -80], "3.5": [0, 0, -80], "4.0": [0, 0, -357.5] }, "position": { "0.375": [0, 0, 0], "0.6667": [4, 4, 0], "1.2917": [4, 4, 0], "2.0": [4, 4, 10], "3.0": [4, 4, 10], "3.5": [4, 4, 0], "4.0": [0, 0, 0] }, "scale": { "0.375": [1, 1, 1], "0.6667": [1, 1, 1], "1.2917": [1, 1, 1], "2.0": [1, 1, 1], "3.0": [1, 1, 1], "3.5": [1, 1, 1], "4.0": [1, 1, 1] } }, "legRight": { "rotation": [0, 0, 0], "position": [0, 0, 0], "scale": 1 }, "righthand_pos": { "rotation": [0, 0, 0], "position": [0, 0, 0], "scale": 1 } } }, "reload_empty": { "animation_length": 1.2083, "bones": { "armRight": { "rotation": { "0.25": [0, 0, 0], "0.5417": [0, 0, 0], "0.7083": [0, 0, 0], "0.8333": [0, 0, 0], "1.0": [0, 0, 0], "1.0833": [0, 0, 0], "1.2083": [0, 0, 0] }, "position": { "0.25": [0, 0, 0], "0.5417": [0, 0, 6], "0.7083": [0, -18, 4.5], "0.8333": [0, -13.5, 3.38], "1.0": [0, -1.5, 5.88], "1.0833": [0, 0.1, -0.47], "1.2083": [0, 0, 0] }, "scale": { "0.25": [1, 1, 1], "0.5417": [1, 1, 1], "0.7083": [1, 1, 1], "0.8333": [1, 1, 1], "1.0": [1, 1, 1], "1.0833": [1, 1, 1], "1.2083": [1, 1, 1] } }, "lefthand_pos": { "rotation": { "0.0": [0, 0, 0], "0.25": [0, 0, 15], "0.5417": [0, 0, 10.43], "0.8333": [0, 0, 5.87], "1.0": [0, 0, 3.26], "1.0833": [0, 0, 1.96], "1.2083": [0, 0, 0] }, "position": { "0.0": [0, 0, 0], "0.25": [-2, 5, 1], "0.5417": [-1.39, 3.48, 6.7], "0.8333": [-0.78, -8.04, 3.77], "1.0": [-0.43, 4.53, 6.09], "1.0833": [-0.26, 5.72, 4.65], "1.2083": [0, 0, 0] }, "scale": { "0.0": [1, 1, 1], "0.25": [1, 1, 1], "0.5417": [1, 1, 1], "0.8333": [1, 1, 1], "1.0": [1, 1, 1], "1.0833": [1, 1, 1], "1.2083": [1, 1, 1] } }, "righthand_pos": { "rotation": { "0.0": [0, 0, 0], "1.2083": [0, 0, 0] }, "position": { "0.0": [0, 0, 0], "1.2083": [0, 0, 0] }, "scale": { "0.0": [1, 1, 1], "1.2083": [1, 1, 1] } } } } } }

commented

已修复,在 1.0.2 更新