code: def launch_minecraft(port, installdir="MalmoPlatform", replaceable=False):
      
      launch_script = './launchClient.sh'
      if os.name == 'nt':
          launch_script = 'launchClient.bat'
      cwd = os.getcwd()
      os.chdir(installdir)
      os.chdir("Minecraft")
      try:
          cmd = [launch_script, '-port', str(port), '-env']
          if replaceable:
              cmd.append('-replaceable')
          subprocess.check_call(cmd)
      finally:
          os.chdir(cwd)
docs: Launch Minecraft listening for malmoenv connections.
      Args:
          port:  the TCP port to listen on.
          installdir: the install dir name. Defaults to MalmoPlatform.
          Must be same as given (or defaulted) in download call if used.
          replaceable: whether or not to automatically restart Minecraft (default is false).