Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

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.

  • 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.

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.

  • 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

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.