Fix anvil and snow pickup

This commit is contained in:
Ben Spiers 2014-12-27 21:26:20 +00:00
parent aea27f3bd6
commit f419c4e6d5
3 changed files with 17 additions and 2 deletions

View file

@ -51,6 +51,16 @@ public class ItemMekanismPaxel extends ItemMekanismTool
return toolMaterial.getHarvestLevel() >= 2; return toolMaterial.getHarvestLevel() >= 2;
} }
if(block == Blocks.anvil)
{
return toolMaterial.getHarvestLevel() >= 0;
}
if(block == Blocks.snow || block == Blocks.snow_layer)
{
return true;
}
if(block.getMaterial() == Material.rock) if(block.getMaterial() == Material.rock)
{ {
return true; return true;

View file

@ -47,6 +47,11 @@ public class ItemMekanismPickaxe extends ItemMekanismTool
return toolMaterial.getHarvestLevel() >= 2; return toolMaterial.getHarvestLevel() >= 2;
} }
if(block == Blocks.anvil)
{
return toolMaterial.getHarvestLevel() >= 0;
}
if(block.getMaterial() == Material.rock) if(block.getMaterial() == Material.rock)
{ {
return true; return true;

View file

@ -16,7 +16,7 @@ public class ItemMekanismShovel extends ItemMekanismTool
@Override @Override
public boolean canHarvestBlock(Block block, ItemStack stack) public boolean canHarvestBlock(Block block, ItemStack stack)
{ {
if(block == Blocks.snow) if(block == Blocks.snow_layer)
{ {
return true; return true;
} }
@ -28,7 +28,7 @@ public class ItemMekanismShovel extends ItemMekanismTool
{ {
blocksEffectiveAgainst = (new Block[] blocksEffectiveAgainst = (new Block[]
{ {
Blocks.grass, Blocks.dirt, Blocks.sand, Blocks.gravel, Blocks.snow, Blocks.snow, Blocks.clay, Blocks.farmland, Blocks.soul_sand, Blocks.mycelium Blocks.grass, Blocks.dirt, Blocks.sand, Blocks.gravel, Blocks.snow_layer, Blocks.snow, Blocks.clay, Blocks.farmland, Blocks.soul_sand, Blocks.mycelium
}); });
} }
} }