Chunk Pregenerator 1.6 Incompatiblity Comeback
Speiger opened this issue ยท 13 comments
Well we are back with a issue.
I worked with the guy who originally posted with the worked with. I implemented my fix but it still causes issues.
So that is everything i can do.
Here is the the problem:
https://pastebin.com/spbXh1tV
As you can see it throws the errors at the saving. Because the data was never generated.
Keep in mind the 1.5.1 version actually loads & unloads the chunk everytime it tries to generate data.
So even if i try to do that (just to lose 600% of my performance) it doesn't work.
The issue is at this point at your side.
And its actually very simple. You cause a crash if a chunk unloads without your data. Even so there is no data present.
The fix would be simple, instead of throwing errors (like i alread told), ignore if data is not present if it unloads/saves.
Because these are the errors.
So yeah what do we do now?
My suggestion is this:
https://github.com/Angry-Pixel/The-Betweenlands/blob/1.12/src/main/java/thebetweenlands/common/world/storage/WorldStorageImpl.java#L181
https://github.com/Angry-Pixel/The-Betweenlands/blob/1.12/src/main/java/thebetweenlands/common/world/storage/WorldStorageImpl.java#L196
https://github.com/Angry-Pixel/The-Betweenlands/blob/1.12/src/main/java/thebetweenlands/common/world/storage/WorldStorageImpl.java#L208
Replace these 3 lines with a return.
Because there can be mods who load already existend chunks (maybe also loaded ones) just to check some data. (For example retrogen could do that)
Thanks for reading. Speiger.
Sure, I can do that, but then our structures probably won't generate properly. Our structures save some data to chunks, and if that data is not available when the chunk is saved then it will be lost (or even never generated in the first place).
Just to clairify: does your Pregenerator generate chunks normally (so that our data is saved) and doesn't cause this error but also does some other stuff that does some abnormal (in terms of vanilla loading/unloading) things that our mod can't deal with?
If so, simply removing the exception would work, yes.
There is two setps to this generation. The terrain only part (which causes the crashes from you) and then the population of that. I basically sort the chunks and prepaire one chunk file and then populate it.
So your structure data is being generated at the end. Just the first save is for damage control if a crash happens so that all the chunks are already saved.
Edit:
Also if the guy who i work with finds out that my tool causes worldgen issues because of that system i adjust it to be better. But so far with ATM3 that system works totally fine. I have multible servers test it for me.
Edit 2:
In a normal generation the chunk is saved twice.
1: when the terrain is created.
2: When the chunk is populated. (Population is what you use to generate the sturctures)
Because you can actually can do a fog of war with that so stuff apears when players come nearby.
Edit 3: TL:DL remove the crash throwing and you get a compatiblity with everything working fine.
I've just tested it out and it seems to work, all good now
4e8f597
Cool \o/
Did he also check if our locations generated properly? (can be checked with the 'thebetweenlands:location_debug' item, they should show up as coloured boxes)
I did try it out and it seemed to work, but I wasn't sure if I really pregenned the chunks properly haha
@TheCyberBrick i can ask him that later. But you can be assured that it will work.
@TheCyberBrick the guy said that it works fine no issues whatsoever