You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When spawning a new modified villager, right clicking the villager will crash the game due to a null error. (I'm using a command block setup to test.) It happens pretty randomly... It might be because of a recipe in my code, but I'm not sure.
When rejoining the same world, everything will load fine, but the villager which crashed the game will still do so if interacted with.
For further context: currently I'm iterating through a complicated JS object filled with trades, and using Object.keys to traverse and add recipes dynamically based on that object. I have no KubeJS errors - my data and loop is valid.
Here is a gist with the code I'm using: https://gist.github.com/Treeway7/fe9902eb0761bd0692528f8c7b80ab8f
EDIT: I'm now noticing that some villagers don't let you access their trades at all... Probably because, well, nothing was even generated. I'm pretty sure the game crashes if you spam the villager too much, or maybe just too early, as the game tries to generate villager recipes. But I might be wrong about this.
Also, please note that KubeJS runs /reload for me a second time every time the world starts, 48 ticks after it loads. I'm not sure if that messes with anything from this addon.
Version
0.0.7
Describe the bug!
When spawning a new modified villager, right clicking the villager will crash the game due to a null error. (I'm using a command block setup to test.) It happens pretty randomly... It might be because of a recipe in my code, but I'm not sure.
When rejoining the same world, everything will load fine, but the villager which crashed the game will still do so if interacted with.
For further context: currently I'm iterating through a complicated JS object filled with trades, and using
Object.keys
to traverse and add recipes dynamically based on that object. I have no KubeJS errors - my data and loop is valid.Here is a gist with the code I'm using: https://gist.github.com/Treeway7/fe9902eb0761bd0692528f8c7b80ab8f
EDIT: I'm now noticing that some villagers don't let you access their trades at all... Probably because, well, nothing was even generated. I'm pretty sure the game crashes if you spam the villager too much, or maybe just too early, as the game tries to generate villager recipes. But I might be wrong about this.
Here is a gist of that error, which happened as the villager was spawned: https://gist.github.com/Treeway7/9353a989c15263ccdabf6035f5de1c13
However, killing and replacing that villager does not reproduce the issue... It doesn't seem consistent, at least.
Speaking of this, here is my command block setup to reset trades:
Also, please note that KubeJS runs
/reload
for me a second time every time the world starts, 48 ticks after it loads. I'm not sure if that messes with anything from this addon.Crash Report
https://gist.github.com/Treeway7/c99b152b39815a84dbf3f774a1655bee
Log
https://gist.github.com/Treeway7/b60ea91ca61b5ad28f68b9d7ca4b1d1e
Additional Context
Yes
Modifications
There's a whole bunch of other mods, namely Apotheosis which messes with some of the enchanting trades, but I haven't touched librarian trades.
I modified the Armorer recipes (all levels) and recipes from the Shepherd (master only).
Did the issue happen in singleplayer or on a server?
Singleplayer
The text was updated successfully, but these errors were encountered: