From 2ced3acb93d8089a61830674e82dd8983a4d534f Mon Sep 17 00:00:00 2001 From: lilingfengdev Date: Fri, 20 Sep 2024 20:22:43 +0800 Subject: [PATCH] r2! --- .github/workflows/main.yml | 11 ++++++++++- src/auto-optimize.py | 6 +++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 70a48a6..69aa99a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,4 +32,13 @@ jobs: automatic_release_tag: ${{ matrix.os }} prerelease: true files: | - dist/* \ No newline at end of file + dist/* + - uses: ryand56/r2-upload-action@latest + with: + r2-account-id: ${{ secrets.R2_ACCOUNT_ID }} + r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }} + r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }} + r2-bucket: ${{ secrets.R2_BUCKET }} + source-dir: scripts/${{ matrix.os }} + destination-dir: ./dist + keep-file-fresh: 'true' \ No newline at end of file diff --git a/src/auto-optimize.py b/src/auto-optimize.py index de77756..e0fede7 100644 --- a/src/auto-optimize.py +++ b/src/auto-optimize.py @@ -174,7 +174,9 @@ def optimize_paper_world(paper): paper["collisions"]["fix-climbing-bypassing-cramming-rule"] = True paper["misc"]["update-pathfinding-on-block-update"] = False paper["misc"]["redstone-implementation"] = "ALTERNATE_CURRENT" - if not (os.path.exists("pufferfish.yml") or os.path.exists("leaf_config/leaf_global_config.toml")): + if not (os.path.exists("pufferfish.yml") or + os.path.exists("leaf_config/leaf_global_config.toml") or + os.path.exists("config/leaf-global.yml")): paper["tick-rates"]["behavior"] = { "villager": { "validatenearbypoi": 60, @@ -280,9 +282,7 @@ def optimize_leaf_legacy(leaf): def optimize_leaf_global(leaf): leaf["async"]["async-pathfinding"]["enabled"] = True leaf["async"]["async-mob-spawning"]["enabled"] = True - leaf["async"]["async-pathfinding"]["max-threads"] = 4 leaf["async"]["async-entity-tracker"]["enabled"] = True - leaf["async"]["async-entity-tracker"]["max-threads"] = 4 if ask("使用 Citizens"): leaf["async"]["async-entity-tracker"]["compat-mode"] = True leaf["performance"]["use-virtual-thread-for-async-scheduler"] = True