public float getCurrentPlayerStrVsBlock(Block block) { float f = inventory.getStrVsBlock(block); float f1 = f; int i = EnchantmentHelper.getEfficiencyModifier(inventory); if (i > 0 && inventory.canHarvestBlock(block)) { f1 += i * i + 1; } if (isPotionActive(Potion.digSpeed)) { f1 *= 1.0F + (float) (getActivePotionEffect(Potion.digSpeed).getAmplifier() + 1) * 0.2F; } if (isPotionActive(Potion.digSlowdown)) { f1 *= 1.0F - (float) (getActivePotionEffect(Potion.digSlowdown).getAmplifier() + 1) * 0.2F; } if (isInsideOfMaterial(Material.water) && !EnchantmentHelper.getAquaAffinityModifier(inventory)) { f1 /= 5F; } if (!onGround) { f1 /= 5F; } return f1; }
public boolean canHarvestBlock(Block block) { return inventory.canHarvestBlock(block); }