KosmX / minecraftPlayerAnimator

Minecraft 1.16+ player animation library
https://modrinth.com/mod/playeranimator
MIT License
79 stars 19 forks source link

[API] IOException and JsonParsingException thrown when deserializing GeckoLib animation files #108

Open ZigyTheBird opened 1 month ago

ZigyTheBird commented 1 month ago

Describe the bug Everytime the mod attempts to deserialize a GeckoLib animation an exception is thrown an is visible in the console The animation itself gets loaded fine though The error says that the animation is not an emotecraft animation so this error is prob the cause of the EmoteCraft deserializer being used first to try and load the GeckoLib animations

**Logs**
[00:16:03] [Render thread/INFO] (AnimationCodecs) Failed to apply emotecraft java.io.IOException: com.google.gson.JsonParseException: not an emotecraft animation at dev.kosmx.playerAnim.minecraftApi.codec.AbstractGsonCodec.decode(AbstractGsonCodec.java:25) ~[8738125495540697.jar:?] at dev.kosmx.playerAnim.minecraftApi.codec.AnimationCodecs.deserialize(AnimationCodecs.java:77) ~[8738125495540697.jar:?] at dev.kosmx.playerAnim.minecraftApi.PlayerAnimationRegistry.resourceLoaderCallback(PlayerAnimationRegistry.java:123) ~[8738125495540697.jar:?] at dev.kosmx.playerAnim.fabric.client.FabricClientInitializer$1.onResourceManagerReload(FabricClientInitializer.java:41) ~[main/:?] at net.minecraft.server.packs.resources.ResourceManagerReloadListener.method_29490(ResourceManagerReloadListener.java:15) ~[minecraft-merged-519c7931cd-1.21-loom.mappings.1_21.layered+hash.40359-v2.jar:?] at java.base/java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:787) ~[?:?] at java.base/java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?] at net.minecraft.server.packs.resources.SimpleReloadInstance.method_18365(SimpleReloadInstance.java:69) ~[minecraft-merged-519c7931cd-1.21-loom.mappings.1_21.layered+hash.40359-v2.jar:?] at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:162) [minecraft-merged-519c7931cd-1.21-loom.mappings.1_21.layered+hash.40359-v2.jar:?] at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:23) [minecraft-merged-519c7931cd-1.21-loom.mappings.1_21.layered+hash.40359-v2.jar:?] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:136) [minecraft-merged-519c7931cd-1.21-loom.mappings.1_21.layered+hash.40359-v2.jar:?] at net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:121) [minecraft-merged-519c7931cd-1.21-loom.mappings.1_21.layered+hash.40359-v2.jar:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1240) [minecraft-merged-519c7931cd-1.21-loom.mappings.1_21.layered+hash.40359-v2.jar:?] at net.minecraft.client.Minecraft.run(Minecraft.java:882) [minecraft-merged-519c7931cd-1.21-loom.mappings.1_21.layered+hash.40359-v2.jar:?] at net.minecraft.client.main.Main.main(Main.java:256) [minecraft-merged-519c7931cd-1.21-loom.mappings.1_21.layered+hash.40359-v2.jar:?] at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) [fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) [fabric-loader-0.15.11.jar:?] at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) [fabric-loader-0.15.11.jar:?] at net.fabricmc.devlaunchinjector.Main.main(Main.java:86) [dev-launch-injector-0.2.1+build.8.jar:?] at dev.architectury.transformer.TransformerRuntime.main(TransformerRuntime.java:220) [architectury-transformer-5.2.87-runtime.jar:5.2.87]

To Reproduce Steps to reproduce the behavior:

  1. Add a GeckoLib animation file to assets/{mod_id}/player_animation or assets/{mod_id}/player_animations
  2. See error

Expected behavior Preferably no errors should be thrown when everything is fine :)

Setup config (minecraft, modloader, libraries):

KosmX commented 1 month ago

I'll change the log level so it won't be shown