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

I'm very confused here...I have a custom ore I want to generate, and I was told to run "OreDictionary.registerOre" on the ore to add it to the ore dictionary. However, that still doesn't seem to cause it to spawn? I'm confused on how to set it up to spawn how I want it to spawn (I'd like to add multiple ores with varying spawn rates).

  • Author

That makes sense. Well, the only world generation tutorial I can find isn't for 1.7...could someone help me with that?

  • Author

Sweet! Thanks! That fixed all of my problems. Only one more question. Do I have to make a new generation code for every ore? Here's my OreGen code.

 

package radial.Main;

import java.util.Random;
import net.minecraft.world.gen.feature.WorldGenMinable;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import cpw.mods.fml.common.IWorldGenerator;

public class OreGen implements IWorldGenerator {

@Override
public void generate(Random random, int chunkX, int chunkZ, World world,
		IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
	// TODO Auto-generated method stub
	switch(world.provider.dimensionId){
	case 0 : generateSurface(world, random,chunkX*16,chunkZ*16);
}
}

private void generateSurface(World world, Random random, int BlockX, int BlockZ) {
for(int i = 0; i<10;i++){
	int Xcoord = BlockX + random.nextInt(16);
	int Zcoord = BlockZ + random.nextInt(16);
	int Ycoord = random.nextInt(100);
	(new WorldGenMinable(mainClass.TestOre, 4)).generate(world,  random,  Xcoord,  Ycoord,  Zcoord);
}}
}

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.