Fix panel harvest levels

This commit is contained in:
Aidan Brady 2014-03-01 11:08:32 -05:00
parent 699749312c
commit d3a3c39221
2 changed files with 13 additions and 1 deletions

View file

@ -4,6 +4,7 @@ import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.ForgeHooks;
public class ItemMekanismPaxel extends ItemMekanismTool
{
@ -17,6 +18,17 @@ public class ItemMekanismPaxel extends ItemMekanismTool
{
return block.blockID != Block.bedrock.blockID ? efficiencyOnProperMaterial : 1.0F;
}
@Override
public float getStrVsBlock(ItemStack stack, Block block, int meta)
{
if(ForgeHooks.isToolEffective(stack, block, meta))
{
return efficiencyOnProperMaterial;
}
return getStrVsBlock(stack, block);
}
@Override
public boolean canHarvestBlock(Block block)

View file

@ -58,7 +58,7 @@ public class ItemMekanismPickaxe extends ItemMekanismTool
@Override
public float getStrVsBlock(ItemStack itemstack, Block block)
{
if(block != null && (block.blockMaterial == Material.iron || block.blockMaterial == Material.rock))
if(block != null && (block.blockMaterial == Material.iron || block.blockMaterial == Material.anvil || block.blockMaterial == Material.rock))
{
return efficiencyOnProperMaterial;
}