public int generateDurability(int blockY) {
        int durability = baseDurability_;
        if (variance_ > 0) {
            // variance_ is a max +- adjustment range to add to the durability
            durability += Citadel.getRandom().nextInt() % (variance_ * 2 + 1);
            durability -= variance_;
        }
        if (yAdjustment_ < 0.00001 || yAdjustment_ > 0.00001) {
            // yAdjustment_ is a gradient +- adjustment as the block's
            //  Y-value distances from 0. It is a float so the gradient
            //  can be gradual.
            durability += (int)((float)blockY * yAdjustment_);
        }
        if (durability < minDurability_) {
            return minDurability_;
        }
        if (durability > maxDurability_) {
            return maxDurability_;
        }
        return durability;
    }