Jump to content

[1.16.4] Get IChunk World / get current World for the overworld.


Recommended Posts

Posted (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 by MistyMarshes
Posted (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 by MistyMarshes
Posted (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 by MistyMarshes
Posted

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?

Posted (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 by MistyMarshes

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.