Fix panel harvest levels
This commit is contained in:
parent
699749312c
commit
d3a3c39221
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue