Jump to content

Feature.ORE.withConfiguration error[1.16.5]


Unpuzzledmind32

Recommended Posts

it says Cannot resolve method 'withConfiguration' in 'Feature' I tried everthing and i can not fix this error 

help

 

@LexManos

@diesieben07

 

i am new to forge hand coding btw

 

code:

package com.jerios.pearlarmor.world.gen;

import net.minecraft.util.registry.Registry;
import net.minecraft.util.registry.WorldGenRegistries;
import net.minecraft.world.gen.feature.*;
import net.minecraft.world.gen.placement.ConfiguredPlacement;
import net.minecraft.world.gen.placement.Placement;
import net.minecraft.world.gen.placement.TopSolidRangeConfig;
import net.minecraftforge.event.world.BiomeLoadingEvent;
import com.jerios.pearlarmor.world.gen.OreType;

public class ModOreGen {
    public static void generateOres(final BiomeLoadingEvent event) {
        for (OreType ore : OreType.values()) {
            OreFeatureConfig oreFeatureConfig = new OreFeatureConfig(
                    OreFeatureConfig.FillerBlockType.NATURAL_STONE,
                    ore.getBlock().get().defaultBlockState(), ore.getMaxHeight());

            ConfiguredPlacement<TopSolidRangeConfig> configuredPlacement = Placement.RANGE.configured(
                    new TopSolidRangeConfig(ore.getMinHeight(), ore.getMinHeight(), ore.getMaxHeight()));


        }
    }
    private static ConfiguredFeature<?, ?> registerOreFeature(OreType ore, OreFeatureConfig oreFeatureConfig,
                                                              ConfiguredPlacement configuredPlacement, BlockWithContextConfig blockWithContextConfig) {
        return Registry.register(WorldGenRegistries.CONFIGURED_FEATURE, ore.getBlock().get().getRegistryName(),
                Feature.ORE.withConfiguration(oreFeatureConfig).withPlacement(configuredPlacement) // line that is giving trouble fix soon
                        .square().count(ore.getMaxVeinSize()));
    }
}

 

Edited by Unpuzzledmind32
Link to comment
Share on other sites

5 minutes ago, diesieben07 said:

What on earth is "hand coding"?

Have you looked at the Feature class? It is pretty obvious what the method name you need is.

well hand coding is where you don't make the code, like making it with a program like mcreator

 what method name do i need?

 

i am sorry i am just very new to coding 

Edited by Unpuzzledmind32
Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

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