Posted February 28, 20232 yr I created and registered several placed features through code (not json based) Now I need to add them to vanilla biomes, for this I created biome tags for the biomes the features are supposed to generate in. the biome tag is created at: /data/example_mod/tags/worldgen/biome/has_feature/large_mushroom.json the biome tag is referenced in my code like this: public static final TagKey<Biome> HAS_FEATURE_LARGE_MUSHROOM = getTagKey("has_feature/large_mushroom"); /* more tags created similar */ private static TagKey<Biome> getTagKey(String id) { return TagKey.create(Registry.BIOME_REGISTRY, new ResourceLocation("example_mod", id)); } my BiomeLoadingEvent (registered to the forge eventbus) public static void onBiomeLoad(final BiomeLoadingEvent event) { Biome biome = ForgeRegistries.BIOMES.getValue(event.getName()); boolean isCorrectBiome = ForgeRegistries.BIOMES.tags().getTag(HAS_FEATURE_LARGE_MUSHROOM).contains(biome); //always false } It looks like the biome tags are not filled/validated when the BiomeLoadingEvent is fired? but using the command `/locatebiome #example_mod:has_feature/large_mushroom` works without problems Am I missing something, or is there another way of adding my features to biomes without hardcoding them?
March 1, 20232 yr Author So, I created an example repository with my problem, might be easier to understand then my explanation https://github.com/tristankechlo/BiomeTagsForBiomeLoadingEvent
March 1, 20232 yr The main issue is that `BiomeLoadingEvent` intercepts the biome before it is loaded, so it wouldn't be in the registry. Additionally, I believe that the event is loaded before tags are populated, so you wouldn't be able to write anything anyways. In my opinion, I would just update to 1.19 with biome modifiers and use those since they have no issues supporting tags.
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.