
[BUG ๐] Datapack error on world load with 0.0.4
brisingraerowing opened this issue ยท 9 comments
Describe the bug
Datapack error on world load
To Reproduce
Steps to reproduce the behavior:
- Load world with 0.0.4
- Error
Expected behavior
World loads
Screenshots
If applicable, add screenshots to help explain your problem.
Environment:
- MC/Forge version: 1.20.1-47.3.1
- Create version: 0.5.1.f
- Create Metallurgy version: 0.0.4
- Others mods / modpacks, datapacks
Additional context
This is an existing world.
I think I got the same issue, datapack error when loading an existing world. Didn't get the error when just using Create and this mod though so it seems to be an incompatibility. Don't really have time now to look into which mod could cause it. Maybe the logs will help narrow it down but I'm not experienced enough for that.
When making a new world the game crashes with this crash log: https://gist.github.com/ocram9/5677075fb70513401a238d7e501189ea
And this is the log where it gives the datapack error: https://gist.github.com/ocram9/f1715bddfde11de804c82abecde473f9
Hello! @brisingraerowing ๐
Sorry for your disappointment, to help me fix the bug, can you please give me a CrashReport / Logs and maybe after that what datapack are you using, does it is for add new recipes?
I would be happy to be able to resolve the problem quickly tomorrow (cause French hours).
Same issue here with server log attached. It appears to only happen on my dedicated server, the client runs just fine.
@Lucreeper74 this is caused by wrong recipe JSON for Create Enchantment Industry compat. results
instead of result
in JSON.
while code expects
result
field and throws NPEBtw, maybe you should check if required field exists in JSON and just give a warning or more readable error (with recipe ID and such) instead of crashing the game ๐
Yes, my bad, I wanted to finish this quickly to release the update as quickly as possible to avoid waiting too long. I forgot that. I will post a hotfix. I don't kow if I just replace v0.0.4 on Modrinth/Curseforge pages or just upload v0.0.5 or v0.0.4a with just that fix
@Lucreeper74 this is caused by wrong recipe JSON for Create Enchantment Industry compat.
results
instead ofresult
in JSON.while code expects
result
field and throws NPE
Btw, maybe you should check if required field exists in JSON and just give a warning or more readable error (with recipe ID and such) instead of crashing the game ๐
I will close this issue when i do that you said ๐
Yeah. I'm not sure how other mods handle stuff like that, you can probably check ๐คท
I take a look at how Create verify their Json files. They just use :
GsonHelper.getAsJsonObject(json, {name})
And this function just throw error without crash (I think i will test) when not found.
The worst part is that I used it a few lines before... I'm so dumb lmao
Yes, after test it, it return this
[13:57:01] [Render thread/ERROR] [minecraft/RecipeManager]: Parsing error loading recipe createmetallurgy:compat/create_enchantment_industry/spout_experience_nugget com.google.gson.JsonSyntaxException: Missing result, expected to find a JsonObject
Its an error but it won't crash the game.
Fixed here commit