mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-26 08:48: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
|
@Override
|
||||||
public boolean onBlockDestroyed(ItemStack stack, World world, Block block, int x, int y, int z, EntityLivingBase living){
|
public boolean onBlockStartBreak(ItemStack stack, int x, int y, int z, EntityPlayer player){
|
||||||
if(!world.isRemote && living instanceof EntityPlayer){
|
if(!player.worldObj.isRemote){
|
||||||
EntityPlayer player = (EntityPlayer)living;
|
|
||||||
int use = this.getEnergyUsePerBlock(stack);
|
int use = this.getEnergyUsePerBlock(stack);
|
||||||
if(this.getEnergyStored(stack) >= use){
|
if(this.getEnergyStored(stack) >= use){
|
||||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.SILK_TOUCH))
|
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(!player.isSneaking() && this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.THREE_BY_THREE)){
|
||||||
if(this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.FIVE_BY_FIVE)){
|
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();
|
NBTTagList ench = stack.getEnchantmentTagList();
|
||||||
if(ench != null){
|
if(ench != null){
|
||||||
|
@ -295,8 +294,9 @@ public class ItemDrill extends ItemEnergy implements INameableItem{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue