docs: public void stop(MissionDiagnostics diags)
      {
          if( !this.isRunning )
          {
              return;
          }
          if (this.videoProducer != null)
              this.videoProducer.cleanup();
  
          // stop sending video frames
          try
          {
              MinecraftForge.EVENT_BUS.unregister(this);
          }
          catch(Exception e)
          {
              System.out.println("Failed to unregister video hook: " + e);
          }
          // Close our TCP socket:
          this.connection.close();
          this.isRunning = false;
  
          // allow the user to resize the window again
          Display.setResizable(true);
  
          // And fill in some diagnostic data:
          if (diags != null)
          {
              VideoData vd = new VideoData();
              vd.setFrameType(this.videoProducer.getVideoType().toString());
              vd.setFramesSent((int) this.framesSent);
              if (this.timeOfLastFrame == this.timeOfFirstFrame)
                  vd.setAverageFpsSent(new BigDecimal(0));
              else
                  vd.setAverageFpsSent(new BigDecimal(1000.0 * this.framesSent / (this.timeOfLastFrame - this.timeOfFirstFrame)));
              diags.getVideoData().add(vd);
          }
      }