Fixed the silk touch issue again
This commit is contained in:
parent
219aa69860
commit
b9d880abe2
1 changed files with 9 additions and 0 deletions
|
@ -76,6 +76,15 @@ public class ItemRockCutter extends ItemPickaxe implements IElectricItem {
|
||||||
public boolean canHarvestBlock(Block block, ItemStack stack){
|
public boolean canHarvestBlock(Block block, ItemStack stack){
|
||||||
return Items.diamond_pickaxe.canHarvestBlock(block, stack);
|
return Items.diamond_pickaxe.canHarvestBlock(block, stack);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getHarvestLevel(ItemStack stack, String toolClass)
|
||||||
|
{
|
||||||
|
if(!stack.isItemEnchanted()){
|
||||||
|
stack.addEnchantment(Enchantment.silkTouch, 1);
|
||||||
|
}
|
||||||
|
return super.getHarvestLevel(stack, toolClass);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float func_150893_a(ItemStack stack, Block block) {
|
public float func_150893_a(ItemStack stack, Block block) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue