mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Fixed wrong Method used. Whooops!
This commit is contained in:
parent
2d5a9981ca
commit
b3671b20c1
1 changed files with 7 additions and 7 deletions
|
@ -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,9 +294,10 @@ public class ItemDrill extends ItemEnergy implements INameableItem{
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float func_150893_a(ItemStack stack, Block block){
|
||||
|
|
Loading…
Reference in a new issue