Posted March 30, 20232 yr I'm concerned the answer might be painfully simple, since I've been slightly off base today - but I'm trying to get an Array of all of the "TagKey<Biome>" fields defined in Tags.Biomes (I'll be iterating through them to check for biome tags, and using the keys instead of raw text tags is better for language compatibility). The ones such as "IS_HOT", "IS_LUSH", "IS_MOUNTAIN", etc.. I cannot for the life of me figure out how and where to pull a list of all these from. I would just copy them in manually but that presents potential compatibility issues if another mod chooses to add new tags. Any help? Edited March 30, 20232 yr by SpectralGerbil
March 30, 20232 yr If you are iterating over tags, you are almost certainly doing it wrong. Tags are meant as a kind of flag to say "does this object have this property". They can change dynamically, e.g. if somebody changes and reloads datapacks while minecraft is running. That means you should not do any preprocessing or caching based on their values at any one specific point in time. If you really want to do it. For a datapack registry it looks something like this: @EventBusSubscriber(modid = MODID) public class Test { @SubscribeEvent public static void listBiomesTagKeys(ServerStartingEvent event) { var biomes = event.getServer().registryAccess().registryOrThrow(Registries.BIOME); biomes.getTagNames().forEach(tagKey -> LOG.info(tagKey.toString())); } } Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
March 30, 20232 yr Author Thanks for the info - that method you sent is just what I needed and I'll put some measures in place to prevent things from going as you said they might Edited March 30, 20232 yr by SpectralGerbil
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.