Brewery

Brewery

101k Downloads

Converted from 1.12.2 to 1.16.4 Old brews give error messages.

TomLewis opened this issue · 6 comments

commented

Im surprised the plugin even knows what the old brews are after doing an update this big!
Im currently in testing phase for moving from 1.12.2 to 1.16.4 (Depending on performance with lots of players) part of this is testing what plugins break, Im testing Brewery and we've found that old brews give us this message in console.
I initially updated from 1.12.2 to 1.13.2, then I did the conversion from 1.13.2 to 1.16.4 (It took 24 hours to complete!) Using papers force upgrade option.

[16:29:46] [Server thread/INFO]: [Brewery] ERROR: Parity check failed on Brew while loading, trying to load anyways!
[16:29:46] [Server thread/INFO]: [Brewery] ERROR: Failed to load Brew. Maybe something corrupted the Lore of the Item?
[16:29:46] [Server thread/INFO]: [Brewery] ERROR: Parity check failed on Brew while loading, trying to load anyways!
[16:29:46] [Server thread/INFO]: [Brewery] ERROR: Failed to load Brew. Maybe something corrupted the Lore of the Item?
[16:29:46] [Server thread/INFO]: [Brewery] ERROR: Parity check failed on Brew while loading, trying to load anyways!
[16:29:46] [Server thread/INFO]: [Brewery] ERROR: Failed to load Brew. Maybe something corrupted the Lore of the Item?
[16:29:46] [Server thread/INFO]: [Brewery] ERROR: Parity check failed on Brew while loading, trying to load anyways!
[16:29:46] [Server thread/INFO]: [Brewery] ERROR: Failed to load Brew. Maybe something corrupted the Lore of the Item?
[16:29:47] [Server thread/INFO]: [Brewery] ERROR: Parity check failed on Brew while loading, trying to load anyways!
[16:29:47] [Server thread/INFO]: [Brewery] ERROR: Failed to load Brew. Maybe something corrupted the Lore of the Item?
[16:29:47] [Server thread/INFO]: [Brewery] ERROR: Parity check failed on Brew while loading, trying to load anyways!
[16:29:47] [Server thread/INFO]: [Brewery] ERROR: Failed to load Brew. Maybe something corrupted the Lore of the Item?
[16:29:47] [Server thread/INFO]: [Brewery] ERROR: Parity check failed on Brew while loading, trying to load anyways!
[16:29:47] [Server thread/INFO]: [Brewery] ERROR: Failed to load Brew. Maybe something corrupted the Lore of the Item?
[16:29:47] [Server thread/INFO]: [Brewery] ERROR: Parity check failed on Brew while loading, trying to load anyways!
[16:29:47] [Server thread/INFO]: [Brewery] ERROR: Failed to load Brew. Maybe something corrupted the Lore of the Item?

Here is a screenshot of one of the old brews.
2020-12-06_16 30 11

Any chance I can save these?

commented

I have wanted to ask, Do Barrels keep the chunk loaded? Wondering if they do, because that would be nuts for people that have them near their farms.

No they do not! That would be terrible for performance.

NBT data command in CMI

There is also a item find command in CMI. That could be modified to then convert all the brews it finds. As CMI is a sold plugin, i do not have access to it though.

Thats cool, that is exactly how i imagined it to work especially with the secret and speciality recipes.

commented

It's difficult to say, the Data was saved in the lore in 1.12 and before, and it should still be able to read the lore in 1.16 if the lore is unchanged. Seeing as the "3-times Distilled" also lost its formatting, something seems to have changed the lore somewhere in the process.

Does this happen with all old brews? Also Brews from Barrels or just Inventories?

commented

If i remember correctly, 1.16 changed something about the lore, including formatting etc. So when updating from 1.12, it could help to load the brews into 1.13 (or 1.14/1.15), put them in a brewing stand just for a second which will convert them, any brewing stand is fine, and then go to 1.16.

To make it easier if you do put them Brewery Barrels, you can update the brews on 1.13 and then copy the worlddata.yml over to 1.16, or any other way like copy chest with worldEdit should work.

I could also make a special build for you that converts all brews when opening an inventory, so no need for the brewing stand?

commented

Brilliant research!
I'm currently only in the testing stages of moving my server, i'm super worried about performance! i'm going to get everything working and then get my players to do a dry run for performance!

I have had over 285,000 players join in the 8 years we've had this world, getting people to put all their brews into a certain location will be impossible haha, it'll take years to convert them all.

I wouldn't want something editing chests as they are opened as I wouldn't know when its done and it could take years for people to open all chests with old brews, how does Brewing detect that its a brew? is it something to do with those NBT tags? or is it done on name/lore?

What would be amazing is having something like a python script that can iterate over an entire world and replace all old items with the correct ones, or instead of throwing the error it does a correction to see if it can be matched and replaced?

We have over 200 custom brews now! So i'm not sure if this will impact anything. I used some of your docs on my website I hope you don't mind! There's an interactive table at the bottom of the page with our brews https://piratemc.com/guides/brewery/ (I keep them top secret on purpose so it takes years for people to find the brews!)

commented

i'm super worried about performance

Is the performance of Brewery still good? I'm working hard to make the performance as best as can be, and i've had the opportunity to check timings in the past, but i currently don't have access to a big server for real world numbers.

getting people to put all their brews into a certain location will be impossible haha

ok that makes sense!

how does Brewing detect that its a brew?

In 1.12 it checks for a certain hidden pattern in the Lore, in later versions it uses nbt, so just checking if an nbt tag is present.

As far as i can tell, it can still recognize the brews, that why it gives an error, but the data is corrupted. 1.16 removes certain things from the lore, like §x and §k. We used to use tags like that to hide the data in the lore. So if somehow it could be changed so it doesn't remove these things, that should make it work.

I really like what you do with Brewery and its amazing that you made it to over 200 recipes!

commented

Is the performance of Brewery still good?

As far as I can tell, I've only had 1 player testing for me, they know Brewing better than me and can test everything much better so i'm waiting on their report after I left them testing last night! I usually wait until TPS drops to do a timings report, I wonder if I run Spark and profile the CPU when doing tasks in Brewing if it'll pick it up.

I have wanted to ask, Do Barrels keep the chunk loaded? Wondering if they do, because that would be nuts for people that have them near their farms.

Yeah, as its throwing a error when I drink an old brew, that means its definitely detecting them, We created a few from scratch and they work fine, so its just old data.

Let me see if I can view that NBT data for you for these old brews in 1.16.4, see if we could use say a brew ID or something from it to replace the old items, im sure theres an NBT data command in CMI, I will get back to you on this.

Thanks, We plan to add a lot more! Over years its turned into a lucrative economic area on PirateCraft as I keep the recepies secret, so when someone finds out a recepie they sell it, or they sell just the booze haha, weve had players leave for years and be the only person know how to make certain brews and then they come back, im so glad I did it this way!