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.

Featured Replies

Posted

I have watched several videos on the subject and read the code used for flat chunk generation and have narrowed down my issue to this bit of code which adds my world feature into the game. (The variable "feature" is the feature which I'd like to add)

for (Biome biome : ForgeRegistries.BIOMES.getValues()) {
            biome.addFeature(GenerationStage.Decoration.SURFACE_STRUCTURES,
                    Biome.createDecoratedFeature(feature, IFeatureConfig.NO_FEATURE_CONFIG, Placement.NOPE, IPlacementConfig.NO_PLACEMENT_CONFIG));
        }

Yes, registration is working and this code is being recognized in game, but it will only spawn in non-flat worlds such as the overworld and nether. How do I solve this?

Sorry for duplicate posts but it seems that my question is not being assessed in the needed manner

Edited by Nicholas Hammond

  • Author
5 minutes ago, diesieben07 said:

Look at FlatChunkGenerator#func_202099_e. You'll have to hack into the fields it uses to populate the structures.

Thank you, this was the type of answer I was looking for I believe. How would I do this?

 

I'm not trying to spawn my structure in the actual flat world by the way, I have a custom dimension which uses FlatChunkGenerator so that's why I asked.

 

Edited by Nicholas Hammond

  • Author

Okay so today I had the idea of copying the FlatChunkGenerator code and making a new modified generator based on the original code. What can I change from the FlatChunkGenerator code which can generate my structures? Can I copy any of the code from OverworldChunkGenerator since it allows me to generate structures? I also created a new copy of FlatGenerationSettings if that does anything.

Edited by Nicholas Hammond

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.