2012-11-05 20:29:04 +01:00
|
|
|
package mekanism.common;
|
2012-08-15 22:41:41 +02:00
|
|
|
|
|
|
|
import net.minecraft.src.Block;
|
|
|
|
import net.minecraft.src.EnumToolMaterial;
|
|
|
|
import net.minecraft.src.ItemStack;
|
|
|
|
import net.minecraft.src.Material;
|
|
|
|
|
2012-11-05 20:29:04 +01:00
|
|
|
public class ItemMekanismAxe extends ItemMekanismTool
|
2012-08-15 22:41:41 +02:00
|
|
|
{
|
|
|
|
private static Block blocksEffectiveAgainst[];
|
|
|
|
|
2012-11-05 20:29:04 +01:00
|
|
|
public ItemMekanismAxe(int par1, EnumToolMaterial par2EnumToolMaterial)
|
2012-08-15 22:41:41 +02:00
|
|
|
{
|
|
|
|
super(par1, 3, par2EnumToolMaterial, blocksEffectiveAgainst);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
|
|
|
|
* sword
|
|
|
|
*/
|
|
|
|
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
|
|
|
|
{
|
|
|
|
if (par2Block != null && par2Block.blockMaterial == Material.wood)
|
|
|
|
{
|
|
|
|
return efficiencyOnProperMaterial;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return super.getStrVsBlock(par1ItemStack, par2Block);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static
|
|
|
|
{
|
|
|
|
blocksEffectiveAgainst = (new Block[]
|
|
|
|
{
|
|
|
|
Block.planks, Block.bookShelf, Block.wood, Block.chest, Block.woodSingleSlab, Block.woodDoubleSlab, Block.pumpkin, Block.pumpkinLantern
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|