public void update(Level level, int x, int y, int z, Random rand) {
      boolean var7 = false;
      z = z;
      y = y;
      x = x;
      level = level;
      boolean var8 = false;

      boolean var6;
      do {
         --y;
         if(level.getTile(x, y, z) != 0 || !this.canFlow(level, x, y, z)) {
            break;
         }

         if(var6 = level.setTile(x, y, z, this.movingId)) {
            var8 = true;
         }
      } while(var6 && this.type != LiquidType.LAVA);

      ++y;
      if(this.type == LiquidType.WATER || !var8) {
         var8 = var8 | this.flow(level, x - 1, y, z) | this.flow(level, x + 1, y, z) | this.flow(level, x, y, z - 1) | this.flow(level, x, y, z + 1);
      }

      if(!var8) {
         level.setTileNoUpdate(x, y, z, this.stillId);
      } else {
         level.addToTickNextTick(x, y, z, this.movingId);
      }

   }