Jump to content

Recommended Posts

Posted (edited)

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
Posted (edited)
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
Posted (edited)

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

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