Posted May 13, 20214 yr I've been following a modding tutorial made for 1.16, and I've already come across my fair share of functions with name changes and whatnot. But, for the life of me I cannot seem to figure out ore generation. The issue is with .withPlacement, which the person in the tutorial uses, however, it's no longer a thing. I can't find anything that does the same function as .withPlacement. I had already had to replace .withFeature, which the person in the tutorial uses, with .addFeature as well as .withConfiguration with .configured. import net.minecraft.block.BlockState; import net.minecraft.world.gen.GenerationStage; import net.minecraft.world.gen.feature.Feature; import net.minecraft.world.gen.feature.OreFeatureConfig; import net.minecraft.world.gen.feature.template.RuleTest; import net.minecraft.world.gen.placement.Placement; import net.minecraft.world.gen.placement.TopSolidRangeConfig; import net.minecraftforge.event.world.BiomeLoadingEvent; public class FeatureInit { public static void addOre(final BiomeLoadingEvent event, RuleTest rule, BlockState state, int veinSize, int minHeight, int maxHeight, int amount) { event.getGeneration().addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.configured(new OreFeatureConfig(rule, state, veinSize), new OreFeatureConfig(Placement.RANGE.configured(new TopSolidRangeConfig(minHeight, 0, maxHeight))))); } } Edit 1: .withPlacement is now .decorated, and func_242731_b is .count Edited May 13, 20214 yr by starvingslvt The issue has been resolved
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.