Fix #1678
This commit is contained in:
parent
8b2c098b27
commit
b62b8cc248
1 changed files with 7 additions and 6 deletions
|
@ -101,13 +101,14 @@ public class ItemAdvancedDrill extends ItemDrill {
|
||||||
IBlockState blockState = world.getBlockState(pos);
|
IBlockState blockState = world.getBlockState(pos);
|
||||||
|
|
||||||
ForgePowerItemManager capEnergy = new ForgePowerItemManager(drill);
|
ForgePowerItemManager capEnergy = new ForgePowerItemManager(drill);
|
||||||
|
if(capEnergy.getEnergyStored() > cost){
|
||||||
|
capEnergy.extractEnergy(cost, false);
|
||||||
|
ExternalPowerSystems.requestEnergyFromArmor(capEnergy, playerIn);
|
||||||
|
|
||||||
capEnergy.extractEnergy(cost, false);
|
blockState.getBlock().harvestBlock(world, playerIn, pos, blockState, world.getTileEntity(pos), drill);
|
||||||
ExternalPowerSystems.requestEnergyFromArmor(capEnergy, playerIn);
|
world.setBlockToAir(pos);
|
||||||
|
world.removeTileEntity(pos);
|
||||||
blockState.getBlock().harvestBlock(world, playerIn, pos, blockState, world.getTileEntity(pos), drill);
|
}
|
||||||
world.setBlockToAir(pos);
|
|
||||||
world.removeTileEntity(pos);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean shouldBreak(EntityPlayer playerIn, World worldIn, BlockPos originalPos, BlockPos pos) {
|
private boolean shouldBreak(EntityPlayer playerIn, World worldIn, BlockPos originalPos, BlockPos pos) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue