Posted January 19, 201312 yr Hi! I'm pretty new to modding and have a weird error with my world generation. This is my IWorldGenerator class: package dramentiaras.crysathium.client.core; import java.util.Random; import net.minecraft.world.World; import net.minecraft.world.biome.BiomeGenBase; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import cpw.mods.fml.common.IWorldGenerator; import dramentiaras.crysathium.common.CrysathiumMain; public class CrysathiumOreGenerator implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { BiomeGenBase biome = world.getBiomeGenForCoords(chunkX, chunkZ); for (int i = 0; i < 2; i++) { int randPosX = chunkX + random.nextInt(16); int randPosY = random.nextInt(32); int randPosZ = chunkZ + random.nextInt(16); (new WorldGenMinable(CrysathiumMain.blockOreCrysathium.blockID, 5)).generate(world, random, randPosX, randPosY, randPosZ); System.out.println("Crysathium Ore generated at x: " + randPosX + " y:" + randPosY + " z:" + randPosZ); } for (int i = 0; i < 2; i++) { int randPosX = chunkX + random.nextInt(16); int randPosY = random.nextInt(32); int randPosZ = chunkZ + random.nextInt(16); (new WorldGenMinable(CrysathiumMain.blockOreHunitite.blockID, 5)).generate(world, random, randPosX, randPosY, randPosZ); System.out.println("Hunitite Ore generated at x: " + randPosX + " y:" + randPosY + " z:" + randPosZ); } } } However when I create a new world the x and z coords are almost the same (about the range of -40 to 40). My conclusion is that it's generating ore in the same chunk over and over again. When I go to the coords I find tons of ore veins (however it should only generate 2 per chunk) and in other chunks I find none. I have never seen anyone with this problem before and I would very much appreciate any help I can get!
January 20, 201312 yr Author Wait, I think I got it to work, I just multiplied chunkX and Z with 16. However the println statements doesn't print out the correct locations.
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.