Skip to content

Commit

Permalink
leaf nbbbb
Browse files Browse the repository at this point in the history
  • Loading branch information
lilingfengdev committed Nov 23, 2024
1 parent d14f9d5 commit 49f1c1c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
5 changes: 1 addition & 4 deletions src/auto-antiseedcracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ def config_leaf_legacy(leaf):

@handler(r"config/leaf-global.yml")
def config_leaf_global(leaf):
if os.path.exists("world"):
print("你需要删除原有存档才可以使用")
else:
leaf["misc"]["secure-seed"]["enabled"] = True
leaf["misc"]["secure-seed"]["enabled"] = True


def download_antiseedcracker():
Expand Down
14 changes: 9 additions & 5 deletions src/auto-optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
print("开始优化!")

danger = ask("是否开启危险优化(会严重影响玩家体验)?")
experiment = ask("是否开启实验性优化(这些没有被合并到主分支)?")


@handler('server.properties', ServerPropLoader.load, ServerPropLoader.dump)
Expand Down Expand Up @@ -205,10 +204,9 @@ def optimize_paper_world(paper):
"loot-tables": True,
"villager-trade": True
}
if experiment:
paper["tick-rates"]["wet-farmland"] = 2
paper["spawn"]["keep-spawn-loaded"] = False
paper["spawn"]["keep-spawn-loaded-range"] = 3
paper["tick-rates"]["wet-farmland"] = 2
paper["spawn"]["keep-spawn-loaded"] = False
paper["spawn"]["keep-spawn-loaded-range"] = 3


@handler('config/gale-world-defaults.yml')
Expand Down Expand Up @@ -283,8 +281,11 @@ def optimize_leaf_global(leaf):
leaf["async"]["async-pathfinding"]["enabled"] = True
leaf["async"]["async-mob-spawning"]["enabled"] = True
leaf["async"]["async-entity-tracker"]["enabled"] = True
leaf["async"]["async-locator"]["enabled"] = True
if ask("使用 Citizens"):
leaf["async"]["async-entity-tracker"]["compat-mode"] = True
if danger:
leaf["performance"]["throttle-hopper-when-full"]["enabled"] = True
leaf["performance"]["use-virtual-thread-for-async-scheduler"] = True
leaf["performance"]["reduce-packets"]["reduce-entity-move-packets"] = True
leaf["performance"]["optimize-minecart"]["enabled"] = True
Expand All @@ -294,9 +295,12 @@ def optimize_leaf_global(leaf):
dab = leaf["performance"]["dab"]
dab["max-tick-freq"] = 20
dab["activation-dist-mod"] = 7
if not danger:
dab["dont-enable-if-in-water"] = True
leaf["performance"]["dont-save-entity"]["dont-save-primed-tnt"] = True
leaf["performance"]["dont-save-entity"]["dont-save-falling-block"] = True
leaf["gameplay-mechanisms"]["player"]["disable-moved-wrongly-threshold"] = True
leaf["misc"]["lag-compensation"]["enabled"] = True


if __name__ == "__main__":
Expand Down

0 comments on commit 49f1c1c

Please sign in to comment.