So I'm creating a mod and with the mod comes some ores. The ores generate fine but the problem is that they are able to be minned with a wooden, stone, and gold pickaxe.
Here are the public class':
public static final Block ChipOre = new BlockEmerald(151, 3).setHardness(5F).setResistance(6.0F).setStepSound(Block.soundStoneFootstep).setBlockName("Chipped Emerale Ore").setCreativeTab(CreativeTabs.tabBlock);
public static final Block RubyOre = new BlockRubyOre(152, 3).setHardness(3F).setResistance(6.0F).setStepSound(Block.soundStoneFootstep).setBlockName("Ruby Ore").setCreativeTab(CreativeTabs.tabBlock);
For this, are you saying you want only iron/diamond/better picks to mine them?
If so,
LanguageRegistry.addName(YOURTHING, "YOURTHING");
MinecraftForge.setBlockHarvestLevel(Crafter, "tool", Havest Level/*0 is wood, 1 is stone, 2 is iron, 3 is diamond*/);
GameRegistry.registerBlock(YOURTHING);
That only works if you have forge as your modding platform. Also, this is to be put in your core mod file.
Here are the public class':
public static final Block ChipOre = new BlockEmerald(151, 3).setHardness(5F).setResistance(6.0F).setStepSound(Block.soundStoneFootstep).setBlockName("Chipped Emerale Ore").setCreativeTab(CreativeTabs.tabBlock);
public static final Block RubyOre = new BlockRubyOre(152, 3).setHardness(3F).setResistance(6.0F).setStepSound(Block.soundStoneFootstep).setBlockName("Ruby Ore").setCreativeTab(CreativeTabs.tabBlock);
And Here are the Class files:
package net.minecraft.src;
import java.util.Random;
public class BlockEmerald extends Block
{
protected BlockEmerald(int i, int j)
{
super(i, j, Material.iron);
}
public int idDropped(int parl, Random par2Random, int par3)
{
return mod_EmeraldItems.EmeraldChip.shiftedIndex;
}
public int quantityDropped(Random random)
{
return 1;
}
public String Version()
{
return "1.6";
}
}
And the other one:
package net.minecraft.src;
import java.util.Random;
public class BlockRubyOre extends Block
{
protected BlockRubyOre(int i, int j)
{
super(i, j, Material.iron);
}
public int idDropped(int parl, Random par2Random, int par3)
{
return mod_EmeraldItems.Ruby.shiftedIndex;
}
public int quantityDropped(Random random)
{
return 1;
}
public String Version()
{
return "1.6";
}
}
If so,