Jump to content

Ores not generating?


calclavia

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.