[1.10.2] general.json re-setting #335
Comments
I think there is a real issue here where I think my code is unable to load the general file when items in kits are no longer present. It's hard to reproduce, but I'll do my best to do so and see what's going on. |
OH! You're using 0.7.2. Try updating to 0.8.1, I think a change in Sponge may have caused this to break, which 0.8.1 patches. |
yes 0.8.1 fixes this |
Can't confirm, have opened another issue. |
Sadly, I am still having the issue - I am now using As it is, I have no warps and no kits. |
On the path to trying to solve #335
Question - do you have any plugins that add extra data to items that you've put into kits? |
What would you mean? I did use NBT tags (for rule books) but that was done using plain vanilla methods. Other than that, I also had Pixelmon items. Though I doubt that is it. |
Actually, I wonder if it is the NBT tags - in which case, this might actually point to the Sponge translator not working properly and may need to be reported to Sponge. I'll investigate this. I think I have a solution that would prevent the file being wiped. It wouldn't help with the items that would have custom NBT in them though (but rather than wiping the file, Nucleus would just ignore them for now), but that might be the key to this. It's not a perfect solution though. I'm gonna keep on trying to solve this completely. |
Well at least with that, I could actually confirm if this is the issue. Looking back, it might be that - even when I was trying to put back the old general.json, as it had the written and signed books in it (which are stored as NBT tags). If it is the case, then let me know if you want me to report it to Sponge. |
Could I get a sample of the general.json that has the NBT in it, if it does ever get saved? Either that, or commands you run (can be garbage text) to create a book? I might be able to work out what needs to be done and at least work around it if it takes some time. If you can confirm you get the failiure ONLY when adding NBT altered books, or something like that, then yeah, I think we've finally gotten to the bottom of this and we can start creating solutions. If this is Sponge, the Configurate DataTranslator is not accepting NBT tags, at least in 1.10.x. I should be able to then create a simple test plugin to provide them with. Sorry this has taken so long, but I've made changes to Nucleus that would mitigate this too, so everyone wins! |
OK, so I did some digging, and I think I've solved what's going on. Could you test with this build? Nucleus-0.10.0-5.0-SNAPSHOT-all.zip After putting NBT tags in like you suggested with 0.9, restarting the server, then trying to redeem the kit, I get the following error:
and the message on the client and I check my With this build, it works... which I was not actually expecting. I think that Sponge can handle translating the NBT, but only when the game has started because, well, it needs the game to have started in order to load the NBT! That's essentially what the patch I committed a few days ago does, it only does the translation when required, rather than during post init. So, to me, it looks like I've fixed the error by accident. I'd just like the confirmation. Is it something to report to Sponge? I don't know, this might be intended, but I suspect it might catch other developers out... TL; DR: When loading an item from configuration that contains NBT, the |
Huh, I had not seen your reply, apologies. At any rate, the books weren't set through commanda or anything - I just wrote and signed them, and simply set the kit with them in the inventory. I have been using the kits without books and sp far, no resetting - so I think that was the issue? Regardless, I can certainly test it on my server tonight. I'll keep you posted on how it goes. |
Thank you! |
For those using 1.8 - Nucleus-1.8-0.10.0-SNAPSHOT-all.zip |
Confirmation this build works. Closing. |
Yup - they do. Thanks again for your work! |
I am having a strange error where all my warps have suddenly have gone amiss. There are none left in the
/main/nucleus config
, and nogeneral.json
is appearing in/main/config/nucleus
. I have tried copying the backup general.json file I had, and then reloading the nucleus config, but /warp list did not show the warps present in the file. At this point, after both steps, I checked and reloaded the directory to make sure the general.json was still present; and it was.Only a minute later, I reloaded the directory again and the
general.json
was empty, all warps, and kits gone. Which makes me think this ties in with an issue I had with firstjoinkit (and other kits), which simply was not present sometimes, and then it is other times.Overall, seems the configs are faulty, and empty out on random occasions.
Mods:
spongeforge-1.10.2-2073-5.0.0-BETA-1683.jar
Nucleus-0.7.2-S5-1.10-plugin.jar
The text was updated successfully, but these errors were encountered: