How would i add in a second ore to generate because when i tried it would generate!
Here is my code without the second ore can someone make a post with the stuff i need so i can copy and paste it to my code.
package net.minecraft.src;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Random;
public class mod_SteelBlocks extends BaseMod
{
public static final Block SteelOre = new SteelOre(160, 0).setStepSound(Block.soundStoneFootstep).setBlockName("SteelOre").setHardness(4.5F).setResistance(5F).setLightValue(0.375F);
public static final Block SteelBlock = new SteelBlock(161, 0).setStepSound(Block.soundStoneFootstep).setBlockName("SteelBlock").setHardness(4.5F).setResistance(5F).setLightValue(0.375F);
public static final Block TinOre = new TinOre(162, 0).setStepSound(Block.soundStoneFootstep).setBlockName("TinOre").setHardness(4.5F).setResistance(5F).setLightValue(0.375F);
public void generateSurface(World world, Random random, int i, int j)
{
//Coal = 15
for(int k = 0; k < 8; k++)
{
int randPosX = i + random.nextInt(16);
int randPosY = random.nextInt(128);
int randPosZ = j + random.nextInt(16);
(new WorldGenMinable(SteelOre.blockID, 17)).generate(world, random, randPosX, randPosY, randPosZ);
}
}
public void load()
{
//Ores
TinOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/SteelOre/TinOre.png");
ModLoader.registerBlock(TinOre);
ModLoader.addName(TinOre, "Tin Ore");
SteelOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/SteelOre/SteelOre.png");
ModLoader.registerBlock(SteelOre);
ModLoader.addName(SteelOre, "Steel Ore");
SteelBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/SteelOre/SteelBlock.png");
ModLoader.registerBlock(SteelBlock);
ModLoader.addName(SteelBlock, "Steel Block");
ModLoader.addRecipe(new ItemStack(SteelBlock, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), mod_SteelMod.SteelIngot, Character.valueOf('X'), Item.stick});
}
public String getVersion()
{
return null;
}
}
Here is my code without the second ore can someone make a post with the stuff i need so i can copy and paste it to my code.
package net.minecraft.src;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Random;
public class mod_SteelBlocks extends BaseMod
{
public static final Block SteelOre = new SteelOre(160, 0).setStepSound(Block.soundStoneFootstep).setBlockName("SteelOre").setHardness(4.5F).setResistance(5F).setLightValue(0.375F);
public static final Block SteelBlock = new SteelBlock(161, 0).setStepSound(Block.soundStoneFootstep).setBlockName("SteelBlock").setHardness(4.5F).setResistance(5F).setLightValue(0.375F);
public static final Block TinOre = new TinOre(162, 0).setStepSound(Block.soundStoneFootstep).setBlockName("TinOre").setHardness(4.5F).setResistance(5F).setLightValue(0.375F);
public void generateSurface(World world, Random random, int i, int j)
{
//Coal = 15
for(int k = 0; k < 8; k++)
{
int randPosX = i + random.nextInt(16);
int randPosY = random.nextInt(128);
int randPosZ = j + random.nextInt(16);
(new WorldGenMinable(SteelOre.blockID, 17)).generate(world, random, randPosX, randPosY, randPosZ);
}
}
public void load()
{
//Ores
TinOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/SteelOre/TinOre.png");
ModLoader.registerBlock(TinOre);
ModLoader.addName(TinOre, "Tin Ore");
SteelOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/SteelOre/SteelOre.png");
ModLoader.registerBlock(SteelOre);
ModLoader.addName(SteelOre, "Steel Ore");
SteelBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/SteelOre/SteelBlock.png");
ModLoader.registerBlock(SteelBlock);
ModLoader.addName(SteelBlock, "Steel Block");
ModLoader.addRecipe(new ItemStack(SteelBlock, 1), new Object [] {"###", "###", "###", Character.valueOf('#'), mod_SteelMod.SteelIngot, Character.valueOf('X'), Item.stick});
}
public String getVersion()
{
return null;
}
}
