Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

Posted

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

  • Author

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

  • Author
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

  • Author

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?

  • Author

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.