Posted March 6, 20196 yr What is the correct way to add a block to the world Ore Generation ? i tried it this way (but no Ore found) : package de.madone.ocdtorcher.world.feature; import com.google.common.collect.ImmutableList; import de.madone.ocdtorcher.block.ModBlocks; import net.minecraft.init.Blocks; import net.minecraft.world.biome.Biome; import net.minecraft.world.gen.GenerationStage; import net.minecraft.world.gen.feature.Feature; import net.minecraft.world.gen.feature.MinableConfig; import net.minecraft.world.gen.placement.CountRangeConfig; import net.minecraftforge.common.BiomeManager; public class ModOreFeature { public static void Init() { BiomeManager.getBiomes(BiomeManager.BiomeType.WARM).forEach((BiomeManager.BiomeEntry biomeEntry) -> biomeEntry.biome.addFeature( GenerationStage.Decoration.UNDERGROUND_ORES, Biome.createCompositeFeature( Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, ModBlocks.BLOCK_ORE_COPPER.getDefaultState(), 12), Biome.COUNT_RANGE, new CountRangeConfig(20, 30, 40, 70) // Count, MinHeight, MaxHeightBase, MaxHeight ) )); BiomeManager.getBiomes(BiomeManager.BiomeType.COOL).forEach((BiomeManager.BiomeEntry biomeEntry) -> biomeEntry.biome.addFeature( GenerationStage.Decoration.UNDERGROUND_ORES, Biome.createCompositeFeature( Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, ModBlocks.BLOCK_ORE_COPPER.getDefaultState(), 12), Biome.COUNT_RANGE, new CountRangeConfig(20, 30, 40, 70) // Count, MinHeight, MaxHeightBase, MaxHeight ) )); BiomeManager.getBiomes(BiomeManager.BiomeType.DESERT).forEach((BiomeManager.BiomeEntry biomeEntry) -> biomeEntry.biome.addFeature( GenerationStage.Decoration.UNDERGROUND_ORES, Biome.createCompositeFeature( Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, ModBlocks.BLOCK_ORE_COPPER.getDefaultState(), 12), Biome.COUNT_RANGE, new CountRangeConfig(20, 30, 40, 70) // Count, MinHeight, MaxHeightBase, MaxHeight ) )); BiomeManager.getBiomes(BiomeManager.BiomeType.ICY).forEach((BiomeManager.BiomeEntry biomeEntry) -> biomeEntry.biome.addFeature( GenerationStage.Decoration.UNDERGROUND_ORES, Biome.createCompositeFeature( Feature.MINABLE, new MinableConfig(MinableConfig.IS_ROCK, ModBlocks.BLOCK_ORE_COPPER.getDefaultState(), 12), Biome.COUNT_RANGE, new CountRangeConfig(20, 30, 40, 70) // Count, MinHeight, MaxHeightBase, MaxHeight ) )); } } private void onFMLLoadCompleteEvent(final FMLLoadCompleteEvent event) { LOGGER.info("Starting FMLLoadCompleteEvent"); ModOreFeature.Init(); } Edited March 6, 20196 yr by LTNightshade
March 7, 20196 yr 1.13.2 is pretty new. You might be able to ask @Krevik, but vanilla code is currently (and usually) the best resource. About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
March 7, 20196 yr Well code seems to be similiar to mine. So in my opinion it's problem of registrying it. My way: public Main() { FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup); } private void setup(final FMLCommonSetupEvent event) { //here }
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.