From b3671b20c1055c2d1b9b7a59bea17488ecd333be Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Thu, 9 Jul 2015 14:54:53 +0200 Subject: [PATCH] Fixed wrong Method used. Whooops! --- .../ellpeck/actuallyadditions/items/ItemDrill.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemDrill.java b/src/main/java/ellpeck/actuallyadditions/items/ItemDrill.java index b87db30bc..848c11b5c 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemDrill.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemDrill.java @@ -265,9 +265,8 @@ public class ItemDrill extends ItemEnergy implements INameableItem{ } @Override - public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int x, int y, int z, EntityLivingBase living){ - if(!world.isRemote && living instanceof EntityPlayer){ - EntityPlayer player = (EntityPlayer)living; + public boolean onBlockStartBreak(ItemStack stack, int x, int y, int z, EntityPlayer player){ + if(!player.worldObj.isRemote){ int use = this.getEnergyUsePerBlock(stack); if(this.getEnergyStored(stack) >= use){ if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.SILK_TOUCH)) @@ -279,11 +278,11 @@ public class ItemDrill extends ItemEnergy implements INameableItem{ if(!player.isSneaking() && this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.THREE_BY_THREE)){ if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.FIVE_BY_FIVE)){ - this.breakBlocks(stack, 2, world, x, y, z, player); + this.breakBlocks(stack, 2, player.worldObj, x, y, z, player); } - else this.breakBlocks(stack, 1, world, x, y, z, player); + else this.breakBlocks(stack, 1, player.worldObj, x, y, z, player); } - else this.breakBlocks(stack, 0, world, x, y, z, player); + else this.breakBlocks(stack, 0, player.worldObj, x, y, z, player); NBTTagList ench = stack.getEnchantmentTagList(); if(ench != null){ @@ -295,8 +294,9 @@ public class ItemDrill extends ItemEnergy implements INameableItem{ } } } + return true; } - return true; + return false; } @Override