Posted January 7, 20214 yr Hello! I have to questions regarding World gen: 1. When adding features to a biome in BiomeLoadingEvent, how would you go about checking which biome you're adding that feature to? Right now I test it with: if(BiomeDictionary.hasType(biomeRegistryKey, BiomeDictionary.Type.NETHER)) but how about checking for if it is a Soul Sand Valley or Crimson Forest? This is my current solution but I don't like it since event.getName() can return null sometimes: if (biomeName.equals("soul_sand_valley")) 2. Where about in generation should I check my config boolean if it is enabled or not? Is this a good place to do it? This will allow the generation to be changed when a biome is loaded but it will not update if you are in game and change the config: @SubscribeEvent(priority = EventPriority.HIGH) public static void addFeaturesToBiomes(BiomeLoadingEvent event) { BiomeGenerationSettingsBuilder generation = event.getGeneration(); RegistryKey<Biome> biomeRegistryKey = RegistryKey.getOrCreateKey(ForgeRegistries.Keys.BIOMES, Objects.requireNonNull(event.getName(), "Biome registry name was null")); //Check here if feature is enabled/disabled in config if (MyConfig.isThisEnabaled && BiomeDictionary.hasType(biomeRegistryKey, BiomeDictionary.Type.OVERWORLD)) { generation.withFeature(GenerationStage.Decoration.VEGETAL_DECORATION, getFeature(ModConfiguredFeatures.ROSE_PATCHES)); } } Thanks for the help! My mod for futher awesomeness: http://www.minecraftforum.net/topic/1714396-the-decopack-collection-v010-wip-made-a-signature-new-snapshot-1-screenshots-are-up-small-snapshot-1-is-out-for-147/#entry21250399
January 8, 20214 yr Author Any info on this? Would really be appreciated! My mod for futher awesomeness: http://www.minecraftforum.net/topic/1714396-the-decopack-collection-v010-wip-made-a-signature-new-snapshot-1-screenshots-are-up-small-snapshot-1-is-out-for-147/#entry21250399
January 8, 20214 yr 15 hours ago, Godis_apan said: 1. When adding features to a biome in BiomeLoadingEvent, how would you go about checking which biome you're adding that feature to? Right now I test it with: I think you can try this: if(event.getCategory().equals(Biome.Category.NETHER)) { }
January 8, 20214 yr Author Yes that's is what I'm already doing?? But I wanna check for specific Nether biomes such as Soul Sand Valley and only spawn in those. That is the question My mod for futher awesomeness: http://www.minecraftforum.net/topic/1714396-the-decopack-collection-v010-wip-made-a-signature-new-snapshot-1-screenshots-are-up-small-snapshot-1-is-out-for-147/#entry21250399
January 8, 20214 yr Author Anyone else have a solution? My mod for futher awesomeness: http://www.minecraftforum.net/topic/1714396-the-decopack-collection-v010-wip-made-a-signature-new-snapshot-1-screenshots-are-up-small-snapshot-1-is-out-for-147/#entry21250399
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.