Hello!
I have recently begun to learn Java and am working on a little mod to test my skills. Whilst I probably won't release this mod to anybody within the community, I wish to polish it off completely and see what I can do with it.
Unfortunately, I have encountered a slight hiccup, as my block Mollionite Ore can be mined with any pickaxe.
Here is the class file for you coding experts to take a look at, if you please:
package com.pxlhub.advancedores.blocks;
import java.util.Random;
import com.pxlhub.advancedores.items.ModItems;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
public class MollioniteOre extends Block {
public MollioniteOre() {
super(Material.glass);
setBlockName("mollioniteOre");
setCreativeTab(CreativeTabs.tabBlock);
setStepSound(soundTypePiston);
setHardness(3.0F);
setResistance(7.5F);
setHarvestLevel("pickaxe", 2);
}
@Override
public Item getItemDropped(int metadata, Random random, int fortune) {
return ModItems.mollioniteCrystal;
}
}
I'm not sure how that will look on the forum, so if you like PasteBin, click here!
As you can see, I have included the setHarvestLevel (Function is it?), but it can still be mined with any pickaxe and the Mollionite Crystal is still dropped! Is there something key I am missing?
Thanks for the help,
PXLForce