Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


Forge Modder
  • Posts

  • Joined

  • Last visited

Everything posted by jackmano

  1. HELP! My code is not working, I followed like 8 different tuts, stole code from GitHub (only as last resort), but my ore doesnt generate! Main Class - package com.rabidfox.syntheticgems; import net.minecraft.block.Block; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.EventHandler; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.registry.GameRegistry; @Mod(modid = "syntheticgems", version = "1.0.0") public class SyntheticGems { //Block Variables// public static Block orebauxite; public static Block oresodium; //Item Variables// public static Item itemsodiumraw; public static Item itemlye; public static Item itemlyesolution; @EventHandler public void preinit(FMLPreInitializationEvent event) { //Block Variable Defining// orebauxite = new OreBauxite(); orebauxite.setHarvestLevel("pickaxe", 1); oresodium = new OreSodium(); oresodium.setHarvestLevel("pickaxe", 0); //Item Variable Defining// itemsodiumraw = new ItemSodiumRaw(); itemlye = new ItemLye(); itemlyesolution = new ItemLyeSolution(); //Block Variable Registering// GameRegistry.registerBlock(orebauxite, "orebauxite"); GameRegistry.registerBlock(oresodium, "oresodium"); //Item Variable Registering// GameRegistry.registerItem(itemsodiumraw, "itemsodiumraw"); GameRegistry.registerItem(itemlye, "itemlye"); GameRegistry.registerItem(itemlyesolution, "itemlyesolution"); //Smelting// GameRegistry.addSmelting(oresodium, new ItemStack(itemsodiumraw), (float) 0.1); //Shapeless// GameRegistry.addShapelessRecipe(new ItemStack(itemlye,1), itemsodiumraw, Items.water_bucket); GameRegistry.addShapelessRecipe(new ItemStack(itemlyesolution,1), new ItemStack(itemlye), new ItemStack(Items.potionitem, 0)); } public void init(FMLInitializationEvent event) { //Generator Registry// GameRegistry.registerWorldGenerator(new SynthOreGen(), 5); } } Ore Gen - package com.rabidfox.syntheticgems; import java.util.Random; 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 SynthOreGen 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); System.out.println("Generated Bauxite in chunk at " + chunkX*16 + "x, " + chunkZ*16 + "z!"); break; case 1: generateInEnd(world, random, chunkX*16, chunkZ*16); } } private void generateInEnd(World world, Random random, int x, int z) { // TODO Auto-generated method stub } private void generateInOverworld(World world, Random random, int x, int z) { // TODO Auto-generated method stub for (int i = 0; i < 25; i++) { // means set i = 0, then if its less than 25 keep adding one to i int chunkX = x + random.nextInt(16); int chunkY = random.nextInt(256); int chunkZ = z + random.nextInt(16); new WorldGenMinable(SyntheticGems.orebauxite, 50).generate(world, random, chunkX, chunkY, chunkZ); } } private void generateInNether(World world, Random random, int x, int z) { // TODO Auto-generated method stub } } PLZ HELP ME
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.