diff --git a/PCRC.py b/PCRC.py index fac98ea..a6db62e 100644 --- a/PCRC.py +++ b/PCRC.py @@ -1,7 +1,6 @@ -# coding: utf8 - import time import traceback +from typing import Optional if __name__ == '__main__': from utils import utils, constant @@ -16,7 +15,7 @@ from .utils.config import Config from .utils.pycraft.exceptions import YggdrasilError -recorder = None +recorder: Optional[Recorder] = None logger = Logger(name='PCRC') ConfigFile = utils.get_path('config.json') TranslationFolder = utils.get_path('lang/') diff --git a/readme.md b/readme.md index 8bc3592..bc73627 100644 --- a/readme.md +++ b/readme.md @@ -38,6 +38,7 @@ PCRC currently supports connecting to vanilla Minecraft server. Supports version - 1.16.3 - 1.16.4 - 1.17.1 + ## Advantage - Can be hosted server side for 24/7 recording diff --git a/readme_cn.md b/readme_cn.md index e0c8d55..6f516ad 100644 --- a/readme_cn.md +++ b/readme_cn.md @@ -36,6 +36,8 @@ PCRC 目前支持连接官服原版 Minecraft 服务端,支持以下版本: - 1.16.1 - 1.16.2 - 1.16.3 +- 1.16.4 +- 1.17.1 ## 优势 @@ -54,6 +56,7 @@ PCRC 目前支持连接官服原版 Minecraft 服务端,支持以下版本: 4. 在控制台中输入指令 `start` 以启动 PCRC 5. (**推荐**)将 PCRC 机器人切换为旁观者模式 6. 使用控制台或游戏内聊天来控制 PCRC + ## 配置文件 配置文件为 `config.json`,所有设置均可在其中更改。其中名为如 `__1__` 的为分隔符,无需修改 diff --git a/requirements.txt b/requirements.txt index d3a10ce..a0f7d71 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ cryptography>=1.5 -requests~=2.22.0 +requests>=2.22.0 future PyYAML>=5.1 -PyNBT~=3.0.0 +PyNBT>=3.0.0 diff --git a/utils/constant.py b/utils/constant.py index 28d5c63..f75edd5 100644 --- a/utils/constant.py +++ b/utils/constant.py @@ -2,7 +2,7 @@ import os from . import pycraft -Version = '0.11.2-alpha' +Version = '0.11.3-alpha' ROOT_PATH = [ os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', ''), # I'm in ./utils/ folder so ../ might be the path './', diff --git a/utils/recorder.py b/utils/recorder.py index e78bced..d894f46 100644 --- a/utils/recorder.py +++ b/utils/recorder.py @@ -91,7 +91,7 @@ def is_working(self): return self.working def onConnectionException(self, exc, exc_info): - self.logger.error('Exception in network thread: {}'.format(exc)) + self.logger.error('Exception in network thread: {} {}'.format(type(exec), exc)) self.logger.debug(traceback.format_exc()) if not self.stop_by_user: self.logger.error('Stopping the recorder since PCRC has not been stopped by user')