Item Bug fixed – hopefully

I have been working the last 2 days to fix the item bug. Generally I think the biggest issues are fixed.Please try out whatever you can (deposit/store/things that broke before) and let me know if anything is not working as expected. If you are interested in the details, here is a summary of the work done:

First of all, there was a longstanding issue regarding compiling the websend plugin (the plugin that runs all custom commands for us). I always had to include all dependencies into the file which was overkill. I know learned how to do that properly and now the file is 1.6MB large instead of 60 😀

Second of all the conversion of extra data in items (such as enchantments) was always handled in a very 1:1 way in websend. It assumed to know all data that could exist and iterated it to pass it on to our server. This broke already some version ago when a lot more data was added (books etc) so we included a library called PowerNBT (nbt is the data format introduced then) to read the data and parse it for processing. The hope was to pass whatever data there is so we don’t need to worry when there is new stuff. Unfortunately, PowerNBT was abandoned and caused weird glitches in 1.12 already where under certain circumstances the commands broke. This would then crash the server and I had to restart it (see forum posts about this one).

With 1.14, the server would finally not crash anymore but only a specific command would fail. This allowed us to debug it much better and we found out that only specific items in the inventory would break things. So I managed to replace PowerNBT completely yesterday and get the additional data for items in a proper format from minecraft directly and pass it via websend to the system. Yay! One more outdated plugin gone. More long-term stability secured.

The issue with NBT data however is that it’s a Minecraft specific format that other programs cannot read. It had to be adjusted so I can work with it. This already was programmed, but the new way how I got the data out of minecraft was again slightly different. So I had to change the way we fix/process the data in my server code as well. This was done yesterday night and today and now hopefully everything is working.

The only issue is that we have now still a lot of legacy code around. I managed to coax the new system to look like the old system so that we can get rid of the bug ASAP. That does not mean however it’s the best way. I should ideally make sure that the whole system accepts and uses the new way as if it was intended like that instead. So, more work ahead of me.