Posted July 30, 201213 yr For some reason, and I can't figure out why, but UE's ore generating suddenly stopped working properly since I switched it to use Forge's new WorldGenMinable with metadata in 3.3.8.161. All codes runs through and I did printlns to see if it places the block in the world and it does. But when I venture around my generated world a lot of times, I couldn't even find one piece of copper/tin in the world. Why is that? Source code: public static void generateSurface(World world, Random rand, int chunkX, int chunkZ) { for (int j = 0; j < blockOre.length; j ++) { if (blockOre[j] != null) { BlockUEOre oreBlock = blockOre[j]; for (int i = 0; i < oreBlock.ores.length; i++) { if (oreBlock.ores[i] != null) { WorldGenMinable worldGenMinable = new WorldGenMinable(oreBlock.blockID, oreBlock.ores[i].amountPerBranch, i); if (oreBlock.ores[i].shouldGenerate) { //Generate Copper for (int l = 0; l < oreBlock.ores[i].amountPerChunk; l++) { int x = chunkX + rand.nextInt(16); int y = rand.nextInt(oreBlock.ores[i].maxGenerateLevel) + oreBlock.ores[i].minGenerateLevel; int z = chunkZ + rand.nextInt(16); worldGenMinable.generate(world, rand, x, y, z); } } } } } } } GitHub Page: https://github.com/calclavia/Universal-Electricity/tree/master/minecraft/net/minecraft/src/universalelectricity/ore http://calclavia.com/uploads/banner.png[/img]
August 3, 201213 yr Shouldgenerate could be false. Just saying. So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.
August 4, 201213 yr I'm planning on adding in ore gen to my mod sometime soon, so if I find a fix, I'll let you know.
August 4, 201213 yr Author Shouldgenerate could be false. Just saying. I did a println after the "shouldGenerate" and it prints out. It even prints it out after the block is set in the world which means it's actually generated/placed in the world. HOWEVER, when I venture around my world (couple of times and my players did also), they found NO ores whatsoever. http://calclavia.com/uploads/banner.png[/img]
August 4, 201213 yr Shouldgenerate could be false. Just saying. I did a println after the "shouldGenerate" and it prints out. It even prints it out after the block is set in the world which means it's actually generated/placed in the world. HOWEVER, when I venture around my world (couple of times and my players did also), they found NO ores whatsoever. Huh. Put print statements inside each level of the generation function and see where it gets. So, what would happen if I did push that shiny red button over there? ... Really? ... Can I try it? ... Damn.
August 5, 201213 yr Author Shouldgenerate could be false. Just saying. I did a println after the "shouldGenerate" and it prints out. It even prints it out after the block is set in the world which means it's actually generated/placed in the world. HOWEVER, when I venture around my world (couple of times and my players did also), they found NO ores whatsoever. Huh. Put print statements inside each level of the generation function and see where it gets. That's why I can't solve this. It prints the line but no ore generates... Hopefully this might not happen when we update UE to MC 1.3.1 http://calclavia.com/uploads/banner.png[/img]
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.