// due to varying latency.
if (breakBlock(blockMaterial, block, human, session)) {
GeneralEffects.BREAKBLOCK.playGlobal(block.getPosition(), blockMaterial, player);
if (heldItem != null && heldItem.getMaterial() instanceof Tool) {
Tool tool = (Tool) heldItem.getMaterial();
short damage = tool.getDurabilityPenalty(heldItem);
if (currentSlot.get().getData() + damage >= tool.getMaxDurability()) {
currentSlot.set(null);
} else {
currentSlot.addData(damage);
}
}