public void swapPaint(int var1) {
      if(var1 > 0) {
         var1 = 1;
      }

      if(var1 < 0) {
         var1 = -1;
      }

      for(this.selected -= var1; this.selected < 0; this.selected += this.slots.length) {
         ;
      }

      while(this.selected >= this.slots.length) {
         this.selected -= this.slots.length;
      }

   }