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.14.4] Retrogen, how to make ores spawn in already generated chunks.

Featured Replies

Posted

Hey guys, beginner programmer here who's made an ores mod.

 

When people download the mod, the ores don't spawn in already generated chunks, they only spawn as the world expands and generates fresh chunks from player movement.

 

I would like for my mod to spawn in already generated chunks so the player doesn't have to travel arbitrarily far to find the ores. I looked into it, and apparently there are some mods from 1.12 that have retrogen capabilities; however, I found no open-source mods for 1.14.4. I have no idea where to start.  Any suggestions?

There might be some built-in capability for this, in which case you can ignore me, but this wouldn't be difficult to do "from scratch," so to speak.

You could fairly simply store a boolean for each chunk, whether or not it's been affected by your ore generation, and do some block replacement logic on the chunk if not (then toggle the boolean, naturally).

You would only need to run this check when a chunk was loaded, so you could use the event that fires when a chunk is loaded (I'm not sure what it's called in 1.14. From a brief search, it seems to be ChunkEvent.Load, but don't quote me on that).

I haven't done world generation yet, so I can't advise you on keeping runaway chunk generation from happening, but you should look into that if you haven't already.

Fancy 3D Graphing Calculator mod, with many different coordinate systems.

Lightweight 3D/2D position/vector transformations library, also with support for different coordinate systems.

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.