Hey guys im trying to generate a second ore for my mod but it wont work my first ore generates fine but my second one wont heres my working ore stuff
package net.minecraft.src;
import java.util.Random;
public class mod_NecroMod extends BaseMod
{
public static final Item NecroGem = new NecroGem(249).setItemName("NecroGem").setCreativeTab(CreativeTabs.tabMaterials);
public static final Item NecroSword = new ItemSword(250, EnumToolMaterial.Necro).setItemName("NecroSword");
public static final Item NecroPickaxe = new ItemPickaxe(251, EnumToolMaterial.Necro).setItemName("NecroPickaxe");
public static final Item NecroAxe = new ItemAxe(252, EnumToolMaterial.Necro).setItemName("NecroAxe");
public static final Item NecroSpade = new ItemSpade(253, EnumToolMaterial.Necro).setItemName("NecroSpade");
public static final Item NecroHoe = new ItemHoe(254, EnumToolMaterial.Necro).setItemName("NecroHoe");
public static final Item NecroHalfGem = new NecroHGem(255).setItemName("NecroHalfGem").setCreativeTab(CreativeTabs.tabMaterials);
public static final Block NecroOre = new NecroOre(149, 0).setHardness(5.0F).setLightValue(0.0F).setBlockName("NecroOre");
//Ores xD//
public void generateSurface(World world, Random rand, int i, int j) {
//cool=15
for (int rarity = 0; rarity < 15; rarity++) {
int x = i + rand.nextInt(16);
int y = rand.nextInt (256);
int z = j + rand.nextInt(16);
new WorldGenMinable(NecroOre.blockID, 12).generate(world, rand, x, y, z);
}
}
public void load()
{
//Gem//
NecroGem.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/NecroGem.png");
ModLoader.addName(NecroGem, "NecroGem");
ModLoader.addRecipe(new ItemStack(NecroGem, 3), new Object []
{
"OOO", "NDN", "RRR",
'O', Block.obsidian, 'D', NecroHalfGem, 'N', Block.netherrack, 'R', Item.redstone
});
//NecroSword//
NecroSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/NecroSword.png");
ModLoader.addName(NecroSword, "NecroSword");
ModLoader.addRecipe(new ItemStack(NecroSword, 1), new Object[]
{
" ? ", " ? ", " X ",
'X', Item.stick, '?', NecroGem
});
//NecroPiackaxe//
NecroPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/NecroPickaxe.png");
ModLoader.addName(NecroPickaxe, "NecroPickaxe");
ModLoader.addRecipe(new ItemStack(NecroPickaxe, 1), new Object []
{
"GGG", " S ", " S ",
'G', NecroGem, 'S', Item.stick
});
//NecroAxe//
NecroAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/NecroAxe.png");
ModLoader.addName(NecroAxe, "NecroAxe");
ModLoader.addRecipe(new ItemStack(NecroAxe, 1), new Object []
{
" GG", " SG", " S ",
'G', NecroGem, 'S', Item.stick
});
//NecroSpade//
NecroSpade.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/NecroSpade.png");
ModLoader.addName(NecroSpade, "NecroSpade");
ModLoader.addRecipe(new ItemStack(NecroSpade, 1), new Object []
{
" G ", " S ", " S ",
'G', NecroGem, 'S', Item.stick
});
//NecroSpade//
NecroHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/NecroHoe.png");
ModLoader.addName(NecroHoe, "NecroHoe");
ModLoader.addRecipe(new ItemStack(NecroHoe, 1), new Object []
{
"GG ", " S ", " S ",
'G', NecroGem, 'S', Item.stick
});
//NecoHGem//
NecroHalfGem.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/NecroHGem.png");
ModLoader.addName(NecroHalfGem, "NecroHalfGem");
//NecroOre//
ModLoader.registerBlock(NecroOre);
NecroOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/ore/NecroOre.png");
ModLoader.addName(NecroOre, "NecroOre");
//Smelting//
ModLoader.addSmelting(NecroOre.blockID, new ItemStack(NecroHalfGem,1), 1.0F);{
}
}
public String getVersion() {
return "3.141.59265";
}
}
And the text isnt strait cause of pmcs txt limit
mod_DarkNecro this is the class that wont work with generating the ore
ackage net.minecraft.src;
import java.util.Random;
import net.minecraft.client.Minecraft;
public class mod_DarkNecro extends BaseMod
{
public static final Block DarkNecro = new DarkNecro(151, 0).setHardness(5.0F).setLightValue(0.0F).setBlockName("DarkNecro");
public void generateSurface1(World world, Random rand, int i, int j) {
//cool=15
for (int rarity = 0; rarity < 15; rarity++) {
int x = i + rand.nextInt(16);
int y = rand.nextInt (256);
int z = j + rand.nextInt(16);
new WorldGenMinable(DarkNecro.blockID, 12).generate(world, rand, x, y, z);
}
}
public String getVersion() {
return null;
}
And if your wondering i do have classes made for the ores like this one
package net.minecraft.src;
import java.util.Random;
public class DarkNecro extends Block
{
public DarkNecro(int par1, int par2)
{
super(par1, par2, Material.rock);
this.setCreativeTab(CreativeTabs.tabBlock);
}
/**
* Returns the ID of the items to drop on destruction.
*/
public Block idDropped(Block par1, Random par2Random, int par3)
{
return mod_DarkNecro.DarkNecro;
}
}
So if u guys can help it would be great!
package net.minecraft.src;
import java.util.Random;
public class mod_NecroMod extends BaseMod
{
public static final Item NecroGem = new NecroGem(249).setItemName("NecroGem").setCreativeTab(CreativeTabs.tabMaterials);
public static final Item NecroSword = new ItemSword(250, EnumToolMaterial.Necro).setItemName("NecroSword");
public static final Item NecroPickaxe = new ItemPickaxe(251, EnumToolMaterial.Necro).setItemName("NecroPickaxe");
public static final Item NecroAxe = new ItemAxe(252, EnumToolMaterial.Necro).setItemName("NecroAxe");
public static final Item NecroSpade = new ItemSpade(253, EnumToolMaterial.Necro).setItemName("NecroSpade");
public static final Item NecroHoe = new ItemHoe(254, EnumToolMaterial.Necro).setItemName("NecroHoe");
public static final Item NecroHalfGem = new NecroHGem(255).setItemName("NecroHalfGem").setCreativeTab(CreativeTabs.tabMaterials);
public static final Block NecroOre = new NecroOre(149, 0).setHardness(5.0F).setLightValue(0.0F).setBlockName("NecroOre");
//Ores xD//
public void generateSurface(World world, Random rand, int i, int j) {
//cool=15
for (int rarity = 0; rarity < 15; rarity++) {
int x = i + rand.nextInt(16);
int y = rand.nextInt (256);
int z = j + rand.nextInt(16);
new WorldGenMinable(NecroOre.blockID, 12).generate(world, rand, x, y, z);
}
}
public void load()
{
//Gem//
NecroGem.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/NecroGem.png");
ModLoader.addName(NecroGem, "NecroGem");
ModLoader.addRecipe(new ItemStack(NecroGem, 3), new Object []
{
"OOO", "NDN", "RRR",
'O', Block.obsidian, 'D', NecroHalfGem, 'N', Block.netherrack, 'R', Item.redstone
});
//NecroSword//
NecroSword.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/NecroSword.png");
ModLoader.addName(NecroSword, "NecroSword");
ModLoader.addRecipe(new ItemStack(NecroSword, 1), new Object[]
{
" ? ", " ? ", " X ",
'X', Item.stick, '?', NecroGem
});
//NecroPiackaxe//
NecroPickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/NecroPickaxe.png");
ModLoader.addName(NecroPickaxe, "NecroPickaxe");
ModLoader.addRecipe(new ItemStack(NecroPickaxe, 1), new Object []
{
"GGG", " S ", " S ",
'G', NecroGem, 'S', Item.stick
});
//NecroAxe//
NecroAxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/NecroAxe.png");
ModLoader.addName(NecroAxe, "NecroAxe");
ModLoader.addRecipe(new ItemStack(NecroAxe, 1), new Object []
{
" GG", " SG", " S ",
'G', NecroGem, 'S', Item.stick
});
//NecroSpade//
NecroSpade.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/NecroSpade.png");
ModLoader.addName(NecroSpade, "NecroSpade");
ModLoader.addRecipe(new ItemStack(NecroSpade, 1), new Object []
{
" G ", " S ", " S ",
'G', NecroGem, 'S', Item.stick
});
//NecroSpade//
NecroHoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/NecroHoe.png");
ModLoader.addName(NecroHoe, "NecroHoe");
ModLoader.addRecipe(new ItemStack(NecroHoe, 1), new Object []
{
"GG ", " S ", " S ",
'G', NecroGem, 'S', Item.stick
});
//NecoHGem//
NecroHalfGem.iconIndex = ModLoader.addOverride("/gui/items.png", "/items/NecroHGem.png");
ModLoader.addName(NecroHalfGem, "NecroHalfGem");
//NecroOre//
ModLoader.registerBlock(NecroOre);
NecroOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/ore/NecroOre.png");
ModLoader.addName(NecroOre, "NecroOre");
//Smelting//
ModLoader.addSmelting(NecroOre.blockID, new ItemStack(NecroHalfGem,1), 1.0F);{
}
}
public String getVersion() {
return "3.141.59265";
}
}
And the text isnt strait cause of pmcs txt limit
mod_DarkNecro this is the class that wont work with generating the ore
ackage net.minecraft.src;
import java.util.Random;
import net.minecraft.client.Minecraft;
public class mod_DarkNecro extends BaseMod
{
public static final Block DarkNecro = new DarkNecro(151, 0).setHardness(5.0F).setLightValue(0.0F).setBlockName("DarkNecro");
public void generateSurface1(World world, Random rand, int i, int j) {
//cool=15
for (int rarity = 0; rarity < 15; rarity++) {
int x = i + rand.nextInt(16);
int y = rand.nextInt (256);
int z = j + rand.nextInt(16);
new WorldGenMinable(DarkNecro.blockID, 12).generate(world, rand, x, y, z);
}
}
public String getVersion() {
return null;
}
And if your wondering i do have classes made for the ores like this one
package net.minecraft.src;
import java.util.Random;
public class DarkNecro extends Block
{
public DarkNecro(int par1, int par2)
{
super(par1, par2, Material.rock);
this.setCreativeTab(CreativeTabs.tabBlock);
}
/**
* Returns the ID of the items to drop on destruction.
*/
public Block idDropped(Block par1, Random par2Random, int par3)
{
return mod_DarkNecro.DarkNecro;
}
}
So if u guys can help it would be great!
1
lol...
