MistyMarshes Posted January 20, 2021 Posted January 20, 2021 (edited) Hello. I was trying to get the World an IChunk is in, on version 1.16.4 (in the WorldCarver's carveRegion method). Given that that seemed impossible, I'm trying now to do the next best thing for my particular case: get the current World for the OVERWORLD, but I couldn't figure that either. Do you know how to do any of those? Thanks for your help! Edited January 20, 2021 by MistyMarshes Quote
MistyMarshes Posted January 20, 2021 Author Posted January 20, 2021 (edited) Is that always the case? I'm in a WorldCarver's carveRegion method. I remember reading some 1.16 mod's code recently were they used the world there, but I don't remember what kind of pattern they used to make it available at that point. I need it for a couple of reasons. I need to get its server -> ServerWorld -> DimensionSavedManager to start my WorldSavedData, I also want to use its getBiome, and probably a couple more methods. Do I need to look for alternatives? Edited January 20, 2021 by MistyMarshes Quote
MistyMarshes Posted January 20, 2021 Author Posted January 20, 2021 (edited) 2 hours ago, diesieben07 said: WorldSavedData cannot be accessed during world gen. I see. I used to do it in 1.12 to load some world-dependent worldgen NBT data of my own. How would you go about it for 1.16.4? Do I need to implement my own file subsystem? Maybe capabilities? It is a considerable amount of data (not just some settings). Edited January 20, 2021 by MistyMarshes Quote
MistyMarshes Posted January 20, 2021 Author Posted January 20, 2021 Oh ok. It is a similar thing to how they used to load structures nbt files. Now that I think of it I should browse to see how they do it now. Do they regenerate structures on the fly every time, or save them to disk? Quote
MistyMarshes Posted January 20, 2021 Author Posted January 20, 2021 (edited) That's ok, you made me think. Thank you for your time. For completeness, my question was: how does vanilla load world-dependent data during worldgen? At least they used to do it to load the mineshafts NBT, and so on. Edited January 20, 2021 by MistyMarshes Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.