Skip to content

Commit

Permalink
r2!
Browse files Browse the repository at this point in the history
  • Loading branch information
lilingfengdev committed Sep 20, 2024
1 parent e93dea9 commit 2ced3ac
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,13 @@ jobs:
automatic_release_tag: ${{ matrix.os }}
prerelease: true
files: |
dist/*
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'
6 changes: 3 additions & 3 deletions src/auto-optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2ced3ac

Please sign in to comment.