Posted August 31, 201213 yr Hello everyone. Im stuck in the following problem (some of you might now this?): i added some new mods to my already "well civilized" world. the mods added some ores. now they only spawn in newly generated chunks -> bad (more or less). so i thought to let the existing chunks in the overworld "repopulate". There is a simple function in the ChunkProvider, named "populate", which should by its description "Populate chunk with ores etc etc". Well! So this should be done very quick i thought. Did a tiny mod with a serverside proxy, added a function to it which is called through @ServerStarted. The method runs through, gives me my debugging FMLLog output... but nothing changes. Has anybody done this before or is able to give me some helping code (i wasnt able to find out, which chunks are already generated and which not)? Here is what my function looks like (currently): public void started() { WorldServer wld = DimensionManager.getWorlds()[0]; int wdim = wld.getWorldInfo().getDimension(); String wname = wld.getWorldInfo().getWorldName(); FMLLog.info("started %s (%d)", wname, wdim); IChunkProvider cp = wld.getChunkProvider(); for (int x = -10; x <= 10;x++) { for (int y = -10;y <= 10;y++) { Chunk ch = cp.loadChunk(x, y); ch.isTerrainPopulated = false; cp.populate(cp, x, y); FMLLog.info("Pop %d %d (%d %d)", x, y, ch.getChunkCoordIntPair().getCenterXPos(),ch.getChunkCoordIntPair().getCenterZPosition()); } } FMLLog.info("finished"); }
September 1, 201213 yr The simple answer would be there is a reason both vanilla minecraft and mods don't already do this. Consider the following: you install Redpower. "Ohai base let me completely destroy you and generate a volcano in your location ". Just generating ores might not have such a direct effect, but could still do some unexpected things. For instance triggering huge sand collapses or again stuff like redpower's marble generation will change your world quite a bit. You are still free to try of course, just note that it might end up destroying your world a bit.
September 1, 201213 yr Author For these things i have a mirror of the worldsave on a testing server. Also there is always a backup available Thanks for your concerns, but hm... this hasnt solved my problem
September 24, 201213 yr You can corrupt the chunks that you want to regenerate using the map editing utility. When MC reloads it then it will regenerate. Make backups of course!
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.