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

Idk why my ore will not spawn

 

package com.kingz101.ore;

 

import java.util.Random;

 

import com.kingz101.blocks.MBlocks;

 

import net.minecraft.world.World;

import net.minecraft.world.chunk.IChunkProvider;

import net.minecraft.world.gen.feature.WorldGenMinable;

import cpw.mods.fml.common.IWorldGenerator;

 

public class SMOreGeneration implements IWorldGenerator {

 

  @Override

  public void generate(Random random, int chunkX, int chunkZ, World world,

        IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {

     

 

        switch(world.provider.dimensionId) {

        case -1 :

            generateInNether(world,random, chunkX*16, chunkZ*16);

            break;

        case 0 :

            generateInOverworld(world,random, chunkX*16, chunkZ*16);

            break;

        case 1 :

            generateInEnd(world,random, chunkX*16, chunkZ*16);

            break;

       

        }

     

  }

 

  public void generateInEnd(World world, Random random, int x, int y) {

     

     

  }

 

  public void generateInOverworld(World world, Random random, int x, int z) {

      for(int i = 0; i < 16; i++) {

        int xcoord = x + random.nextInt(16);

        int ycoord =  random.nextInt(256);

        int zcoord = z + random.nextInt(16);

        new WorldGenMinable(MBlocks.SMO, 4).generate(world, random, xcoord, ycoord, zcoord);

      }

     

  }

 

  public void generateInNether(World world, Random random, int x, int y) {

     

  }

 

}

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

package com.kingz101.ore;

 

import cpw.mods.fml.common.IWorldGenerator;

import cpw.mods.fml.common.registry.GameRegistry;

 

public class Ore {

 

public static void mainRegistry() {

defineOre();

IWorldGenerator SMOGen;

}

 

public static IWorldGenerator SMOGen;

 

public static void defineOre() {

 

SMOGen = new SMOreGeneration();

}

 

}

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

MAINREG

 

package com.kingz101.main;

 

 

import com.kingz101.armor.Marmor;

import com.kingz101.blocks.MBlocks;

import com.kingz101.item.MItems;

import com.kingz101.lib.RefStrings;

import com.kingz101.ore.Ore;

 

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.EventHandler;

import cpw.mods.fml.common.SidedProxy;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.event.FMLPostInitializationEvent;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;

 

@Mod(modid = RefStrings.MODID , name = RefStrings.NAME , version = RefStrings.VERSION)

public class MainRegistry {

 

@SidedProxy(clientSide = RefStrings.CLIENTSIDE , serverSide = RefStrings.SERVERSIDE)

public static ServerProxy proxy;

 

@EventHandler

public static void PreLoad(FMLPreInitializationEvent PreEvent) {

MItems.mainRegistry();

MBlocks.mainRegistry();

Ore.mainRegistry();

CraftingManager.mainRegistry();

proxy.registerRenderInfo () ;

}

@EventHandler

public static void load(FMLInitializationEvent event) {

 

}

@EventHandler

public static void PostLoad(FMLPostInitializationEvent PostEvent) {

 

}

}

 

 

 

I don't think you remembered to register your world generator :)

You Only Live Once, So Win At Golf.

Sorry for my English, I'm American.

No its not. All you did was define a variable.

Check out my mod, Realms of Chaos, here.

 

If I helped you, be sure to press the "Thank You" button!

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.