Jump to content

Recommended Posts

Posted

Helo!
I've gotten custom biomes down and have them generating with vanilla features, but defining new features is giving me hell and I can't find good resources on them (Thank you forge docs for not even mentioning world gen).

I created the deferred registry and have the `.register(id, () -> new AbstractFeatureBase(NoFeatureConfig.field_236558_a_)));` pattern and finally I have

`genBuilder.func_242513_a(GenerationStage.Decoration.VEGETAL_DECORATION, feature);` where `genBuilder` is of type `BiomeGenerationSettingsBuilder` and `feature` is of type `ConfiguredFeature<?,?>`

 

I guess all I need to do is turn the `Feature<?>` that is created with `register()`  into a `ConfiguredFeature<?,?>`. I think I have to use `.withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG)` but it's not working.

Here's my repo. I just realized that my features are in net.minecraft instead of jam.jamfactory so I'll fix that in a bit.

If you need more explanation of what I'm asking for I'll try to give it, but I don't quite understand this yet 😛
Any help is appreciated!
 

Posted (edited)
12 minutes ago, Beethoven92 said:

Define "not working"

Good question. 
I don't really understand features at all so all I can offer you is that in the line 

addBiome("caelum_forest", Category.SWAMP, .15f, .8f, BiomeTemplate.DEFAULT_OVERWORLD_SKY_COLOR, BiomeTemplate.DEFAULT_OVERWORLD_FOG_COLOR, BiomeTemplate.DEFAULT_OVERWORLD_WATER_COLOR,	BiomeTemplate.DEFAULT_OVERWORLD_WATER_FOG_COLOR, color(0,50, 70), color(0, 100, 150), GrassColorModifier.NONE, ParticleTypes.ENCHANT, .01f, 0f, .8f, new ConfiguredFeature<?, ?>[] {Features.field_243934_cq, features.get("test").get().withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG) }, new StructureFeature<?,?>[] {StructureFeatures.field_244151_q});

".withConfiguration(IFeatureConfig.NO_FEATURE_CONFIG)" is underlined and it says "The method withConfiguration(capture#3-of ?) in the type Feature<capture#3-of ?> is not applicable for the arguments (NoFeatureConfig)."

If I cast features.get("test").get() as a Feature<NoFeatureConfig> the red line goes away but the game crashes on load with only the message "Mod Loading has failed" and points to the line that I pasted above

I don't even need help with this specifically, I just need a working example of features using deferred registries

Edited by JamFactory

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.