2013-08-27 00:49:32 +02:00
|
|
|
package mekanism.tools.item;
|
2012-08-15 22:41:41 +02:00
|
|
|
|
2012-12-20 22:53:39 +01:00
|
|
|
import net.minecraft.block.Block;
|
|
|
|
import net.minecraft.block.material.Material;
|
|
|
|
import net.minecraft.item.EnumToolMaterial;
|
|
|
|
import net.minecraft.item.ItemStack;
|
2012-08-15 22:41:41 +02:00
|
|
|
|
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-29 02:03:55 +01:00
|
|
|
public ItemMekanismAxe(int id, EnumToolMaterial enumtoolmaterial)
|
2012-08-15 22:41:41 +02:00
|
|
|
{
|
2012-11-29 02:03:55 +01:00
|
|
|
super(id, 3, enumtoolmaterial, blocksEffectiveAgainst);
|
2012-08-15 22:41:41 +02:00
|
|
|
}
|
|
|
|
|
2012-11-06 16:44:14 +01:00
|
|
|
@Override
|
2012-11-29 02:03:55 +01:00
|
|
|
public float getStrVsBlock(ItemStack itemstack, Block block)
|
2012-08-15 22:41:41 +02:00
|
|
|
{
|
2012-11-29 02:03:55 +01:00
|
|
|
if (block != null && block.blockMaterial == Material.wood)
|
2012-08-15 22:41:41 +02:00
|
|
|
{
|
|
|
|
return efficiencyOnProperMaterial;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-11-29 02:03:55 +01:00
|
|
|
return super.getStrVsBlock(itemstack, block);
|
2012-08-15 22:41:41 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static
|
|
|
|
{
|
|
|
|
blocksEffectiveAgainst = (new Block[]
|
|
|
|
{
|
|
|
|
Block.planks, Block.bookShelf, Block.wood, Block.chest, Block.woodSingleSlab, Block.woodDoubleSlab, Block.pumpkin, Block.pumpkinLantern
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|