JimiIT92 Posted March 1 Posted March 1 Hi everyone I've renamed a Biome Id in my mod, and as such, when I load a pre-existing world, I get this error when teleporting to said biome [Server thread/ERROR] [minecraft/ChunkSerializer]: Recoverable errors when loading section [-9, 0, 159]: (Unknown registry key in ResourceKey[minecraft:root / minecraft:worldgen/biome]: mineworld:volcanic_peak -> using default) -> volcanic peaks identified as plains where volcanic_peak is the old Id and volcanic_peaks is the new one. As such, the pre-generated biome is now identified as plains, causing some unintended behaviors in that biome (like rain and mobs spawning, wich my custom biome overrides). Is there a way to automatically convert the biome Id for old worlds? For example when loading the world or the chunk? Quote Don't blame me if i always ask for your help. I just want to learn to be better
vemerion Posted March 2 Posted March 2 17 hours ago, JimiIT92 said: Is there a way to automatically convert the biome Id for old worlds? For example when loading the world or the chunk? You can use the 'MissingMappingsEvent' event Quote
JimiIT92 Posted March 2 Author Posted March 2 (edited) Hi, thank you for your response. Unfortunately it seems like the MissingMappingsEvent is not fired in this scenario. What I did is creating a world with the old biome ID, change the biome ID and then load the world ath the biome location. When the world is loaded I get the errors but the breakpoint inside the event listener is never hit This is how I registered the event listener @Mod.EventBusSubscriber(modid = MineWorld.MOD_ID) public final class MissingMappingEvents { /** * Handle the missing mappings and replace them with a valid one * * @param event {@link MissingMappingsEvent The Missing Mappings Event} */ @SubscribeEvent public static void onMissingMapping(final MissingMappingsEvent event) { if(event.getKey().location().equals(new ResourceLocation("mineworld", "volcanic_peak"))) { //Do Stuff } } } If I set the breakpoint directly on the if statement it never gets hit. I've also tried to add a Sysout before the if statement just to see if something gets logged, but it doesn't, so it looks like the event is never called (at least for biomes). I've tried removing an Item and in that case the breakpoint got hit, so I'm assuming is just the biomes? EDIT: I don't know if it matters but I'm using Terrablender for adding Biomes to the world. You can also see how I'm registering biomes here: https://github.com/JimiIT92/MineWorld/blob/master/src/main/java/org/mineworld/core/MWBiomes.java Edited March 2 by JimiIT92 Added source link Quote Don't blame me if i always ask for your help. I just want to learn to be better
Recommended Posts
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.