private void bindAmountScrolled() {
      int var1 = this.getContentHeight() - (this.bottom - this.top - 4);
      if(var1 < 0) {
         var1 /= 2;
      }

      if(this.amountScrolled < 0.0F) {
         this.amountScrolled = 0.0F;
      }

      if(this.amountScrolled > (float)var1) {
         this.amountScrolled = (float)var1;
      }

   }