GeckoLib

GeckoLib

146M Downloads

[1.12 Forge] String to List Crash 2 - Electric Boogaloo

CitrusHappy opened this issue · 3 comments

commented

crash report

same issue as #197

I've been trying to add instruction keyframes in my animation.json, but it keeps crashing regardless of my mod's code. Rather, removing the instruction keyframes prevents the crash.

To reproduce, simply create a Geckolib model with an instruction keyframe and attempt to render it in 1.12.x.

I've dug up the relevant commits for ease of access:

fix commit in 1.16
attempted fix commit in 1.12

commented

Figured it out. Default Blockbench saves the json like this if there is only one line in the script box:
"timeline": { "0.0": "scriptname" }

Geckolib is expecting a list (as it should) like this:
"timeline": { "0.0": ["scriptname"] }

the second option works perfectly but requires manual editing. a solution to this would be to check first if it's a list or a single string, then react accordingly.

commented

That is a known issue with the plugin, I can't fix it. If anyone is good with JavaScript, I'd love a second look. https://github.com/bernie-g/blockbench-plugins/blob/master/plugins/animation_utils.js#L633-L646

commented

That is a known issue with the plugin, I can't fix it. If anyone is good with JavaScript, I'd love a second look. https://github.com/bernie-g/blockbench-plugins/blob/master/plugins/animation_utils.js#L633-L646

I don't think this is an issue with the plugin. We should just allow both a list and a single value in Geckolib.