Currently, I have some recipes that have some requirements randomized per-seed. However, some recipes fail to create as some requires end up being null.
Here are the revelant code
ars_nouveau.js - server script, handles the recipes and the randomized picking.
worldseed.js - startup script, handles getting the worldseed before actually starting so it doesn't error on start.
The actual error (actually, warn):
[17:04:40] [WARN ] Error creating recipe malum:kjs_6hr0tunv21f5lvtn9yopidsrt[malum:spirit_infusion]: {"type":"malum:spirit_infusion","input":{"item":"ars_nouveau:relay"},"output":{"item":"ars_nouveau:relay_collector"},"extra_items":[{"tag":"forge:chests","count":4}],"spirits":[{"type":"infernal","count":3},{"type":"arcane","count":6},{"count":2}]}: java.lang.NullPointerException: Cannot invoke "com.google.gson.JsonElement.getAsString()" because the return value of "com.google.gson.JsonObject.get(String)" is null
Formatted:
{
"type": "malum:spirit_infusion",
"input": {
"item": "ars_nouveau:relay"
},
"output": {
"item": "ars_nouveau:relay_collector"
},
"extra_items": [
{
"tag": "forge:chests",
"count": 4
}
],
"spirits": [
{
"type": "infernal",
"count": 3
}, {
"type": "arcane",
"count": 6
}, {
"count": 2 //Here, "type" is missing.
}
]
}```