From f949c169a2d635dae34b9f4faf272d03d2333add Mon Sep 17 00:00:00 2001 From: Logan Date: Sun, 18 Oct 2026 15:31:20 -0400 Subject: [PATCH] feat(perf): add one-step tier setup script for existing players Default Options only seeds configs when absent, so existing players never got the tuned settings. build.py --ship now also writes the Deck/Mid/High tier files to config/onion-perf//, and onion-perf-setup.{sh,ps1,bat} (installed into the instance folder) backs up and replaces the tier's config files and merges only the tuned video keys into options.txt, keeping keybinds, audio and vsync/max-FPS choices. PLAYER-TUNING: point players at the script; bench B4 GC verdict (G1 for everyone; ZGC/Shenandoah tested worse); 16 GB PCs 5-6 GB heap. --- .packwizignore | 9 + analysis/client-perf/PLAYER-TUNING.md | 48 +- .../client-perf/proposed-configs/build.py | 21 +- .../proposed-configs/tests/test_perf_setup.py | 237 +++++ .../deck/config/DistantHorizons.toml | 980 ++++++++++++++++++ .../deck/config/entity_model_features.json | 36 + .../deck/config/flywheel-client.toml | 14 + .../onion-perf/deck/config/lambdynlights.toml | 16 + .../deck/config/sodium-options.json | 30 + .../sound_rates.properties | 20 + .../soundphysics.properties | 99 ++ .../onion-perf/deck/config/ssrd-common.toml | 12 + config/onion-perf/deck/options.txt | 11 + .../high/config/DistantHorizons.toml | 980 ++++++++++++++++++ .../high/config/entity_model_features.json | 36 + .../high/config/flywheel-client.toml | 14 + .../onion-perf/high/config/lambdynlights.toml | 16 + .../sound_rates.properties | 20 + .../soundphysics.properties | 99 ++ .../onion-perf/high/config/ssrd-common.toml | 12 + config/onion-perf/high/options.txt | 11 + .../mid/config/DistantHorizons.toml | 980 ++++++++++++++++++ .../mid/config/entity_model_features.json | 36 + .../mid/config/flywheel-client.toml | 14 + .../onion-perf/mid/config/lambdynlights.toml | 16 + .../sound_rates.properties | 20 + .../soundphysics.properties | 99 ++ config/onion-perf/mid/config/ssrd-common.toml | 12 + config/onion-perf/mid/options.txt | 11 + index.toml | 112 ++ onion-perf-setup.bat | 7 + onion-perf-setup.ps1 | 183 ++++ onion-perf-setup.sh | 157 +++ pack.toml | 2 +- 34 files changed, 4348 insertions(+), 22 deletions(-) create mode 100644 analysis/client-perf/proposed-configs/tests/test_perf_setup.py create mode 100644 config/onion-perf/deck/config/DistantHorizons.toml create mode 100644 config/onion-perf/deck/config/entity_model_features.json create mode 100644 config/onion-perf/deck/config/flywheel-client.toml create mode 100644 config/onion-perf/deck/config/lambdynlights.toml create mode 100644 config/onion-perf/deck/config/sodium-options.json create mode 100644 config/onion-perf/deck/config/sound_physics_remastered/sound_rates.properties create mode 100644 config/onion-perf/deck/config/sound_physics_remastered/soundphysics.properties create mode 100644 config/onion-perf/deck/config/ssrd-common.toml create mode 100644 config/onion-perf/deck/options.txt create mode 100644 config/onion-perf/high/config/DistantHorizons.toml create mode 100644 config/onion-perf/high/config/entity_model_features.json create mode 100644 config/onion-perf/high/config/flywheel-client.toml create mode 100644 config/onion-perf/high/config/lambdynlights.toml create mode 100644 config/onion-perf/high/config/sound_physics_remastered/sound_rates.properties create mode 100644 config/onion-perf/high/config/sound_physics_remastered/soundphysics.properties create mode 100644 config/onion-perf/high/config/ssrd-common.toml create mode 100644 config/onion-perf/high/options.txt create mode 100644 config/onion-perf/mid/config/DistantHorizons.toml create mode 100644 config/onion-perf/mid/config/entity_model_features.json create mode 100644 config/onion-perf/mid/config/flywheel-client.toml create mode 100644 config/onion-perf/mid/config/lambdynlights.toml create mode 100644 config/onion-perf/mid/config/sound_physics_remastered/sound_rates.properties create mode 100644 config/onion-perf/mid/config/sound_physics_remastered/soundphysics.properties create mode 100644 config/onion-perf/mid/config/ssrd-common.toml create mode 100644 config/onion-perf/mid/options.txt create mode 100644 onion-perf-setup.bat create mode 100644 onion-perf-setup.ps1 create mode 100755 onion-perf-setup.sh diff --git a/.packwizignore b/.packwizignore index c68b308..9dbf29d 100644 --- a/.packwizignore +++ b/.packwizignore @@ -69,3 +69,12 @@ config/paxi/datapacks/* # ModernFix mixin overrides (build.py SHIP; enforced - ModernFix reads it before # Default Options runs). dynamic_resources=true per bench B6. !config/modernfix-mixins.properties +# Player tier overrides (build.py --ship) plus the per-machine setup script that +# applies a tier to an existing install (see PLAYER-TUNING.md §1). Must come after +# the blanket config/* and *.json patterns above (last matching pattern wins), and +# the directory itself must be re-included before anything under it. +!config/onion-perf +!config/onion-perf/** +!onion-perf-setup.sh +!onion-perf-setup.ps1 +!onion-perf-setup.bat diff --git a/analysis/client-perf/PLAYER-TUNING.md b/analysis/client-perf/PLAYER-TUNING.md index bd63b69..d33ee5b 100644 --- a/analysis/client-perf/PLAYER-TUNING.md +++ b/analysis/client-perf/PLAYER-TUNING.md @@ -1,7 +1,7 @@ # Onion MC: performance settings for players These are things the pack can't set for you, plus the settings to change for your machine. -Values marked *(provisional)* are waiting on Phase 2 benchmarks and may change. +All values below are final (benchmarked in Phase 2; see `RESULTS-proxy.md` in this folder). ## 1. Which tier are you? @@ -12,24 +12,34 @@ Values marked *(provisional)* are waiting on Phase 2 benchmarks and may change. | **High** | 8 GB+ VRAM card | GTX 1080 Ti, RTX 3060+ | The pack's defaults are the **mid** tier. They're applied only when the config file doesn't -exist yet. **If you played before the defaults shipped**, close the game and delete these -files from the instance folder to pick them up on the next launch. This resets those mods' -settings. +exist yet. **If you played before the defaults shipped**, close Minecraft and run the +tier setup script in the instance folder to apply a tier over your current settings: + +- **Windows:** double-click `onion-perf-setup.bat` in the instance folder. +- **Linux / Steam Deck / macOS:** run `sh onion-perf-setup.sh` in the instance folder. + +Pick your tier when prompted. The script backs up everything it changes (to +`onion-perf-backup//`), replaces these 7 config files (the **deck** tier also +ships `config/sodium-options.json`; **high** has the same 7 as mid), and merges the tuned +video keys into `options.txt` — your keybinds, audio and every other setting stay as +they are. Nothing else is touched. + +Manual fallback: copy the files below from `config/onion-perf//` in the instance +folder over your own configs, and set the `options.txt` values from the table below by +hand (don't copy a tier's `options.txt` over yours — that resets all your video, audio +and control settings, keybinds included): ``` config/DistantHorizons.toml -config/sodium-options.json config/entity_model_features.json config/flywheel-client.toml config/lambdynlights.toml config/ssrd-common.toml config/sound_physics_remastered/soundphysics.properties +config/sound_physics_remastered/sound_rates.properties ``` -Don't delete `options.txt`: that resets all your video, audio and control settings, -keybinds included. Set the video values in the table below by hand instead. - -Then change these for your tier *(provisional)*: +The whole tier table below is applied by the script: | Setting | Where | Deck | Mid | High | | --- | --- | --- | --- | --- | @@ -55,25 +65,23 @@ each GC pause longer. Bench (B4h): **5 GB is enough; 4 GB is measurably worse** | Your machine | Max memory (`-Xmx`) | Min memory | | --- | --- | --- | | Steam Deck (16 GB shared with the GPU) | **5 GB**, never above 6 | leave low (512 MB) | -| 16 GB PC | **6 GB** | leave low | +| 16 GB PC | **5–6 GB** | leave low | | 32 GB PC | **6–8 GB** | may equal max | | PC with little free RAM (other apps/containers running) | min(6 GB, free RAM − 2 GB) | leave low | -**JVM arguments** *(provisional; Phase 2 block B4 picks the winner)*. Paste one line into -*Java arguments* (Prism adds `-Xmx` itself from the memory box): +**JVM arguments** — bench block B4 settled this: the client-tuned G1 line below and the +phase-0 G1 set tied (S5 tour 1 % low 226.8 vs 228.1 fps), while Generational ZGC and +Shenandoah were measurably worse on the tour scene (1 % low 216.6 and 173.4 vs 226.8 fps). +So: **the G1 line below, for everyone.** Paste it into *Java arguments* (Prism adds +`-Xmx` itself from the memory box): - **Default (all machines):** client-tuned G1 ``` -XX:+UseG1GC -XX:MaxGCPauseMillis=37 -XX:G1HeapRegionSize=16M -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=23 -XX:G1ReservePercent=20 -XX:G1MixedGCCountTarget=3 -XX:G1HeapWastePercent=20 -XX:InitiatingHeapOccupancyPercent=10 -XX:G1RSetUpdatingPauseTimePercent=0 -XX:MaxTenuringThreshold=1 -XX:GCTimeRatio=99 -XX:+DisableExplicitGC -XX:+PerfDisableSharedMem ``` -- **32 GB machines, if you still get stutter:** Generational ZGC. Distant Horizons - recommends it in its log warning about G1. - ``` - -XX:+UseZGC -XX:+ZGenerational -XX:+DisableExplicitGC -XX:+PerfDisableSharedMem - ``` - `-XX:+ZGenerational` is required: on Java 21, `-XX:+UseZGC` alone selects the older - non-generational ZGC. Avoid ZGC on the Deck or on low-RAM PCs. It needs spare memory and - CPU those machines don't have. +- Don't switch to Generational ZGC — not even on 32 GB machines. Distant Horizons + recommends it in a log warning about G1, but here it **tested worse** (tour 1 % low + 216.6 fps vs 226.8 for G1; Shenandoah was worse still at 173.4). Don't add `-XX:+AlwaysPreTouch` on the Deck or on low-RAM PCs. Don't copy `-XX:ShenandoahGCMode=iu` from older guides: Java 21 refuses to start with it. diff --git a/analysis/client-perf/proposed-configs/build.py b/analysis/client-perf/proposed-configs/build.py index 1caee11..b1f4bcc 100644 --- a/analysis/client-perf/proposed-configs/build.py +++ b/analysis/client-perf/proposed-configs/build.py @@ -11,7 +11,8 @@ pinned jar's source (see README.md, "Key provenance"). Output: out//, plus out/MANIFEST.md. python3 build.py # from this directory; stdlib only - python3 build.py --ship # also copy T-default into the repo (see SHIP), then + python3 build.py --ship # also copy T-default into the repo (see SHIP) and the + # player tiers into config/onion-perf/ (see PERF), then # run `packwiz refresh` from the repo root """ import json @@ -48,6 +49,15 @@ SHIP = { "config/modernfix-mixins.properties": "config/modernfix-mixins.properties", } +# Player tiers `--ship` also writes to config/onion-perf// (paths relative to +# the game dir) for onion-perf-setup.sh/.ps1, which existing players run to apply a +# tier over their configs. A tier carries only the files its layers tune, so +# untuned files (sable-client.toml; sodium-options.json except on deck) keep the +# player's own settings. modernfix-mixins.properties is enforced by packwiz already. +PERF = "config/onion-perf" +PERF_TIERS = {"deck": "T-deck", "mid": "T-default", "high": "T-high"} # mid == pack default +PERF_SKIP = {"config/modernfix-mixins.properties"} + # game-dir path -> (base file, format, may_append_new_keys) FILES = { "options.txt": (TEMPLATES / "options.txt", "options", False), @@ -384,6 +394,15 @@ def main(): (REPO / dst).parent.mkdir(parents=True, exist_ok=True) shutil.copyfile(OUT / "T-default" / src, REPO / dst) print(f"shipped {len(SHIP)} files to {REPO / DO}; now run `packwiz refresh`") + shutil.rmtree(REPO / PERF, ignore_errors=True) + for tier, vid in PERF_TIERS.items(): + layers, _ = VARIANTS[vid] + names = sorted({n for layer in layers for n in layer} - PERF_SKIP) + for name in names: + dst = REPO / PERF / tier / name + dst.parent.mkdir(parents=True, exist_ok=True) + shutil.copyfile(OUT / vid / name, dst) + print(f"shipped tier {tier} ({vid}): {len(names)} files to {REPO / PERF / tier}") main() diff --git a/analysis/client-perf/proposed-configs/tests/test_perf_setup.py b/analysis/client-perf/proposed-configs/tests/test_perf_setup.py new file mode 100644 index 0000000..61737bd --- /dev/null +++ b/analysis/client-perf/proposed-configs/tests/test_perf_setup.py @@ -0,0 +1,237 @@ +"""Tests for onion-perf-setup.sh (and .ps1 when pwsh exists) against temp instance dirs. + +Needs `python3 build.py --ship` to have generated config/onion-perf/ in the repo. +Run: python3 -m unittest discover -s analysis/client-perf/proposed-configs/tests +""" +import shutil +import subprocess +import tempfile +import unittest +from pathlib import Path + +REPO = Path(__file__).resolve().parents[4] +PERF = REPO / "config" / "onion-perf" +SCRIPTS = ["onion-perf-setup.sh", "onion-perf-setup.ps1", "onion-perf-setup.bat"] + +OLD_OPTIONS = ( + "version:3955\n" + "maxFps:144\n" + "enableVsync:false\n" + "renderDistance:12\n" + "mipmapLevels:4\n" + "soundCategory_master:0.5\n" + "key_key.attack:key.mouse.left\n" + "key_key.jump:key.keyboard.space\n" + 'resourcePacks:["vanilla","file/MyPack.zip"]\n' +) + + +def runners(): + """(name, argv prefix) for every available POSIX-sh implementation, plus pwsh.""" + out = [("sh", ["sh"])] + if shutil.which("dash"): + out.append(("dash", ["dash"])) + if shutil.which("zsh"): + out.append(("zsh-emulate-sh", ["zsh", "--emulate", "sh"])) + return out + + +PWSH = shutil.which("pwsh") + + +def tier_options(tier): + kv = {} + for line in (PERF / tier / "options.txt").read_text().splitlines(): + k, _, v = line.partition(":") + kv[k] = v + return kv + + +class Base: + """Mixin; subclasses set self.cmd(script, args) -> argv.""" + + def setUp(self): + if not (PERF / "mid").is_dir(): + self.skipTest("config/onion-perf not generated (run build.py --ship)") + self.tmp = Path(tempfile.mkdtemp()) + self.game = self.tmp / "instance" + (self.game / "config").mkdir(parents=True) + shutil.copytree(PERF, self.game / "config" / "onion-perf") + for s in SCRIPTS: + shutil.copy(REPO / s, self.game / s) + (self.game / "config" / "DistantHorizons.toml").write_text("old dh\n") + (self.game / "config" / "unrelated.toml").write_text("keep me\n") + (self.game / "options.txt").write_text(OLD_OPTIONS) + + def tearDown(self): + shutil.rmtree(self.tmp, ignore_errors=True) + + def run_setup(self, *args, cwd=None): + return subprocess.run(self.cmd(*args), cwd=cwd or self.tmp, stdin=subprocess.DEVNULL, + capture_output=True, text=True, timeout=60) + + def backups(self): + d = self.game / "onion-perf-backup" + return sorted(d.iterdir()) if d.is_dir() else [] + + def test_tier_copy_backup_and_merge(self): + for tier in ("deck", "mid", "high"): + with self.subTest(tier=tier): + if tier != "deck": + self.tearDown() + self.setUp() + r = self.run_setup(tier, "--yes") + self.assertEqual(r.returncode, 0, r.stdout + r.stderr) + src = PERF / tier + for f in (src / "config").rglob("*"): + if f.is_file(): + rel = f.relative_to(src) + self.assertEqual((self.game / rel).read_bytes(), f.read_bytes(), rel) + self.assertEqual((self.game / "config/unrelated.toml").read_text(), "keep me\n") + # backup holds the pre-run files + (b,) = self.backups() + self.assertEqual((b / "config/DistantHorizons.toml").read_text(), "old dh\n") + self.assertEqual((b / "options.txt").read_text(), OLD_OPTIONS) + self.assertFalse((b / "config/unrelated.toml").exists()) + # options merged key by key + want = tier_options(tier) + lines = (self.game / "options.txt").read_text().splitlines() + kv = dict(line.partition(":")[::2] for line in lines) + for k in ("version", "maxFps", "enableVsync"): + self.assertEqual(kv[k], dict(x.partition(":")[::2] + for x in OLD_OPTIONS.splitlines())[k], k) + for k, v in want.items(): + if k not in ("version", "maxFps", "enableVsync"): + self.assertEqual(kv[k], v, k) + for keep in ("soundCategory_master:0.5", "key_key.attack:key.mouse.left", + "key_key.jump:key.keyboard.space", + 'resourcePacks:["vanilla","file/MyPack.zip"]'): + self.assertIn(keep, lines) + self.assertEqual(len(lines), len(set(line.partition(":")[0] for line in lines))) + # existing lines keep their positions; appended keys go at the end + self.assertEqual(lines[0], "version:3955") + self.assertTrue(lines[3].startswith("renderDistance:")) + if want["mipmapLevels"] != "4": + self.assertIn(f"mipmapLevels: 4 -> {want['mipmapLevels']}", r.stdout) + else: + self.assertNotIn("mipmapLevels:", r.stdout) + self.assertIn("(unset) ->", r.stdout) + + def test_value_with_colon_replaced_whole(self): + # split on the FIRST ':' only: a tier value containing ':' replaces as a whole + tier_opt = self.game / "config/onion-perf/high/options.txt" + tier_opt.write_text(tier_opt.read_text() + "onionProbe:part1:part2\n") + (self.game / "options.txt").write_text("version:3955\nonionProbe:wrong\n") + r = self.run_setup("high", "--yes") + self.assertEqual(r.returncode, 0, r.stderr) + lines = (self.game / "options.txt").read_text().splitlines() + self.assertIn("onionProbe:part1:part2", lines) + self.assertNotIn("onionProbe:wrong", lines) + self.assertIn("onionProbe: wrong -> part1:part2", r.stdout) + + def test_idempotent(self): + self.assertEqual(self.run_setup("deck", "--yes").returncode, 0) + snap = {p: p.read_bytes() for p in self.game.rglob("*") if p.is_file() + and "onion-perf-backup" not in p.parts} + r = self.run_setup("deck", "--yes") + self.assertEqual(r.returncode, 0, r.stderr) + self.assertIn("nothing changed", r.stdout) + self.assertEqual(len(self.backups()), 1) + for p, data in snap.items(): + self.assertEqual(p.read_bytes(), data, p) + + def test_default_tier_is_mid_when_noninteractive(self): + r = self.run_setup("--yes") + self.assertEqual(r.returncode, 0, r.stderr) + self.assertIn("tier 'mid'", r.stdout) + self.assertEqual((self.game / "config/DistantHorizons.toml").read_bytes(), + (PERF / "mid/config/DistantHorizons.toml").read_bytes()) + + def test_missing_options(self): + (self.game / "options.txt").unlink() + r = self.run_setup("high", "--yes") + self.assertEqual(r.returncode, 0, r.stderr) + self.assertIn("options.txt not found", r.stdout) + self.assertFalse((self.game / "options.txt").exists()) + + def test_crlf_options_preserved(self): + (self.game / "options.txt").write_bytes(OLD_OPTIONS.replace("\n", "\r\n").encode()) + r = self.run_setup("mid", "--yes") + self.assertEqual(r.returncode, 0, r.stderr) + data = (self.game / "options.txt").read_bytes() + self.assertNotIn(b"\r\r", data) + self.assertEqual(data.count(b"\n"), data.count(b"\r\n")) + self.assertIn(b"key_key.attack:key.mouse.left\r\n", data) + self.assertIn(b"biomeBlendRadius:1\r\n", data) + + def test_lf_options_preserved(self): + self.run_setup("mid", "--yes") + self.assertNotIn(b"\r", (self.game / "options.txt").read_bytes()) + + def test_bad_tier(self): + r = self.run_setup("ultra", "--yes") + self.assertNotEqual(r.returncode, 0) + self.assertEqual((self.game / "config/DistantHorizons.toml").read_text(), "old dh\n") + + def test_missing_onion_perf(self): + shutil.rmtree(self.game / "config" / "onion-perf") + r = self.run_setup("mid", "--yes") + self.assertNotEqual(r.returncode, 0) + self.assertIn("Update the modpack", r.stderr) + self.assertEqual(self.backups(), []) + + def test_needs_yes_when_noninteractive(self): + r = self.run_setup("mid") + self.assertNotEqual(r.returncode, 0) + self.assertIn("--yes", r.stderr) + self.assertEqual((self.game / "config/DistantHorizons.toml").read_text(), "old dh\n") + + +def make_sh_case(name, prefix): + class Case(Base, unittest.TestCase): + def cmd(self, *args): + return [*prefix, str(self.game / "onion-perf-setup.sh"), *args] + + def test_run_from_game_dir_with_relative_path(self): + r = subprocess.run([*prefix, "onion-perf-setup.sh", "mid", "--yes"], cwd=self.game, + stdin=subprocess.DEVNULL, capture_output=True, text=True) + self.assertEqual(r.returncode, 0, r.stderr) + + Case.__name__ = Case.__qualname__ = f"Sh_{name.replace('-', '_')}" + return Case + + +for _n, _p in runners(): + globals()[f"Sh_{_n.replace('-', '_')}"] = make_sh_case(_n, _p) + + +@unittest.skipUnless(PWSH, "pwsh not installed: onion-perf-setup.ps1 untested here") +class Pwsh(Base, unittest.TestCase): + def cmd(self, *args): + return [PWSH, "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", + str(self.game / "onion-perf-setup.ps1"), *args] + + +class Packaging(unittest.TestCase): + def test_bat_is_crlf_and_calls_ps1(self): + data = (REPO / "onion-perf-setup.bat").read_bytes() + self.assertEqual(data.count(b"\n"), data.count(b"\r\n")) + self.assertIn(b'-File "%~dp0onion-perf-setup.ps1" %*', data) + + def test_scripts_ascii(self): + for s in SCRIPTS: + (REPO / s).read_bytes().decode("ascii") + + def test_mid_matches_default_options(self): + do = REPO / "config" / "defaultoptions" + self.assertEqual((PERF / "mid/options.txt").read_bytes(), + (do / "options.txt").read_bytes()) + for f in (PERF / "mid/config").rglob("*"): + if f.is_file(): + rel = f.relative_to(PERF / "mid") + self.assertEqual(f.read_bytes(), (do / "extra" / rel).read_bytes(), rel) + self.assertFalse((PERF / "mid/config/modernfix-mixins.properties").exists()) + + +if __name__ == "__main__": + unittest.main() diff --git a/config/onion-perf/deck/config/DistantHorizons.toml b/config/onion-perf/deck/config/DistantHorizons.toml new file mode 100644 index 0000000..fea264c --- /dev/null +++ b/config/onion-perf/deck/config/DistantHorizons.toml @@ -0,0 +1,980 @@ +_version = 4 + +[server] + # + # Defines the distance the player will receive updates around. + realTimeUpdateDistanceRadiusInChunks = 256 + # + # Prefix of the level keys sent to the clients. + # If the mod is running behind a proxy, each backend should use a unique value. + # If this value is empty, level key will be based on the server's seed hash. + levelKeyPrefix = "" + # + # Defines the distance allowed to be synchronized around the player. + # Should be the same or larger than maxGenerationRequestDistance in most cases. + maxSyncOnLoadRequestDistance = 4096 + # + # If true, clients will receive updated LODs when joining or loading new LODs. + synchronizeOnLoad = true + # + # Custom server key used which can be used to always reuse the same LOD data folder, + # for cases when the server doesn't have a static IP for some reason. + # If this value is empty, the client itself decides which folder name to use. + # Requires rejoining the server to apply after changing. + serverKey = "" + # + # Defines the distance allowed to generate around the player. + maxGenerationRequestDistance = 4096 + # + # Makes the server send level keys for each world. + # Disable this if you use alternative ways to send level keys. + sendLevelKeys = true + # + # DO NOT CHANGE UNLESS YOU KNOW WHAT YOU'RE DOING. + # Autogenerated ID used to prevent multiple independent servers from accidentally + # writing over each other's LODs when the same serverKey is set on both. + # + # How many LOD generation requests per second should a client send? + # Also limits the number of client requests allowed to stay in the server's queue. + generationRequestRateLimit = 20 + # + # How many LOD sync requests per second should a client send? + # Also limits the amount of player's requests allowed to stay in the server's queue. + syncOnLoadRateLimit = 50 + # + # If true, clients will receive real-time LOD updates for chunks outside the client's render distance. + enableRealTimeUpdates = true + # + # Maximum global speed for uploading LODs to the clients, in KB/s. + # Value of 0 disables the limit. + globalBandwidthLimit = 0 + # + # Maximum per-player speed for uploading LODs to the clients, in KB/s. + # Value of 0 disables the limit. + playerBandwidthLimit = 500 + # + # Enables adaptive transfer speed based on client performance. + # If true, DH will automatically adjust transfer rate to minimize connection lag. + # If false, transfer speed will remain fixed. + enableAdaptiveTransferSpeed = false + + [common.lodBuilding] + # + # How should block data be compressed when creating LOD data? + # This setting will only affect new or updated LOD data, + # any data already generated when this setting is changed will be + # unaffected until it is modified or re-loaded. + # + # MERGE_SAME_BLOCKS + # Every block/biome change is recorded in the database. + # This is what DH 2.0 and 2.0.1 all used by default and will store a lot of data. + # Expected Compression Ratio: 1.0 + # + # VISUALLY_EQUAL + # Only visible block/biome changes are recorded in the database. + # Hidden blocks (IE ores) are ignored. + # Expected Compression Ratio: 0.7 + worldCompression = "VISUALLY_EQUAL" + # + # Requires a level restart to apply. + # + # Setting this to a less strict mode increases DB read/write + # speed at the cost of potential data loss/corruption if + # the computer looses power + # (unexpected program shutdown should be safe for all options). + # + # FULL + # ACID - data will never be lost or corrupted + # Slow + # At max throughput: ~2k saves per sec, ~70% disk usage + # + # NORMAL + # May not be durable - some data may be lost on power loss, but DB should be safe from corruption + # Fast + # At max throughput: ~14k saves per sec, ~40% disk usage + # + # OFF + # Not consistent - database may be corrupted during power loss + # Very Fast + # At max throughput: ~16k saves per sec, ~6% disk usage + databaseSyncMode = "NORMAL" + dataCompression = "Z_STD_BLOCK" + # + # Enabling this will drastically speed up chunk processing time + # if you are CPU limited. + # Disabling it will drastically speed up chunk processing time + # if you are disk speed/IO limited. + # + # Normally DH will attempt to skip creating LODs for chunks it's already seen + # and that haven't changed. + # + # Disabling this option can also fix a rare bug where + # modified chunks are skipped due to being too similar to + # their saved hash. + disableUnchangedChunkCheck = false + + [common.multiThreading] + # + # How many threads should be used by Distant Horizons? + numberOfThreads = 2 + # + # A value between 1.0 and 0.0 that represents the percentage + # of time each thread can run before going idle. + # + # This can be used to reduce CPU usage if the thread count + # is already set to 1 for the given option, or more finely + # tune CPU performance. + threadRunTimeRatio = "1.0" + # + # What Java thread priority should DH's primary thread pools run with? + # + # You probably don't need to change this unless you are also + # running C2ME and are seeing thread starvation in either C2ME or DH. + threadPriority = 5 + + [common.logging] + # + # If enabled, the mod will log information about the renderer setup, cleanup, and any issues it may encounter. + # This can be useful for debugging. + logRendererEventToFile = "INFO" + # + # If enabled, the mod will log information about the world generation process. + # This can be useful for debugging. + logWorldGenEventToFile = "INFO" + # + # If enabled, the mod will log information about the renderer OpenGL process. + # This can be useful for debugging. + logRendererGLEventToChat = "ERROR" + # + # + globalChatMaxLevel = "ERROR" + # + # If enabled, the mod will log information about the world generation process. + # This can be useful for debugging. + logWorldGenChunkLoadEventToFile = "INFO" + # + # If enabled, the mod will log information about the renderer OpenGL process. + # This can be useful for debugging. + logRendererGLEventToFile = "INFO" + # + # If enabled, the mod will log information about network operations. + # This can be useful for debugging. + logNetworkEventToFile = "INFO" + # + # If enabled, config changes sent by the server will be logged. + logConnectionConfigChangesToFile = "WARN" + # + # + globalFileMaxLevel = "INFO" + + [common.logging.warning] + # + # If enabled, a message will be displayed in chat if explicit garbage collection + # is disabled. + # This is known to cause out-of-memory issues + # and is better solved with a concurrent garbage collector. + showExplicitGcDisabledWarning = false + # + # If enabled, a chat message will be displayed when DH has too many chunks + # queued for updating. + showSlowWorldGenSettingWarnings = true + # + # If enabled, a chat message will be displayed when DH has too many chunks + # queued for updating. + showUpdateQueueOverloadedChatWarning = false + # + # If enabled, a message will be logged if explicit garbage collection + # is disabled. + # This is known to cause out-of-memory issues + # and is better solved with a concurrent garbage collector. + logExplicitGcDisabledWarning = false + # + # If enabled, a chat message will be displayed if Java doesn't have enough + # memory allocated to run DH well. + showLowMemoryWarningOnStartup = true + # + # If enabled, a chat message will be displayed when a replay is started + # giving some basic information about how DH will function. + showReplayWarningOnStartup = true + # + # If enabled, a chat message will be displayed when a potentially problematic + # mod is installed alongside DH. + showModCompatibilityWarningsOnStartup = true + # + # If enabled, a chat message will be displayed if vanilla MC's + # render distance is higher than the recommended amount. + showHighVanillaRenderDistanceWarning = true + # + # If enabled, a chat message will be displayed if DH detects + # that any pooled objects have been garbage collected. + showPoolInsufficientMemoryWarning = true + # + # If enabled, a message will be logged if the garbage + # collector Java is currently using is known + # to cause frame stuttering and/or other issues. + logGarbageCollectorWarning = true + # + # If enabled, a chat message will be displayed in chat if the garbage + # collector Java is currently using is known + # to cause frame stuttering and/or other issues. + showGarbageCollectorWarning = true + + [common.worldGenerator] + # + # How should distant generator progress be displayed? + # + # OVERLAY: may be the same as CHAT for some Minecraft versions + # CHAT + # LOG + # DISABLED + showGenerationProgress = "DISABLED" + # + # If the SURFACE_THEN_CHUNKS generator plan is + # in use, this percentage can be defined to reduce how far the + # second high-quality generation pass will go + # as a percentage of your total render distance: + # -1.0 = Infinity + # 0.0 = 0% + # 0.5 = 50% + # 1.0 = 100% + # 2.0 = 200% + # + # Does nothing on a dedicated server. + surfaceRegenMaxDistancePercent = "-1.0" + # + # The max radius in chunks around the central point where world generation is allowed. + # If this value is set to 0, generation bounds are disabled and the render distance will be used. + # + # This should only be set if you have a pre-generated world that has a very limited size. + # Setting this on a normal MC world will prevent the world generator from filling + # out your render distance. + generationMaxChunkRadius = 0 + # + # If the Minecraft server thread is taking too long + # Distant Horizons will pause world gen to reduce server stuttering/lag. + limitIfServerUnhealthy = true + # + # How often should the distant generator progress be displayed? + generationProgressDisplayIntervalInSeconds = 2 + # + # When logging generation progress also include the rate at which chunks + # are being generated. + # This can be useful for troubleshooting performance. + generationProgressIncludeChunksPerSecond = true + # + # How detailed should LODs be generated outside the vanilla render distance? + # + # PRE_EXISTING_ONLY + # Only create LOD data for already generated chunks. + # + # FEATURES + # Generate everything except structures. + # Note: This may cause world generator bugs or instability when paired with certain world generator mods. + # + # INTERNAL_SERVER + # Ask the local server to generate/load each chunk. + # This is the most compatible and will generate structures correctly, + # but may cause server/simulation lag. + # Note: unlike other modes this option DOES save generated chunks to + # Minecraft's region files. + chunkGeneratorMode = "FEATURES" + # + # Defines how LODs will be generated + # outside the vanilla render distance. + # In multiplayer, this may be overridden by the server. + # + # SURFACE_THEN_CHUNKS + # The rough surface will be generated first + # then chunks will be generated to fill in + # missing features (ie trees and villages). + # + # Recommended for modded or vanilla worlds. + # + # SURFACE_ONLY + # Only the rough surface will be generated. + # Chunk features like trees and villages + # won't be generated. + # + # Recommended for computers that don't have + # enough CPU power or RAM space to handle + # the chunk generator. + # + # CHUNKS_ONLY + # Slower than either surface options, + # but provides more accurate terrain. + # + # Recommended for custom worlds + # where the surface generator would + # generate incorrect terrain. + # + # DISABLED + # No distant terrain will be generated. + generatorPlan = "SURFACE_THEN_CHUNKS" + # + # If true and the player/camera is moving quickly + # Distant Horizons will pause world gen to improve loading speed + # and reduce CPU load. + pauseIfMovingQuickly = true + # + # For how many seconds should instructions for disabling the distant generator progress be displayed? + # Setting this to 0 hides the instructional message so the world gen progress is shown immediately when it starts. + generationProgressDisableMessageDisplayTimeInSeconds = 20 + # + # The center Z chunk position that the world gen max radius is centered around. + generationCenterChunkZ = 0 + # + # The center X chunk position that the world gen max radius is centered around. + generationCenterChunkX = 0 + +[client] + # + # Should Distant Horizon's config button appear in Minecraft's options screen next to the fov slider? + showDhOptionsButtonInMinecraftUi = true + + [client.advanced.autoUpdater] + # + # If DH should use the nightly (provided by Gitlab), or stable (provided by Modrinth) build. + # If [AUTO] is selected DH will update to new stable releases if the current jar is a stable jar + # and will update to new nightly builds if the current jar is a nightly jar (IE the version number ends in '-dev'). + updateBranch = "AUTO" + # + # Automatically check for updates on game launch? + enableAutoUpdater = true + # + # Should Distant Horizons silently, automatically download and install new versions? + # This setting is force disabled on dedicated servers for stability reasons. + enableSilentUpdates = false + + [client.advanced.debugging] + # + # If enabled this will disable (most) vanilla Minecraft rendering. + # + # NOTE: Do not report any issues when this mode is on! + # This setting is only for fun and debugging. + # Mod compatibility is not guaranteed. + lodOnlyMode = false + # + # What renderer is active? + # + # DEFAULT: Default lod renderer + # DEBUG_TRIANGLE: Debug testing renderer + # DISABLED: Disable rendering + rendererMode = "DEFAULT" + # + # If true overlapping quads will be rendered as bright red for easy identification. + # If false the quads will be rendered normally. + showOverlappingQuadErrors = false + # + # If true OpenGL Buffer garbage collection will be logged + # this also includes the number of live buffers. + logBufferGarbageCollection = false + # + # Should specialized colors/rendering modes be used? + # + # OFF: LODs will be drawn with their normal colors. + # SHOW_DETAIL: LODs' color will be based on their detail level. + # SHOW_BLOCK_MATERIAL: LODs' color will be based on their material. + # SHOW_OVERLAPPING_QUADS: LODs will be drawn with total white, but overlapping quads will be drawn with red. + debugRenderingColors = "OFF" + # + # Stops vertex colors from being passed. + # Useful for debugging shaders + enableWhiteWorld = false + # + # If enabled the LODs will render as wireframe. + renderWireframe = false + # + # If true several keys can be used to toggle debug states. + # F6 - enable/disable LOD rendering + # F7 - enable/disable LOD only rendering + # F8 - cycle through the different debug rendering modes + enableDebugKeybindings = false + + [client.advanced.debugging.debugWireframe] + # + # Render LOD section status? + showRenderSectionStatus = false + # + # Render queued network sync on load tasks? + showNetworkSyncOnLoadQueue = false + # + # Render full data update/lock status? + showFullDataUpdateStatus = false + # + # Render queued world gen tasks? + showWorldGenQueue = false + # + # Render Quad Tree Rendering status? + showQuadTreeRenderStatus = false + # + # If enabled, various wireframes for debugging internal functions will be drawn. + # + # NOTE: There WILL be performance hit! + # Additionally, only stuff that's loaded after you enable this + # will render their debug wireframes. + enableRendering = false + + [client.advanced.debugging.openGl] + # + # Defines how OpenGL errors are handled. + # Requires rebooting Minecraft to change. + # Will catch OpenGL errors thrown by other mods. + overrideVanillaGLLogger = true + # + # Defines how OpenGL errors are handled. + # May incorrectly catch OpenGL errors thrown by other mods. + # + # IGNORE: Do nothing. + # LOG: write an error to the log. + # LOG_THROW: write to the log and throw an exception. + # Warning: this should only be enabled when debugging the LOD renderer + # as it may break Minecraft's renderer when an exception is thrown. + glErrorHandlingMode = "IGNORE" + # + # If true each Open GL error will only be logged once. + # Enabling this may cause some error logs to be missed. + # Does nothing if overrideVanillaGLLogger is set to false. + # + # Generally this can be kept as 'true' to prevent log spam. + # However, Please set this to 'false' if a developer needs your log to debug a GL issue. + onlyLogGlErrorsOnce = true + + [client.advanced.debugging.exampleConfigScreen] + shortTest = "69" + mapTest = "{}" + byteTest = "8" + longTest = "42069" + listTest = ["option 1", "option 2", "option 3"] + boolTest = false + doubleTest = "420.69" + floatTest = "0.42069" + linkableTest = 420 + intTest = 69420 + stringTest = "Test input box" + + [client.advanced.debugging.f3Screen] + # + # Shows info about the render thread tasks. + showRenderThreadTasks = false + # + # Shows how many chunks are queued for processing and the max count that can be queued. + showQueuedChunkUpdateCount = true + # + # Shows the memory use and array counts for each DH object pool. + showSeparatedObjectPools = false + # + # Shows the player's LOD position. + showPlayerPos = true + # + # Shows the combined memory use and array counts for all DH pooled objects. + showCombinedObjectPools = false + # + # Defines what internal detail level the player position will be shown as. + # Internal detail level means: 6 = 1x1 block, 7 = 2x2 blocks, etc. + playerPosSectionDetailLevel = 6 + # + # Only show levels that DH is actively rendering. + onlyShowRenderingLevels = true + # + # Shows info about each thread pool. + showThreadPools = true + # + # Shows what levels are loaded and world gen/rendering info about those levels. + showLevelStatus = true + + [client.advanced.debugging.positionFinderDebugging] + positionFinderEnable = false + positionFinderMinBlockY = -64 + positionFinderZPos = 0 + positionFinderXPos = 0 + positionFinderMaxBlockY = 125 + positionFinderDetailLevel = 6 + positionFinderMarginPercent = "0.0" + + [client.advanced.graphics] + # + # Enabling Anti-Aliasing smooths edges and reduces flickering when moving. + enableAntiAliasing = true + # + # Enable Screen Space Ambient Occlusion + enableSsao = false + # + # If true some vanilla graphics settings will be automatically changed + # during DH setup to provide a better experience. + # + # IE disabling vanilla clouds (which render on top of DH LODs), + # and chunk fading (DH already fades MC chunks) + overrideVanillaGraphicsSettings = true + + [client.advanced.graphics.culling] + # + # Determines how far from the camera Distant Horizons will start rendering. + # Measured as a percentage of the vanilla render distance. + # + # -1 = auto, overdraw will change based on the vanilla render distance. + # + # Higher values will prevent LODs from rendering behind vanilla blocks at a higher distance, + # but may cause holes in the world. + # Holes are most likely to appear when flying through unloaded terrain. + # + # Increasing the vanilla render distance increases the effectiveness of this setting. + overdrawPrevention = "-1.0" + # + # Identical to the other frustum culling option + # only used when a shader mod is present using the DH API + # and the shadow pass is being rendered. + # + # Disable this if shadows render incorrectly. + disableShadowPassFrustumCulling = false + # + # A comma separated list of block resource locations that will be replaced by water + # if they're visible on the water's surface. + waterSubSurfaceBlockReplacementCsv = "minecraft:kelp,minecraft:tall_seagrass,minecraft:seagrass" + # + # A comma separated list of block resource locations that won't be rendered by DH. + # Air is always included in this list. + # + # Note: + # If you see gaps, or holes you may have to change + # worldCompression to [MERGE_SAME_BLOCKS] and re-generate the LODs. + ignoredRenderBlockCsv = "minecraft:barrier,minecraft:structure_void,minecraft:light,minecraft:tripwire,minecraft:brown_mushroom" + # + # A comma separated list of block resource locations that will be removed + # when on top of water. + waterSurfaceBlockReplacementCsv = "minecraft:lily_pad" + # + # Defines what blocks should be rendered as LODs. + # + # NONE: Include all blocks in the LODs + # NON_COLLIDING: Only render solid blocks in the LODs (tall grass, torches, etc. will be ignored) + blocksToIgnore = "NON_COLLIDING" + # + # If true LODs outside the player's camera + # aren't drawn, increasing GPU performance. + # + # If false all LODs are drawn, even those behind + # the player's camera, decreasing GPU performance. + # + # Disable this if you see LODs disappearing at the corners of your vision. + disableFrustumCulling = false + # + # If false all beacons near the camera won't be drawn to prevent vanilla overdraw. + # If true all beacons will be rendered. + # + # Generally this should be left as true. It's main purpose is for debugging + # beacon updating/rendering. + disableBeaconDistanceCulling = true + # + # Should the blocks underneath avoided blocks gain the color of the avoided block? + # + # True: a red flower will tint the grass below it red. + # False: skipped blocks will not change color of surface below them. + tintWithAvoidedBlocks = true + # + # If enabled caves won't be rendered. + # + # Note: for some world types this can cause + # overhangs or walls for floating objects. + # Tweaking the caveCullingHeight, can resolve some + # of those issues. + enableCaveCulling = true + # + # At what Y value should cave culling start? + # Lower this value if you get walls for areas with 0 light. + caveCullingHeight = 60 + # + # A comma separated list of block resource locations that shouldn't be rendered + # if they are in a 0 sky light underground area. + # Air is always included in this list. + # + # Defaults to an empty list since most cave blocks will be automatically ignored due to being: + # transparent, non-solid, or liquids, but new blocks can be added here if needed. + ignoredRenderCaveBlockCsv = "" + # + # If set to true the overdraw prevention radius will get closer + # to the camera when flying/moving quickly. + # + # This helps reduce issues where Minecraft can't load or + # generate chunks fast enough to keep up with DH. + reduceOverdrawWithFastMovement = true + + [client.advanced.graphics.texture] + # + # A comma separated list of block resource locations + # that DH will render their sides using the bottom texture. + # Partial matches/incomplete resource locations will also match. + # + # Example: "minecraft:grass_block,nylium" + # + # Changes require a restart. + blocksDontUseSideTextureCsv = "grass_block,mycelium,nylium,dirt_path,grass" + # + # The highest detail level number that can render with block textures. + # At higher detail levels each LOD covers multiple blocks, + # which can essentially make textures smaller than a pixel and therefore invisible. + # + # Larger numbers texture more distant LODs + # but increase memory usage. + maxTexturedLodDetailLevel = 2 + # + # If true nearby and zoomed-in LODs will render with their block's + # actual texture instead of a single flat color. + # + # Only applies to high detail LODs where the texture is actually visible, + # distant LODs always use flat colors. + # Some shader packs nay not have an affect. + enableTexturedLods = true + # + # A comma separated list of block resource locations + # that DH won't render textures on. + # Partial matches/incomplete resource locations will also match. + # + # Example: "minecraft:grass_block,nylium" + # + # Changes require a restart. + blocksDontRenderTextureCsv = "minecraft:bamboo" + # + # A comma separated list of tag names + # that DH will render their sides using the bottom texture. + # + # Example: "grass_blocks,nylium" + # + # Changes require a restart. + blockTagsDontUseSideTextureCsv = "grass_blocks,nylium" + # + # A comma separated list of block resource locations + # that DH will use rasterization to determine + # the face textures. + # + # Can be used to fix issues with mods/blocks where + # a side uses just part of a modeled block's texture. + # + # Example: "minecraft:beacon" + # + # Changes require a restart. + blocksAlwaysRasterizeTextureCsv = "minecraft:beacon" + + [client.advanced.graphics.noiseTexture] + # + # Should a noise texture be applied to LODs? + # + # This is done to simulate textures and make the LODs appear more detailed. + enableNoiseTexture = true + # + # Defines how far should the noise texture render before it fades away. (in blocks) + # Set to 0 to disable noise from fading away + noiseDropoff = 1024 + # + # How many steps of noise should be applied to LODs? + noiseSteps = 4 + # + # How intense should the noise should be? + noiseIntensity = "0.05" + + [client.advanced.graphics.experimental] + # + # A comma separated list of dimension resource locations where DH won't render. + # + # Example: "minecraft:the_nether,minecraft:the_end" + # For Minecraft 1.12.2 and older: + # Open the F3 screen and copy the dimension_name:ID shown in yellow. Example: "overworld:0" + # + # Note: + # Some DH settings will be disabled and/or changed to improve + # visuals when DH rendering is disabled. + ignoredDimensionCsv = "" + # + # Requires a restart to change. + # + # Options: + # AUTO - changes based on the most likely API for that MC version + # OPEN_GL - The Default for MC 1.21.11 and older (supports Iris shaders) + # BLAZE_3D - The Default for MC 26.1.2 and newer (supports Vulkan) + renderingEngine = "AUTO" + # + # This is the earth size ratio when applying the curvature shader effect. + # Note: Enabling this feature may cause rendering bugs. + # + # 0 = flat/disabled + # 1 = 1 to 1 (6,371,000 blocks) + # 100 = 1 to 100 (63,710 blocks) + # 10000 = 1 to 10000 (637.1 blocks) + # + # Note: Due to current limitations, the min value is [50] + # and the max value is 5000. Any values outside this range + # will be set to 0 (disabled). + earthCurveRatio = 0 + + [client.advanced.graphics.genericRendering] + # + # A comma separated separated list of dimension resource locations where DH clouds will render. + # + # Example: "minecraft:overworld,minecraft:the_end" + # + # Changes require a world re-load. + dimensionEnabledCloudRenderingCsv = "minecraft:overworld" + # + # If true LOD clouds will be rendered. + enableCloudRendering = true + # + # If true LOD beacon beams will be rendered wider at extreme distances, + # making them easier to see. + # If false all LOD beacon beams will only ever be 1 block wide. + expandDistantBeacons = true + # + # Sets the maximum height beacons will render up to. + # + # Requires a world re-load to take affect. + beaconRenderHeight = 6000 + # + # If true LOD beacon beams will be rendered. + enableBeaconRendering = true + # + # If true non terrain objects will be rendered by DH. + # i.e. beacon beams and clouds. + enableGenericRendering = true + # + # False = DH will render a single layer of clouds, like vanilla Minecraft. + # True = DH will render 3 layers of clouds at different heights. + enableMultiLayerClouds = true + + [client.advanced.graphics.quality] + # + # What is the maximum detail LODs can render at? + # Higher settings will increase memory and GPU usage. + # + # CHUNK: render 1 LOD for each Chunk. + # HALF_CHUNK: render 4 LODs for each Chunk. + # FOUR_BLOCKS: render 16 LODs for each Chunk. + # TWO_BLOCKS: render 64 LODs for each Chunk. + # BLOCK: render 256 LODs for each Chunk (width of one block). + # + # Fastest: CHUNK + # Fanciest: BLOCK + maxHorizontalResolution = "BLOCK" + # + # If true LODs will fade away as you get closer to them. + # If false LODs will cut off abruptly at a set distance from the camera. + # This setting is affected by the vanilla overdraw prevention config. + ditherDhFade = true + # + # If true DH will try to use the camera position when + # determining LOD quality drop-off. + # If false DH will use the player's position. + # + # Enabling helps free-cam mods render correctly. + # Disabling helps multi-camera mods render correctly (ie Immersive Portals or camera mods). + useCameraPositionForQualityDropOff = true + # + # How bright LOD colors are. + # + # 0 = black + # 1 = normal + # 2 = near white + brightnessMultiplier = "1.0" + # + # How many detail levels zooming in can increase LOD quality by. + # Higher numbers allow stronger zooms to render crisper terrain, + # but will increase memory and GPU usage while zoomed in. + # + # A vanilla spyglass needs 4 detail levels to reach its full quality. + maxZoomQualityIncrease = 4 + # + # How should LODs be shaded? + # + # AUTO: Uses the same side shading as vanilla Minecraft blocks. + # ENABLED: Simulates Minecraft's block shading for LODs. + # Can be used to force LOD shading when using some shaders. + # DISABLED: All LOD sides will be rendered with the same brightness. + lodShading = "AUTO" + # + # How saturated LOD colors are. + # + # 0 = black and white + # 1 = normal + # 2 = very saturated + saturationMultiplier = "1.0" + # + # This indicates how well LODs will represent + # overhangs, caves, floating islands, etc. + # Higher options will make the world more accurate, butwill increase memory and GPU usage. + # + # Lowest Quality: HEIGHT_MAP + # Highest Quality: PIXEL_ART + verticalQuality = "LOW" + # + # The radius of the mod's render distance. (measured in chunks) + # + # Note: this is a best effort number. + # The actual render distance may be above or below this number + # depending on your other graphic settings. + lodChunkRenderDistanceRadius = 64 + # + # How should the sides and bottom of grass block LODs render? + # + # AS_GRASS: all sides of dirt LOD's render using the top (green) color. + # FADE_TO_DIRT: sides fade from grass to dirt. + # AS_DIRT: sides render entirely as dirt. + grassSideRendering = "FADE_TO_DIRT" + # + # This indicates how far apart drops in LOD quality are. + # + # Higher settings will increase the distance between drops + # but will increase memory and GPU usage. + horizontalQuality = "LOW" + # + # How should LOD transparency be handled. + # + # COMPLETE: LODs will render transparent. + # DISABLED: LODs will be opaque. + transparency = "DISABLED" + # + # This is the same as vanilla Biome Blending settings for Lod area. + # Note: anything above '0' will slow down LOD loading time. + # + # '0' equals to Vanilla Biome Blending of '1x1' or 'OFF', + # '1' equals to Vanilla Biome Blending of '3x3', + # '2' equals to Vanilla Biome Blending of '5x5'... + lodBiomeBlending = 1 + # + # How should vanilla Minecraft fade into Distant Horizons LODs? + # + # NONE: Fastest, there will be a pronounced border between DH and MC rendering. + # SINGLE_PASS: Fades after MC's transparent pass, opaque blocks underwater won't be faded. + # DOUBLE_PASS: Slowest, fades after both MC's opaque and transparent passes, provides the smoothest transition. + vanillaFadeMode = "SINGLE_PASS" + # + # If true LOD quality will increase when the camera is zoomed in, + # IE when using a spyglass or zoom mod. + # + # Only LODs visible through the camera view are affected. + # + # When zoomed in LODs will load to the same detail level + # they would have if you were close to them. + increaseQualityWhenZoomedIn = true + + [client.advanced.graphics.fog] + # + # Should Minecraft's fog render? + # Note: Other mods may conflict with this setting. + enableVanillaFog = false + # + # What is the maximum fog thickness? + # + # 0.0: No fog. + # 1.0: Fully opaque fog. + farFogMax = "1.0" + # + # Determines if fog is drawn on DH LODs. + enableDhFog = true + # + # At what distance should the far fog start? + # + # 0.0: Fog starts at the player's position. + # 1.0: Fog starts at the closest edge of the vanilla render distance. + # 1.414: Fog starts at the corner of the vanilla render distance. + farFogStart = "0.4" + # + # What is the minimum fog thickness? + # + # 0.0: No fog. + # 1.0: Fully opaque fog. + farFogMin = "0.0" + # + # What color should fog use? + # + # USE_WORLD_FOG_COLOR: Use the world's fog color. + # USE_SKY_COLOR: Use the sky's color. + colorMode = "USE_WORLD_FOG_COLOR" + # + # How should the fog thickness should be calculated? + # + # LINEAR: Linear based on distance (will ignore 'density') + # EXPONENTIAL: 1/(e^(distance*density)) + # EXPONENTIAL_SQUARED: 1/(e^((distance*density)^2) + farFogFalloff = "EXPONENTIAL_SQUARED" + # + # Used in conjunction with the Fog Falloff. + farFogDensity = "2.5" + # + # Where should the far fog end? + # + # 0.0: Fog ends at player's position. + # 1.0: Fog ends at the closest edge of the vanilla render distance. + # 1.414: Fog ends at the corner of the vanilla render distance. + farFogEnd = "1.0" + + [client.advanced.graphics.fog.heightFog] + # + # Where should the height fog start? + # + # ABOVE_CAMERA: Height fog starts at the camera and goes towards the sky + # BELOW_CAMERA: Height fog starts at the camera and goes towards the void + # ABOVE_AND_BELOW_CAMERA: Height fog starts from the camera to goes towards both the sky and void + # ABOVE_SET_HEIGHT: Height fog starts from a set height and goes towards the sky + # BELOW_SET_HEIGHT: Height fog starts from a set height and goes towards the void + # ABOVE_AND_BELOW_SET_HEIGHT: Height fog starts from a set height and goes towards both the sky and void + heightFogDirection = "BELOW_SET_HEIGHT" + # + # What is the minimum fog thickness? + # + # 0.0: No fog. + # 1.0: Fully opaque fog. + heightFogMin = "0.0" + # + # If the height fog is calculated around a set height, what is that height position? + heightFogBaseHeight = "80.0" + # + # What is the maximum fog thickness? + # + # 0.0: No fog. + # 1.0: Fully opaque fog. + heightFogMax = "1.0" + # + # How should the height fog thickness should be calculated? + # + # LINEAR: Linear based on height (will ignore 'density') + # EXPONENTIAL: 1/(e^(height*density)) + # EXPONENTIAL_SQUARED: 1/(e^((height*density)^2) + heightFogFalloff = "EXPONENTIAL_SQUARED" + # + # What is the height fog's density? + heightFogDensity = "20.0" + # + # How should height effect the fog thickness? + # Note: height fog is combined with the other fog settings. + # + # SPHERICAL: Fog is calculated based on camera distance. + # CYLINDRICAL: Ignore height, fog is calculated based on horizontal distance. + # + # MAX: max(heightFog, farFog) + # ADDITION: heightFog + farFog + # MULTIPLY: heightFog * farFog + # INVERSE_MULTIPLY: 1 - (1-heightFog) * (1-farFog) + # LIMITED_ADDITION: farFog + max(farFog, heightFog) + # MULTIPLY_ADDITION: farFog + farFog * heightFog + # INVERSE_MULTIPLY_ADDITION: farFog + 1 - (1-heightFog) * (1-farFog) + # AVERAGE: farFog*0.5 + heightFog*0.5 + heightFogMixMode = "SPHERICAL" + # + # Should the start of the height fog be offset? + # + # 0.0: Fog start with no offset. + # 1.0: Fog start with offset of the entire world's height. (Includes depth) + heightFogStart = "0.0" + # + # Should the end of the height fog be offset? + # + # 0.0: Fog end with no offset. + # 1.0: Fog end with offset of the entire world's height. (Include depth) + heightFogEnd = "0.6" + + [client.advanced.multiplayer] + # + # How should multiplayer save folders should be named? + # + # NAME_ONLY: Example: "Minecraft Server" + # IP_ONLY: Example: "192.168.1.40" + # NAME_IP: Example: "Minecraft Server IP 192.168.1.40" + # NAME_IP_PORT: Example: "Minecraft Server IP 192.168.1.40:25565"NAME_IP_PORT_MC_VERSION: Example: "Minecraft Server IP 192.168.1.40:25565 GameVersion 1.16.5" + serverFolderNameMode = "NAME_ONLY" diff --git a/config/onion-perf/deck/config/entity_model_features.json b/config/onion-perf/deck/config/entity_model_features.json new file mode 100644 index 0000000..9fe0f3f --- /dev/null +++ b/config/onion-perf/deck/config/entity_model_features.json @@ -0,0 +1,36 @@ +{ + "allowedCEM": "ALL", + "logModelCreationData": false, + "debugOnRightClick": false, + "renderModeChoice": "NORMAL", + "vanillaModelHologramRenderMode_2": "OFF", + "modelExportMode": "NONE", + "automaticModelExporting": false, + "attemptPhysicsModPatch_2": "CUSTOM", + "modelUpdateFrequency": "Slow", + "entityRenderModeOverrides": {}, + "entityPhysicsModPatchOverrides": {}, + "entityVanillaHologramOverrides": {}, + "modelsNamesDisabled": [], + "allowEBEModConfigModify": true, + "animationLODDistance": 8, + "retainDetailOnLowFps": false, + "retainDetailOnLargerMobs": true, + "animationFrameSkipDuringIrisShadowPass": true, + "preventFirstPersonHandAnimating": false, + "onlyClientPlayerModel": false, + "doubleChestAnimFix": true, + "enforceOptifineVariationRequiresDefaultModel": false, + "enforceOptifineVariationRequiresDefaultModel_v2": false, + "resetPlayerModelEachRender": true, + "resetPlayerModelEachRender_v2": true, + "onlyDebugRenderOnHover": false, + "enforceOptifineSubFoldersVariantOnly": false, + "enforceOptiFineAnimSyntaxLimits": true, + "allowOptifineFallbackProperties": true, + "showReloadErrorToast": true, + "exportRotations": false, + "asmMaths": true, + "logASM": false, + "parrotShoulderPositionAnimatesByDefault": true +} diff --git a/config/onion-perf/deck/config/flywheel-client.toml b/config/onion-perf/deck/config/flywheel-client.toml new file mode 100644 index 0000000..5211931 --- /dev/null +++ b/config/onion-perf/deck/config/flywheel-client.toml @@ -0,0 +1,14 @@ +#Select the backend to use. Set to "DEFAULT" to let Flywheel decide. +backend = "DEFAULT" +#Enable or disable instance update limiting with distance. +limitUpdates = true +#The number of worker threads to use. Set to -1 to let Flywheel decide. Set to 0 to disable parallelism. Requires a game restart to take effect. +# Default: -1 +# Range: -1 ~ 4 +workerThreads = -1 + +#Config options for Flywheel's built-in backends. +[flw_backends] + #How smooth Flywheel's shader-based lighting should be. May have a large performance impact. + #Allowed Values: FLAT, TRI_LINEAR, SMOOTH, SMOOTH_INNER_FACE_CORRECTED + lightSmoothness = "FLAT" diff --git a/config/onion-perf/deck/config/lambdynlights.toml b/config/onion-perf/deck/config/lambdynlights.toml new file mode 100644 index 0000000..0d4b237 --- /dev/null +++ b/config/onion-perf/deck/config/lambdynlights.toml @@ -0,0 +1,16 @@ +mode = "fastest" +chunk_rebuild_scheduler = "culling" + +[adaptive_ticking] +slow = 5 +slower = 8 +background_sleep = true + +[light_sources] +entities = false +self = true +water_sensitive_check = true +beam = true +guardian_laser = true +sonic_boom = true +glowing_effect = true diff --git a/config/onion-perf/deck/config/sodium-options.json b/config/onion-perf/deck/config/sodium-options.json new file mode 100644 index 0000000..1580ece --- /dev/null +++ b/config/onion-perf/deck/config/sodium-options.json @@ -0,0 +1,30 @@ +{ + "quality": { + "weather_quality": "FAST", + "leaves_quality": "FAST", + "enable_vignette": true, + "use_closest_point_entity_sort": false + }, + "advanced": { + "enable_memory_tracing": false, + "use_advanced_staging_buffers": true, + "cpu_render_ahead_limit": 3 + }, + "performance": { + "chunk_builder_threads": 0, + "chunk_build_defer_mode": "ALWAYS", + "animate_only_visible_textures": true, + "use_entity_culling": true, + "use_fog_occlusion": true, + "use_block_face_culling": true, + "use_no_error_g_l_context": true, + "quad_splitting_mode": "SAFE" + }, + "notifications": { + "has_cleared_donation_button": false, + "has_seen_donation_prompt": false + }, + "debug": { + "terrain_sorting_enabled": true + } +} diff --git a/config/onion-perf/deck/config/sound_physics_remastered/sound_rates.properties b/config/onion-perf/deck/config/sound_physics_remastered/sound_rates.properties new file mode 100644 index 0000000..c3ea8c0 --- /dev/null +++ b/config/onion-perf/deck/config/sound_physics_remastered/sound_rates.properties @@ -0,0 +1,20 @@ +# Partial file: SPR merges these over its generated per-sound defaults (-1 = unlimited). +create\:cogs=4 +create\:mixing=4 +create\:mixing_compounded_1=4 +create\:mechanical_press_activation=4 +create\:mechanical_press_activation_compounded_1=4 +create\:mechanical_press_activation_belt=4 +create\:mechanical_press_activation_belt_compounded_1=4 +create\:crushing_1=4 +create\:crushing_2=4 +create\:crushing_3=4 +create\:saw_activate_stone=4 +create\:saw_activate_wood=4 +create\:funnel_flap=4 +create\:funnel_flap_compounded_1=4 +create\:depot_slide=4 +create\:depot_plop=4 +create\:steam=4 +create\:sanding_short=4 +create\:sanding_long=4 diff --git a/config/onion-perf/deck/config/sound_physics_remastered/soundphysics.properties b/config/onion-perf/deck/config/sound_physics_remastered/soundphysics.properties new file mode 100644 index 0000000..89037ff --- /dev/null +++ b/config/onion-perf/deck/config/sound_physics_remastered/soundphysics.properties @@ -0,0 +1,99 @@ +# Enables/Disables all sound effects +enabled=true +# Affects how quiet a sound gets based on distance +# Lower values mean distant sounds are louder +# This setting requires you to be in singleplayer or having the mod installed on the server +# 1.0 is the physically correct value +attenuation_factor=1.0 +# The ray distance at which reverb starts +# 0.0 disables reverb attenuation +reverb_attenuation_distance=0.0 +# The volume of simulated reverberations +reverb_gain=1.0 +# The brightness of reverberation +# Higher values result in more high frequencies in reverberation +# Lower values give a more muffled sound to the reverb +reverb_brightness=1.0 +# The distance of reverb relative to the sound distance +reverb_distance=1.5 +# The amount of sound that will be absorbed when traveling through blocks +block_absorption=1.0 +# Higher values mean smaller objects won't be considered as occluding +occlusion_variation=0.35 +# The default amount of sound reflectance energy for all blocks +# Lower values result in more conservative reverb simulation with shorter reverb tails +# Higher values result in more generous reverb simulation with higher reverb tails +default_block_reflectivity=0.5 +# The default amount of occlusion for all blocks +# Lower values will result in sounds being less muffled through walls +# Higher values mean sounds will be not audible though thicker walls +default_block_occlusion_factor=1.0 +# Minecraft won't allow sounds to play past a certain distance +# This parameter is a multiplier for how far away a sound source is allowed to be in order for it to actually play +# This setting only takes affect in singleplayer worlds and when installed on the server +sound_distance_allowance=4.0 +# A value controlling the amount that air absorbs high frequencies with distance +# A value of 1.0 is physically correct for air with normal humidity and temperature +# Higher values mean air will absorb more high frequencies with distance +# 0 disables this effect +air_absorption=1.0 +# How much sound is filtered when the player is underwater +# 0.0 means no filter +# 1.0 means fully filtered +underwater_filter=0.9 +# Whether sounds like cave, nether or underwater ambient sounds should have sound physics +evaluate_ambient_sounds=false +# The number of rays to trace to determine reverberation for each sound source +# More rays provides more consistent tracing results but takes more time to calculate +# Decrease this value if you experience lag spikes when sounds play +environment_evaluation_ray_count=16 +# The number of rays bounces to trace to determine reverberation for each sound source +# More bounces provides more echo and sound ducting but takes more time to calculate +# Decrease this value if you experience lag spikes when sounds play +environment_evaluation_ray_bounces=2 +# If sound hits a non-full-square side, block occlusion is multiplied by this +non_full_block_occlusion_factor=0.25 +# The maximum amount of rays to determine occlusion +# Directly correlates to the amount of blocks between walls that are considered +max_occlusion_rays=16 +# The amount at which occlusion is capped +max_occlusion=64.0 +# If enabled, the occlusion calculation only uses one path between the sound source and the listener instead of 9 +strict_occlusion=true +# Whether to try calculating where the sound should come from based on reflections +sound_direction_evaluation=true +# Skip redirecting non-occluded sounds (the ones you can see directly) +redirect_non_occluded_sounds=true +# If music discs or other longer sounds should be frequently reevaluated +update_moving_sounds=false +# The interval in ticks that moving sounds are reevaluated +# Lower values mean more frequent reevaluation but also more lag +# This option only takes effect if update_moving_sounds is enabled +sound_update_interval=5 +# The maximum distance a sound can be processed +max_sound_processing_distance=512.0 +# Disable level clone and cache. This will fall back to original main thread access. +# WARNING! Enabling this will cause instability and issues with other mods. +unsafe_level_access=false +# The radius of chunks to clone for level access +level_clone_range=4 +# The maximum number of ticks to retain the cloned level in the cache +level_clone_max_retain_ticks=20 +# The maximum distance a player can move from the cloned origin before invalidation +level_clone_max_retain_block_distance=16 +# Enables debug logging +debug_logging=false +# Provides more information about occlusion in the logs +occlusion_logging=false +# Provides more information about the environment calculation in the logs +environment_logging=false +# Provides more information about how long computations take +performance_logging=false +# If enabled, the path of the sound will be rendered in game +render_sound_bounces=false +# If enabled, occlusion will be visualized in game +render_occlusion=false +# Enables/Disables sound effects for Simple Voice Chat audio +simple_voice_chat_integration=true +# Enables/Disables hearing your own echo with Simple Voice Chat +simple_voice_chat_hear_self=false diff --git a/config/onion-perf/deck/config/ssrd-common.toml b/config/onion-perf/deck/config/ssrd-common.toml new file mode 100644 index 0000000..30fedc0 --- /dev/null +++ b/config/onion-perf/deck/config/ssrd-common.toml @@ -0,0 +1,12 @@ +#The render distance for physics objects (SubLevels) in chunks. +# Default: 128 +# Range: 1 ~ 1000000 +physicsRenderDistance = 16 +#The minimum render distance for physics objects (SubLevels) in chunks. +# Default: 16 +# Range: 1 ~ 1000000 +minPhysicsRenderDistance = 16 +#The maximum render distance for physics objects (SubLevels) in chunks. +# Default: 4096 +# Range: 1 ~ 1000000 +maxPhysicsRenderDistance = 4096 diff --git a/config/onion-perf/deck/options.txt b/config/onion-perf/deck/options.txt new file mode 100644 index 0000000..7c52120 --- /dev/null +++ b/config/onion-perf/deck/options.txt @@ -0,0 +1,11 @@ +version:3955 +renderDistance:8 +simulationDistance:8 +biomeBlendRadius:0 +mipmapLevels:2 +entityDistanceScaling:0.75 +particles:1 +entityShadows:false +graphicsMode:1 +maxFps:120 +enableVsync:true diff --git a/config/onion-perf/high/config/DistantHorizons.toml b/config/onion-perf/high/config/DistantHorizons.toml new file mode 100644 index 0000000..5662ec7 --- /dev/null +++ b/config/onion-perf/high/config/DistantHorizons.toml @@ -0,0 +1,980 @@ +_version = 4 + +[server] + # + # Defines the distance the player will receive updates around. + realTimeUpdateDistanceRadiusInChunks = 256 + # + # Prefix of the level keys sent to the clients. + # If the mod is running behind a proxy, each backend should use a unique value. + # If this value is empty, level key will be based on the server's seed hash. + levelKeyPrefix = "" + # + # Defines the distance allowed to be synchronized around the player. + # Should be the same or larger than maxGenerationRequestDistance in most cases. + maxSyncOnLoadRequestDistance = 4096 + # + # If true, clients will receive updated LODs when joining or loading new LODs. + synchronizeOnLoad = true + # + # Custom server key used which can be used to always reuse the same LOD data folder, + # for cases when the server doesn't have a static IP for some reason. + # If this value is empty, the client itself decides which folder name to use. + # Requires rejoining the server to apply after changing. + serverKey = "" + # + # Defines the distance allowed to generate around the player. + maxGenerationRequestDistance = 4096 + # + # Makes the server send level keys for each world. + # Disable this if you use alternative ways to send level keys. + sendLevelKeys = true + # + # DO NOT CHANGE UNLESS YOU KNOW WHAT YOU'RE DOING. + # Autogenerated ID used to prevent multiple independent servers from accidentally + # writing over each other's LODs when the same serverKey is set on both. + # + # How many LOD generation requests per second should a client send? + # Also limits the number of client requests allowed to stay in the server's queue. + generationRequestRateLimit = 20 + # + # How many LOD sync requests per second should a client send? + # Also limits the amount of player's requests allowed to stay in the server's queue. + syncOnLoadRateLimit = 50 + # + # If true, clients will receive real-time LOD updates for chunks outside the client's render distance. + enableRealTimeUpdates = true + # + # Maximum global speed for uploading LODs to the clients, in KB/s. + # Value of 0 disables the limit. + globalBandwidthLimit = 0 + # + # Maximum per-player speed for uploading LODs to the clients, in KB/s. + # Value of 0 disables the limit. + playerBandwidthLimit = 500 + # + # Enables adaptive transfer speed based on client performance. + # If true, DH will automatically adjust transfer rate to minimize connection lag. + # If false, transfer speed will remain fixed. + enableAdaptiveTransferSpeed = false + + [common.lodBuilding] + # + # How should block data be compressed when creating LOD data? + # This setting will only affect new or updated LOD data, + # any data already generated when this setting is changed will be + # unaffected until it is modified or re-loaded. + # + # MERGE_SAME_BLOCKS + # Every block/biome change is recorded in the database. + # This is what DH 2.0 and 2.0.1 all used by default and will store a lot of data. + # Expected Compression Ratio: 1.0 + # + # VISUALLY_EQUAL + # Only visible block/biome changes are recorded in the database. + # Hidden blocks (IE ores) are ignored. + # Expected Compression Ratio: 0.7 + worldCompression = "VISUALLY_EQUAL" + # + # Requires a level restart to apply. + # + # Setting this to a less strict mode increases DB read/write + # speed at the cost of potential data loss/corruption if + # the computer looses power + # (unexpected program shutdown should be safe for all options). + # + # FULL + # ACID - data will never be lost or corrupted + # Slow + # At max throughput: ~2k saves per sec, ~70% disk usage + # + # NORMAL + # May not be durable - some data may be lost on power loss, but DB should be safe from corruption + # Fast + # At max throughput: ~14k saves per sec, ~40% disk usage + # + # OFF + # Not consistent - database may be corrupted during power loss + # Very Fast + # At max throughput: ~16k saves per sec, ~6% disk usage + databaseSyncMode = "NORMAL" + dataCompression = "Z_STD_BLOCK" + # + # Enabling this will drastically speed up chunk processing time + # if you are CPU limited. + # Disabling it will drastically speed up chunk processing time + # if you are disk speed/IO limited. + # + # Normally DH will attempt to skip creating LODs for chunks it's already seen + # and that haven't changed. + # + # Disabling this option can also fix a rare bug where + # modified chunks are skipped due to being too similar to + # their saved hash. + disableUnchangedChunkCheck = false + + [common.multiThreading] + # + # How many threads should be used by Distant Horizons? + numberOfThreads = 2 + # + # A value between 1.0 and 0.0 that represents the percentage + # of time each thread can run before going idle. + # + # This can be used to reduce CPU usage if the thread count + # is already set to 1 for the given option, or more finely + # tune CPU performance. + threadRunTimeRatio = "1.0" + # + # What Java thread priority should DH's primary thread pools run with? + # + # You probably don't need to change this unless you are also + # running C2ME and are seeing thread starvation in either C2ME or DH. + threadPriority = 5 + + [common.logging] + # + # If enabled, the mod will log information about the renderer setup, cleanup, and any issues it may encounter. + # This can be useful for debugging. + logRendererEventToFile = "INFO" + # + # If enabled, the mod will log information about the world generation process. + # This can be useful for debugging. + logWorldGenEventToFile = "INFO" + # + # If enabled, the mod will log information about the renderer OpenGL process. + # This can be useful for debugging. + logRendererGLEventToChat = "ERROR" + # + # + globalChatMaxLevel = "ERROR" + # + # If enabled, the mod will log information about the world generation process. + # This can be useful for debugging. + logWorldGenChunkLoadEventToFile = "INFO" + # + # If enabled, the mod will log information about the renderer OpenGL process. + # This can be useful for debugging. + logRendererGLEventToFile = "INFO" + # + # If enabled, the mod will log information about network operations. + # This can be useful for debugging. + logNetworkEventToFile = "INFO" + # + # If enabled, config changes sent by the server will be logged. + logConnectionConfigChangesToFile = "WARN" + # + # + globalFileMaxLevel = "INFO" + + [common.logging.warning] + # + # If enabled, a message will be displayed in chat if explicit garbage collection + # is disabled. + # This is known to cause out-of-memory issues + # and is better solved with a concurrent garbage collector. + showExplicitGcDisabledWarning = false + # + # If enabled, a chat message will be displayed when DH has too many chunks + # queued for updating. + showSlowWorldGenSettingWarnings = true + # + # If enabled, a chat message will be displayed when DH has too many chunks + # queued for updating. + showUpdateQueueOverloadedChatWarning = false + # + # If enabled, a message will be logged if explicit garbage collection + # is disabled. + # This is known to cause out-of-memory issues + # and is better solved with a concurrent garbage collector. + logExplicitGcDisabledWarning = false + # + # If enabled, a chat message will be displayed if Java doesn't have enough + # memory allocated to run DH well. + showLowMemoryWarningOnStartup = true + # + # If enabled, a chat message will be displayed when a replay is started + # giving some basic information about how DH will function. + showReplayWarningOnStartup = true + # + # If enabled, a chat message will be displayed when a potentially problematic + # mod is installed alongside DH. + showModCompatibilityWarningsOnStartup = true + # + # If enabled, a chat message will be displayed if vanilla MC's + # render distance is higher than the recommended amount. + showHighVanillaRenderDistanceWarning = true + # + # If enabled, a chat message will be displayed if DH detects + # that any pooled objects have been garbage collected. + showPoolInsufficientMemoryWarning = true + # + # If enabled, a message will be logged if the garbage + # collector Java is currently using is known + # to cause frame stuttering and/or other issues. + logGarbageCollectorWarning = true + # + # If enabled, a chat message will be displayed in chat if the garbage + # collector Java is currently using is known + # to cause frame stuttering and/or other issues. + showGarbageCollectorWarning = true + + [common.worldGenerator] + # + # How should distant generator progress be displayed? + # + # OVERLAY: may be the same as CHAT for some Minecraft versions + # CHAT + # LOG + # DISABLED + showGenerationProgress = "DISABLED" + # + # If the SURFACE_THEN_CHUNKS generator plan is + # in use, this percentage can be defined to reduce how far the + # second high-quality generation pass will go + # as a percentage of your total render distance: + # -1.0 = Infinity + # 0.0 = 0% + # 0.5 = 50% + # 1.0 = 100% + # 2.0 = 200% + # + # Does nothing on a dedicated server. + surfaceRegenMaxDistancePercent = "-1.0" + # + # The max radius in chunks around the central point where world generation is allowed. + # If this value is set to 0, generation bounds are disabled and the render distance will be used. + # + # This should only be set if you have a pre-generated world that has a very limited size. + # Setting this on a normal MC world will prevent the world generator from filling + # out your render distance. + generationMaxChunkRadius = 0 + # + # If the Minecraft server thread is taking too long + # Distant Horizons will pause world gen to reduce server stuttering/lag. + limitIfServerUnhealthy = true + # + # How often should the distant generator progress be displayed? + generationProgressDisplayIntervalInSeconds = 2 + # + # When logging generation progress also include the rate at which chunks + # are being generated. + # This can be useful for troubleshooting performance. + generationProgressIncludeChunksPerSecond = true + # + # How detailed should LODs be generated outside the vanilla render distance? + # + # PRE_EXISTING_ONLY + # Only create LOD data for already generated chunks. + # + # FEATURES + # Generate everything except structures. + # Note: This may cause world generator bugs or instability when paired with certain world generator mods. + # + # INTERNAL_SERVER + # Ask the local server to generate/load each chunk. + # This is the most compatible and will generate structures correctly, + # but may cause server/simulation lag. + # Note: unlike other modes this option DOES save generated chunks to + # Minecraft's region files. + chunkGeneratorMode = "FEATURES" + # + # Defines how LODs will be generated + # outside the vanilla render distance. + # In multiplayer, this may be overridden by the server. + # + # SURFACE_THEN_CHUNKS + # The rough surface will be generated first + # then chunks will be generated to fill in + # missing features (ie trees and villages). + # + # Recommended for modded or vanilla worlds. + # + # SURFACE_ONLY + # Only the rough surface will be generated. + # Chunk features like trees and villages + # won't be generated. + # + # Recommended for computers that don't have + # enough CPU power or RAM space to handle + # the chunk generator. + # + # CHUNKS_ONLY + # Slower than either surface options, + # but provides more accurate terrain. + # + # Recommended for custom worlds + # where the surface generator would + # generate incorrect terrain. + # + # DISABLED + # No distant terrain will be generated. + generatorPlan = "SURFACE_THEN_CHUNKS" + # + # If true and the player/camera is moving quickly + # Distant Horizons will pause world gen to improve loading speed + # and reduce CPU load. + pauseIfMovingQuickly = true + # + # For how many seconds should instructions for disabling the distant generator progress be displayed? + # Setting this to 0 hides the instructional message so the world gen progress is shown immediately when it starts. + generationProgressDisableMessageDisplayTimeInSeconds = 20 + # + # The center Z chunk position that the world gen max radius is centered around. + generationCenterChunkZ = 0 + # + # The center X chunk position that the world gen max radius is centered around. + generationCenterChunkX = 0 + +[client] + # + # Should Distant Horizon's config button appear in Minecraft's options screen next to the fov slider? + showDhOptionsButtonInMinecraftUi = true + + [client.advanced.autoUpdater] + # + # If DH should use the nightly (provided by Gitlab), or stable (provided by Modrinth) build. + # If [AUTO] is selected DH will update to new stable releases if the current jar is a stable jar + # and will update to new nightly builds if the current jar is a nightly jar (IE the version number ends in '-dev'). + updateBranch = "AUTO" + # + # Automatically check for updates on game launch? + enableAutoUpdater = true + # + # Should Distant Horizons silently, automatically download and install new versions? + # This setting is force disabled on dedicated servers for stability reasons. + enableSilentUpdates = false + + [client.advanced.debugging] + # + # If enabled this will disable (most) vanilla Minecraft rendering. + # + # NOTE: Do not report any issues when this mode is on! + # This setting is only for fun and debugging. + # Mod compatibility is not guaranteed. + lodOnlyMode = false + # + # What renderer is active? + # + # DEFAULT: Default lod renderer + # DEBUG_TRIANGLE: Debug testing renderer + # DISABLED: Disable rendering + rendererMode = "DEFAULT" + # + # If true overlapping quads will be rendered as bright red for easy identification. + # If false the quads will be rendered normally. + showOverlappingQuadErrors = false + # + # If true OpenGL Buffer garbage collection will be logged + # this also includes the number of live buffers. + logBufferGarbageCollection = false + # + # Should specialized colors/rendering modes be used? + # + # OFF: LODs will be drawn with their normal colors. + # SHOW_DETAIL: LODs' color will be based on their detail level. + # SHOW_BLOCK_MATERIAL: LODs' color will be based on their material. + # SHOW_OVERLAPPING_QUADS: LODs will be drawn with total white, but overlapping quads will be drawn with red. + debugRenderingColors = "OFF" + # + # Stops vertex colors from being passed. + # Useful for debugging shaders + enableWhiteWorld = false + # + # If enabled the LODs will render as wireframe. + renderWireframe = false + # + # If true several keys can be used to toggle debug states. + # F6 - enable/disable LOD rendering + # F7 - enable/disable LOD only rendering + # F8 - cycle through the different debug rendering modes + enableDebugKeybindings = false + + [client.advanced.debugging.debugWireframe] + # + # Render LOD section status? + showRenderSectionStatus = false + # + # Render queued network sync on load tasks? + showNetworkSyncOnLoadQueue = false + # + # Render full data update/lock status? + showFullDataUpdateStatus = false + # + # Render queued world gen tasks? + showWorldGenQueue = false + # + # Render Quad Tree Rendering status? + showQuadTreeRenderStatus = false + # + # If enabled, various wireframes for debugging internal functions will be drawn. + # + # NOTE: There WILL be performance hit! + # Additionally, only stuff that's loaded after you enable this + # will render their debug wireframes. + enableRendering = false + + [client.advanced.debugging.openGl] + # + # Defines how OpenGL errors are handled. + # Requires rebooting Minecraft to change. + # Will catch OpenGL errors thrown by other mods. + overrideVanillaGLLogger = true + # + # Defines how OpenGL errors are handled. + # May incorrectly catch OpenGL errors thrown by other mods. + # + # IGNORE: Do nothing. + # LOG: write an error to the log. + # LOG_THROW: write to the log and throw an exception. + # Warning: this should only be enabled when debugging the LOD renderer + # as it may break Minecraft's renderer when an exception is thrown. + glErrorHandlingMode = "IGNORE" + # + # If true each Open GL error will only be logged once. + # Enabling this may cause some error logs to be missed. + # Does nothing if overrideVanillaGLLogger is set to false. + # + # Generally this can be kept as 'true' to prevent log spam. + # However, Please set this to 'false' if a developer needs your log to debug a GL issue. + onlyLogGlErrorsOnce = true + + [client.advanced.debugging.exampleConfigScreen] + shortTest = "69" + mapTest = "{}" + byteTest = "8" + longTest = "42069" + listTest = ["option 1", "option 2", "option 3"] + boolTest = false + doubleTest = "420.69" + floatTest = "0.42069" + linkableTest = 420 + intTest = 69420 + stringTest = "Test input box" + + [client.advanced.debugging.f3Screen] + # + # Shows info about the render thread tasks. + showRenderThreadTasks = false + # + # Shows how many chunks are queued for processing and the max count that can be queued. + showQueuedChunkUpdateCount = true + # + # Shows the memory use and array counts for each DH object pool. + showSeparatedObjectPools = false + # + # Shows the player's LOD position. + showPlayerPos = true + # + # Shows the combined memory use and array counts for all DH pooled objects. + showCombinedObjectPools = false + # + # Defines what internal detail level the player position will be shown as. + # Internal detail level means: 6 = 1x1 block, 7 = 2x2 blocks, etc. + playerPosSectionDetailLevel = 6 + # + # Only show levels that DH is actively rendering. + onlyShowRenderingLevels = true + # + # Shows info about each thread pool. + showThreadPools = true + # + # Shows what levels are loaded and world gen/rendering info about those levels. + showLevelStatus = true + + [client.advanced.debugging.positionFinderDebugging] + positionFinderEnable = false + positionFinderMinBlockY = -64 + positionFinderZPos = 0 + positionFinderXPos = 0 + positionFinderMaxBlockY = 125 + positionFinderDetailLevel = 6 + positionFinderMarginPercent = "0.0" + + [client.advanced.graphics] + # + # Enabling Anti-Aliasing smooths edges and reduces flickering when moving. + enableAntiAliasing = true + # + # Enable Screen Space Ambient Occlusion + enableSsao = true + # + # If true some vanilla graphics settings will be automatically changed + # during DH setup to provide a better experience. + # + # IE disabling vanilla clouds (which render on top of DH LODs), + # and chunk fading (DH already fades MC chunks) + overrideVanillaGraphicsSettings = true + + [client.advanced.graphics.culling] + # + # Determines how far from the camera Distant Horizons will start rendering. + # Measured as a percentage of the vanilla render distance. + # + # -1 = auto, overdraw will change based on the vanilla render distance. + # + # Higher values will prevent LODs from rendering behind vanilla blocks at a higher distance, + # but may cause holes in the world. + # Holes are most likely to appear when flying through unloaded terrain. + # + # Increasing the vanilla render distance increases the effectiveness of this setting. + overdrawPrevention = "-1.0" + # + # Identical to the other frustum culling option + # only used when a shader mod is present using the DH API + # and the shadow pass is being rendered. + # + # Disable this if shadows render incorrectly. + disableShadowPassFrustumCulling = false + # + # A comma separated list of block resource locations that will be replaced by water + # if they're visible on the water's surface. + waterSubSurfaceBlockReplacementCsv = "minecraft:kelp,minecraft:tall_seagrass,minecraft:seagrass" + # + # A comma separated list of block resource locations that won't be rendered by DH. + # Air is always included in this list. + # + # Note: + # If you see gaps, or holes you may have to change + # worldCompression to [MERGE_SAME_BLOCKS] and re-generate the LODs. + ignoredRenderBlockCsv = "minecraft:barrier,minecraft:structure_void,minecraft:light,minecraft:tripwire,minecraft:brown_mushroom" + # + # A comma separated list of block resource locations that will be removed + # when on top of water. + waterSurfaceBlockReplacementCsv = "minecraft:lily_pad" + # + # Defines what blocks should be rendered as LODs. + # + # NONE: Include all blocks in the LODs + # NON_COLLIDING: Only render solid blocks in the LODs (tall grass, torches, etc. will be ignored) + blocksToIgnore = "NON_COLLIDING" + # + # If true LODs outside the player's camera + # aren't drawn, increasing GPU performance. + # + # If false all LODs are drawn, even those behind + # the player's camera, decreasing GPU performance. + # + # Disable this if you see LODs disappearing at the corners of your vision. + disableFrustumCulling = false + # + # If false all beacons near the camera won't be drawn to prevent vanilla overdraw. + # If true all beacons will be rendered. + # + # Generally this should be left as true. It's main purpose is for debugging + # beacon updating/rendering. + disableBeaconDistanceCulling = true + # + # Should the blocks underneath avoided blocks gain the color of the avoided block? + # + # True: a red flower will tint the grass below it red. + # False: skipped blocks will not change color of surface below them. + tintWithAvoidedBlocks = true + # + # If enabled caves won't be rendered. + # + # Note: for some world types this can cause + # overhangs or walls for floating objects. + # Tweaking the caveCullingHeight, can resolve some + # of those issues. + enableCaveCulling = true + # + # At what Y value should cave culling start? + # Lower this value if you get walls for areas with 0 light. + caveCullingHeight = 60 + # + # A comma separated list of block resource locations that shouldn't be rendered + # if they are in a 0 sky light underground area. + # Air is always included in this list. + # + # Defaults to an empty list since most cave blocks will be automatically ignored due to being: + # transparent, non-solid, or liquids, but new blocks can be added here if needed. + ignoredRenderCaveBlockCsv = "" + # + # If set to true the overdraw prevention radius will get closer + # to the camera when flying/moving quickly. + # + # This helps reduce issues where Minecraft can't load or + # generate chunks fast enough to keep up with DH. + reduceOverdrawWithFastMovement = true + + [client.advanced.graphics.texture] + # + # A comma separated list of block resource locations + # that DH will render their sides using the bottom texture. + # Partial matches/incomplete resource locations will also match. + # + # Example: "minecraft:grass_block,nylium" + # + # Changes require a restart. + blocksDontUseSideTextureCsv = "grass_block,mycelium,nylium,dirt_path,grass" + # + # The highest detail level number that can render with block textures. + # At higher detail levels each LOD covers multiple blocks, + # which can essentially make textures smaller than a pixel and therefore invisible. + # + # Larger numbers texture more distant LODs + # but increase memory usage. + maxTexturedLodDetailLevel = 2 + # + # If true nearby and zoomed-in LODs will render with their block's + # actual texture instead of a single flat color. + # + # Only applies to high detail LODs where the texture is actually visible, + # distant LODs always use flat colors. + # Some shader packs nay not have an affect. + enableTexturedLods = true + # + # A comma separated list of block resource locations + # that DH won't render textures on. + # Partial matches/incomplete resource locations will also match. + # + # Example: "minecraft:grass_block,nylium" + # + # Changes require a restart. + blocksDontRenderTextureCsv = "minecraft:bamboo" + # + # A comma separated list of tag names + # that DH will render their sides using the bottom texture. + # + # Example: "grass_blocks,nylium" + # + # Changes require a restart. + blockTagsDontUseSideTextureCsv = "grass_blocks,nylium" + # + # A comma separated list of block resource locations + # that DH will use rasterization to determine + # the face textures. + # + # Can be used to fix issues with mods/blocks where + # a side uses just part of a modeled block's texture. + # + # Example: "minecraft:beacon" + # + # Changes require a restart. + blocksAlwaysRasterizeTextureCsv = "minecraft:beacon" + + [client.advanced.graphics.noiseTexture] + # + # Should a noise texture be applied to LODs? + # + # This is done to simulate textures and make the LODs appear more detailed. + enableNoiseTexture = true + # + # Defines how far should the noise texture render before it fades away. (in blocks) + # Set to 0 to disable noise from fading away + noiseDropoff = 1024 + # + # How many steps of noise should be applied to LODs? + noiseSteps = 4 + # + # How intense should the noise should be? + noiseIntensity = "0.05" + + [client.advanced.graphics.experimental] + # + # A comma separated list of dimension resource locations where DH won't render. + # + # Example: "minecraft:the_nether,minecraft:the_end" + # For Minecraft 1.12.2 and older: + # Open the F3 screen and copy the dimension_name:ID shown in yellow. Example: "overworld:0" + # + # Note: + # Some DH settings will be disabled and/or changed to improve + # visuals when DH rendering is disabled. + ignoredDimensionCsv = "" + # + # Requires a restart to change. + # + # Options: + # AUTO - changes based on the most likely API for that MC version + # OPEN_GL - The Default for MC 1.21.11 and older (supports Iris shaders) + # BLAZE_3D - The Default for MC 26.1.2 and newer (supports Vulkan) + renderingEngine = "AUTO" + # + # This is the earth size ratio when applying the curvature shader effect. + # Note: Enabling this feature may cause rendering bugs. + # + # 0 = flat/disabled + # 1 = 1 to 1 (6,371,000 blocks) + # 100 = 1 to 100 (63,710 blocks) + # 10000 = 1 to 10000 (637.1 blocks) + # + # Note: Due to current limitations, the min value is [50] + # and the max value is 5000. Any values outside this range + # will be set to 0 (disabled). + earthCurveRatio = 0 + + [client.advanced.graphics.genericRendering] + # + # A comma separated separated list of dimension resource locations where DH clouds will render. + # + # Example: "minecraft:overworld,minecraft:the_end" + # + # Changes require a world re-load. + dimensionEnabledCloudRenderingCsv = "minecraft:overworld" + # + # If true LOD clouds will be rendered. + enableCloudRendering = true + # + # If true LOD beacon beams will be rendered wider at extreme distances, + # making them easier to see. + # If false all LOD beacon beams will only ever be 1 block wide. + expandDistantBeacons = true + # + # Sets the maximum height beacons will render up to. + # + # Requires a world re-load to take affect. + beaconRenderHeight = 6000 + # + # If true LOD beacon beams will be rendered. + enableBeaconRendering = true + # + # If true non terrain objects will be rendered by DH. + # i.e. beacon beams and clouds. + enableGenericRendering = true + # + # False = DH will render a single layer of clouds, like vanilla Minecraft. + # True = DH will render 3 layers of clouds at different heights. + enableMultiLayerClouds = true + + [client.advanced.graphics.quality] + # + # What is the maximum detail LODs can render at? + # Higher settings will increase memory and GPU usage. + # + # CHUNK: render 1 LOD for each Chunk. + # HALF_CHUNK: render 4 LODs for each Chunk. + # FOUR_BLOCKS: render 16 LODs for each Chunk. + # TWO_BLOCKS: render 64 LODs for each Chunk. + # BLOCK: render 256 LODs for each Chunk (width of one block). + # + # Fastest: CHUNK + # Fanciest: BLOCK + maxHorizontalResolution = "BLOCK" + # + # If true LODs will fade away as you get closer to them. + # If false LODs will cut off abruptly at a set distance from the camera. + # This setting is affected by the vanilla overdraw prevention config. + ditherDhFade = true + # + # If true DH will try to use the camera position when + # determining LOD quality drop-off. + # If false DH will use the player's position. + # + # Enabling helps free-cam mods render correctly. + # Disabling helps multi-camera mods render correctly (ie Immersive Portals or camera mods). + useCameraPositionForQualityDropOff = true + # + # How bright LOD colors are. + # + # 0 = black + # 1 = normal + # 2 = near white + brightnessMultiplier = "1.0" + # + # How many detail levels zooming in can increase LOD quality by. + # Higher numbers allow stronger zooms to render crisper terrain, + # but will increase memory and GPU usage while zoomed in. + # + # A vanilla spyglass needs 4 detail levels to reach its full quality. + maxZoomQualityIncrease = 4 + # + # How should LODs be shaded? + # + # AUTO: Uses the same side shading as vanilla Minecraft blocks. + # ENABLED: Simulates Minecraft's block shading for LODs. + # Can be used to force LOD shading when using some shaders. + # DISABLED: All LOD sides will be rendered with the same brightness. + lodShading = "AUTO" + # + # How saturated LOD colors are. + # + # 0 = black and white + # 1 = normal + # 2 = very saturated + saturationMultiplier = "1.0" + # + # This indicates how well LODs will represent + # overhangs, caves, floating islands, etc. + # Higher options will make the world more accurate, butwill increase memory and GPU usage. + # + # Lowest Quality: HEIGHT_MAP + # Highest Quality: PIXEL_ART + verticalQuality = "MEDIUM" + # + # The radius of the mod's render distance. (measured in chunks) + # + # Note: this is a best effort number. + # The actual render distance may be above or below this number + # depending on your other graphic settings. + lodChunkRenderDistanceRadius = 128 + # + # How should the sides and bottom of grass block LODs render? + # + # AS_GRASS: all sides of dirt LOD's render using the top (green) color. + # FADE_TO_DIRT: sides fade from grass to dirt. + # AS_DIRT: sides render entirely as dirt. + grassSideRendering = "FADE_TO_DIRT" + # + # This indicates how far apart drops in LOD quality are. + # + # Higher settings will increase the distance between drops + # but will increase memory and GPU usage. + horizontalQuality = "MEDIUM" + # + # How should LOD transparency be handled. + # + # COMPLETE: LODs will render transparent. + # DISABLED: LODs will be opaque. + transparency = "COMPLETE" + # + # This is the same as vanilla Biome Blending settings for Lod area. + # Note: anything above '0' will slow down LOD loading time. + # + # '0' equals to Vanilla Biome Blending of '1x1' or 'OFF', + # '1' equals to Vanilla Biome Blending of '3x3', + # '2' equals to Vanilla Biome Blending of '5x5'... + lodBiomeBlending = 3 + # + # How should vanilla Minecraft fade into Distant Horizons LODs? + # + # NONE: Fastest, there will be a pronounced border between DH and MC rendering. + # SINGLE_PASS: Fades after MC's transparent pass, opaque blocks underwater won't be faded. + # DOUBLE_PASS: Slowest, fades after both MC's opaque and transparent passes, provides the smoothest transition. + vanillaFadeMode = "DOUBLE_PASS" + # + # If true LOD quality will increase when the camera is zoomed in, + # IE when using a spyglass or zoom mod. + # + # Only LODs visible through the camera view are affected. + # + # When zoomed in LODs will load to the same detail level + # they would have if you were close to them. + increaseQualityWhenZoomedIn = true + + [client.advanced.graphics.fog] + # + # Should Minecraft's fog render? + # Note: Other mods may conflict with this setting. + enableVanillaFog = false + # + # What is the maximum fog thickness? + # + # 0.0: No fog. + # 1.0: Fully opaque fog. + farFogMax = "1.0" + # + # Determines if fog is drawn on DH LODs. + enableDhFog = true + # + # At what distance should the far fog start? + # + # 0.0: Fog starts at the player's position. + # 1.0: Fog starts at the closest edge of the vanilla render distance. + # 1.414: Fog starts at the corner of the vanilla render distance. + farFogStart = "0.4" + # + # What is the minimum fog thickness? + # + # 0.0: No fog. + # 1.0: Fully opaque fog. + farFogMin = "0.0" + # + # What color should fog use? + # + # USE_WORLD_FOG_COLOR: Use the world's fog color. + # USE_SKY_COLOR: Use the sky's color. + colorMode = "USE_WORLD_FOG_COLOR" + # + # How should the fog thickness should be calculated? + # + # LINEAR: Linear based on distance (will ignore 'density') + # EXPONENTIAL: 1/(e^(distance*density)) + # EXPONENTIAL_SQUARED: 1/(e^((distance*density)^2) + farFogFalloff = "EXPONENTIAL_SQUARED" + # + # Used in conjunction with the Fog Falloff. + farFogDensity = "2.5" + # + # Where should the far fog end? + # + # 0.0: Fog ends at player's position. + # 1.0: Fog ends at the closest edge of the vanilla render distance. + # 1.414: Fog ends at the corner of the vanilla render distance. + farFogEnd = "1.0" + + [client.advanced.graphics.fog.heightFog] + # + # Where should the height fog start? + # + # ABOVE_CAMERA: Height fog starts at the camera and goes towards the sky + # BELOW_CAMERA: Height fog starts at the camera and goes towards the void + # ABOVE_AND_BELOW_CAMERA: Height fog starts from the camera to goes towards both the sky and void + # ABOVE_SET_HEIGHT: Height fog starts from a set height and goes towards the sky + # BELOW_SET_HEIGHT: Height fog starts from a set height and goes towards the void + # ABOVE_AND_BELOW_SET_HEIGHT: Height fog starts from a set height and goes towards both the sky and void + heightFogDirection = "BELOW_SET_HEIGHT" + # + # What is the minimum fog thickness? + # + # 0.0: No fog. + # 1.0: Fully opaque fog. + heightFogMin = "0.0" + # + # If the height fog is calculated around a set height, what is that height position? + heightFogBaseHeight = "80.0" + # + # What is the maximum fog thickness? + # + # 0.0: No fog. + # 1.0: Fully opaque fog. + heightFogMax = "1.0" + # + # How should the height fog thickness should be calculated? + # + # LINEAR: Linear based on height (will ignore 'density') + # EXPONENTIAL: 1/(e^(height*density)) + # EXPONENTIAL_SQUARED: 1/(e^((height*density)^2) + heightFogFalloff = "EXPONENTIAL_SQUARED" + # + # What is the height fog's density? + heightFogDensity = "20.0" + # + # How should height effect the fog thickness? + # Note: height fog is combined with the other fog settings. + # + # SPHERICAL: Fog is calculated based on camera distance. + # CYLINDRICAL: Ignore height, fog is calculated based on horizontal distance. + # + # MAX: max(heightFog, farFog) + # ADDITION: heightFog + farFog + # MULTIPLY: heightFog * farFog + # INVERSE_MULTIPLY: 1 - (1-heightFog) * (1-farFog) + # LIMITED_ADDITION: farFog + max(farFog, heightFog) + # MULTIPLY_ADDITION: farFog + farFog * heightFog + # INVERSE_MULTIPLY_ADDITION: farFog + 1 - (1-heightFog) * (1-farFog) + # AVERAGE: farFog*0.5 + heightFog*0.5 + heightFogMixMode = "SPHERICAL" + # + # Should the start of the height fog be offset? + # + # 0.0: Fog start with no offset. + # 1.0: Fog start with offset of the entire world's height. (Includes depth) + heightFogStart = "0.0" + # + # Should the end of the height fog be offset? + # + # 0.0: Fog end with no offset. + # 1.0: Fog end with offset of the entire world's height. (Include depth) + heightFogEnd = "0.6" + + [client.advanced.multiplayer] + # + # How should multiplayer save folders should be named? + # + # NAME_ONLY: Example: "Minecraft Server" + # IP_ONLY: Example: "192.168.1.40" + # NAME_IP: Example: "Minecraft Server IP 192.168.1.40" + # NAME_IP_PORT: Example: "Minecraft Server IP 192.168.1.40:25565"NAME_IP_PORT_MC_VERSION: Example: "Minecraft Server IP 192.168.1.40:25565 GameVersion 1.16.5" + serverFolderNameMode = "NAME_ONLY" diff --git a/config/onion-perf/high/config/entity_model_features.json b/config/onion-perf/high/config/entity_model_features.json new file mode 100644 index 0000000..9ea5681 --- /dev/null +++ b/config/onion-perf/high/config/entity_model_features.json @@ -0,0 +1,36 @@ +{ + "allowedCEM": "ALL", + "logModelCreationData": false, + "debugOnRightClick": false, + "renderModeChoice": "NORMAL", + "vanillaModelHologramRenderMode_2": "OFF", + "modelExportMode": "NONE", + "automaticModelExporting": false, + "attemptPhysicsModPatch_2": "CUSTOM", + "modelUpdateFrequency": "Slow", + "entityRenderModeOverrides": {}, + "entityPhysicsModPatchOverrides": {}, + "entityVanillaHologramOverrides": {}, + "modelsNamesDisabled": [], + "allowEBEModConfigModify": true, + "animationLODDistance": 12, + "retainDetailOnLowFps": true, + "retainDetailOnLargerMobs": true, + "animationFrameSkipDuringIrisShadowPass": true, + "preventFirstPersonHandAnimating": false, + "onlyClientPlayerModel": false, + "doubleChestAnimFix": true, + "enforceOptifineVariationRequiresDefaultModel": false, + "enforceOptifineVariationRequiresDefaultModel_v2": false, + "resetPlayerModelEachRender": true, + "resetPlayerModelEachRender_v2": true, + "onlyDebugRenderOnHover": false, + "enforceOptifineSubFoldersVariantOnly": false, + "enforceOptiFineAnimSyntaxLimits": true, + "allowOptifineFallbackProperties": true, + "showReloadErrorToast": true, + "exportRotations": false, + "asmMaths": true, + "logASM": false, + "parrotShoulderPositionAnimatesByDefault": true +} diff --git a/config/onion-perf/high/config/flywheel-client.toml b/config/onion-perf/high/config/flywheel-client.toml new file mode 100644 index 0000000..ec106ec --- /dev/null +++ b/config/onion-perf/high/config/flywheel-client.toml @@ -0,0 +1,14 @@ +#Select the backend to use. Set to "DEFAULT" to let Flywheel decide. +backend = "DEFAULT" +#Enable or disable instance update limiting with distance. +limitUpdates = true +#The number of worker threads to use. Set to -1 to let Flywheel decide. Set to 0 to disable parallelism. Requires a game restart to take effect. +# Default: -1 +# Range: -1 ~ 4 +workerThreads = -1 + +#Config options for Flywheel's built-in backends. +[flw_backends] + #How smooth Flywheel's shader-based lighting should be. May have a large performance impact. + #Allowed Values: FLAT, TRI_LINEAR, SMOOTH, SMOOTH_INNER_FACE_CORRECTED + lightSmoothness = "SMOOTH" diff --git a/config/onion-perf/high/config/lambdynlights.toml b/config/onion-perf/high/config/lambdynlights.toml new file mode 100644 index 0000000..37eb186 --- /dev/null +++ b/config/onion-perf/high/config/lambdynlights.toml @@ -0,0 +1,16 @@ +mode = "fast" +chunk_rebuild_scheduler = "culling" + +[adaptive_ticking] +slow = 5 +slower = 8 +background_sleep = true + +[light_sources] +entities = false +self = true +water_sensitive_check = true +beam = true +guardian_laser = true +sonic_boom = true +glowing_effect = true diff --git a/config/onion-perf/high/config/sound_physics_remastered/sound_rates.properties b/config/onion-perf/high/config/sound_physics_remastered/sound_rates.properties new file mode 100644 index 0000000..c3ea8c0 --- /dev/null +++ b/config/onion-perf/high/config/sound_physics_remastered/sound_rates.properties @@ -0,0 +1,20 @@ +# Partial file: SPR merges these over its generated per-sound defaults (-1 = unlimited). +create\:cogs=4 +create\:mixing=4 +create\:mixing_compounded_1=4 +create\:mechanical_press_activation=4 +create\:mechanical_press_activation_compounded_1=4 +create\:mechanical_press_activation_belt=4 +create\:mechanical_press_activation_belt_compounded_1=4 +create\:crushing_1=4 +create\:crushing_2=4 +create\:crushing_3=4 +create\:saw_activate_stone=4 +create\:saw_activate_wood=4 +create\:funnel_flap=4 +create\:funnel_flap_compounded_1=4 +create\:depot_slide=4 +create\:depot_plop=4 +create\:steam=4 +create\:sanding_short=4 +create\:sanding_long=4 diff --git a/config/onion-perf/high/config/sound_physics_remastered/soundphysics.properties b/config/onion-perf/high/config/sound_physics_remastered/soundphysics.properties new file mode 100644 index 0000000..89037ff --- /dev/null +++ b/config/onion-perf/high/config/sound_physics_remastered/soundphysics.properties @@ -0,0 +1,99 @@ +# Enables/Disables all sound effects +enabled=true +# Affects how quiet a sound gets based on distance +# Lower values mean distant sounds are louder +# This setting requires you to be in singleplayer or having the mod installed on the server +# 1.0 is the physically correct value +attenuation_factor=1.0 +# The ray distance at which reverb starts +# 0.0 disables reverb attenuation +reverb_attenuation_distance=0.0 +# The volume of simulated reverberations +reverb_gain=1.0 +# The brightness of reverberation +# Higher values result in more high frequencies in reverberation +# Lower values give a more muffled sound to the reverb +reverb_brightness=1.0 +# The distance of reverb relative to the sound distance +reverb_distance=1.5 +# The amount of sound that will be absorbed when traveling through blocks +block_absorption=1.0 +# Higher values mean smaller objects won't be considered as occluding +occlusion_variation=0.35 +# The default amount of sound reflectance energy for all blocks +# Lower values result in more conservative reverb simulation with shorter reverb tails +# Higher values result in more generous reverb simulation with higher reverb tails +default_block_reflectivity=0.5 +# The default amount of occlusion for all blocks +# Lower values will result in sounds being less muffled through walls +# Higher values mean sounds will be not audible though thicker walls +default_block_occlusion_factor=1.0 +# Minecraft won't allow sounds to play past a certain distance +# This parameter is a multiplier for how far away a sound source is allowed to be in order for it to actually play +# This setting only takes affect in singleplayer worlds and when installed on the server +sound_distance_allowance=4.0 +# A value controlling the amount that air absorbs high frequencies with distance +# A value of 1.0 is physically correct for air with normal humidity and temperature +# Higher values mean air will absorb more high frequencies with distance +# 0 disables this effect +air_absorption=1.0 +# How much sound is filtered when the player is underwater +# 0.0 means no filter +# 1.0 means fully filtered +underwater_filter=0.9 +# Whether sounds like cave, nether or underwater ambient sounds should have sound physics +evaluate_ambient_sounds=false +# The number of rays to trace to determine reverberation for each sound source +# More rays provides more consistent tracing results but takes more time to calculate +# Decrease this value if you experience lag spikes when sounds play +environment_evaluation_ray_count=16 +# The number of rays bounces to trace to determine reverberation for each sound source +# More bounces provides more echo and sound ducting but takes more time to calculate +# Decrease this value if you experience lag spikes when sounds play +environment_evaluation_ray_bounces=2 +# If sound hits a non-full-square side, block occlusion is multiplied by this +non_full_block_occlusion_factor=0.25 +# The maximum amount of rays to determine occlusion +# Directly correlates to the amount of blocks between walls that are considered +max_occlusion_rays=16 +# The amount at which occlusion is capped +max_occlusion=64.0 +# If enabled, the occlusion calculation only uses one path between the sound source and the listener instead of 9 +strict_occlusion=true +# Whether to try calculating where the sound should come from based on reflections +sound_direction_evaluation=true +# Skip redirecting non-occluded sounds (the ones you can see directly) +redirect_non_occluded_sounds=true +# If music discs or other longer sounds should be frequently reevaluated +update_moving_sounds=false +# The interval in ticks that moving sounds are reevaluated +# Lower values mean more frequent reevaluation but also more lag +# This option only takes effect if update_moving_sounds is enabled +sound_update_interval=5 +# The maximum distance a sound can be processed +max_sound_processing_distance=512.0 +# Disable level clone and cache. This will fall back to original main thread access. +# WARNING! Enabling this will cause instability and issues with other mods. +unsafe_level_access=false +# The radius of chunks to clone for level access +level_clone_range=4 +# The maximum number of ticks to retain the cloned level in the cache +level_clone_max_retain_ticks=20 +# The maximum distance a player can move from the cloned origin before invalidation +level_clone_max_retain_block_distance=16 +# Enables debug logging +debug_logging=false +# Provides more information about occlusion in the logs +occlusion_logging=false +# Provides more information about the environment calculation in the logs +environment_logging=false +# Provides more information about how long computations take +performance_logging=false +# If enabled, the path of the sound will be rendered in game +render_sound_bounces=false +# If enabled, occlusion will be visualized in game +render_occlusion=false +# Enables/Disables sound effects for Simple Voice Chat audio +simple_voice_chat_integration=true +# Enables/Disables hearing your own echo with Simple Voice Chat +simple_voice_chat_hear_self=false diff --git a/config/onion-perf/high/config/ssrd-common.toml b/config/onion-perf/high/config/ssrd-common.toml new file mode 100644 index 0000000..ac7f003 --- /dev/null +++ b/config/onion-perf/high/config/ssrd-common.toml @@ -0,0 +1,12 @@ +#The render distance for physics objects (SubLevels) in chunks. +# Default: 128 +# Range: 1 ~ 1000000 +physicsRenderDistance = 32 +#The minimum render distance for physics objects (SubLevels) in chunks. +# Default: 16 +# Range: 1 ~ 1000000 +minPhysicsRenderDistance = 16 +#The maximum render distance for physics objects (SubLevels) in chunks. +# Default: 4096 +# Range: 1 ~ 1000000 +maxPhysicsRenderDistance = 4096 diff --git a/config/onion-perf/high/options.txt b/config/onion-perf/high/options.txt new file mode 100644 index 0000000..f0c789e --- /dev/null +++ b/config/onion-perf/high/options.txt @@ -0,0 +1,11 @@ +version:3955 +renderDistance:8 +simulationDistance:8 +biomeBlendRadius:2 +mipmapLevels:4 +entityDistanceScaling:1.0 +particles:0 +entityShadows:true +graphicsMode:1 +maxFps:120 +enableVsync:true diff --git a/config/onion-perf/mid/config/DistantHorizons.toml b/config/onion-perf/mid/config/DistantHorizons.toml new file mode 100644 index 0000000..4281b5a --- /dev/null +++ b/config/onion-perf/mid/config/DistantHorizons.toml @@ -0,0 +1,980 @@ +_version = 4 + +[server] + # + # Defines the distance the player will receive updates around. + realTimeUpdateDistanceRadiusInChunks = 256 + # + # Prefix of the level keys sent to the clients. + # If the mod is running behind a proxy, each backend should use a unique value. + # If this value is empty, level key will be based on the server's seed hash. + levelKeyPrefix = "" + # + # Defines the distance allowed to be synchronized around the player. + # Should be the same or larger than maxGenerationRequestDistance in most cases. + maxSyncOnLoadRequestDistance = 4096 + # + # If true, clients will receive updated LODs when joining or loading new LODs. + synchronizeOnLoad = true + # + # Custom server key used which can be used to always reuse the same LOD data folder, + # for cases when the server doesn't have a static IP for some reason. + # If this value is empty, the client itself decides which folder name to use. + # Requires rejoining the server to apply after changing. + serverKey = "" + # + # Defines the distance allowed to generate around the player. + maxGenerationRequestDistance = 4096 + # + # Makes the server send level keys for each world. + # Disable this if you use alternative ways to send level keys. + sendLevelKeys = true + # + # DO NOT CHANGE UNLESS YOU KNOW WHAT YOU'RE DOING. + # Autogenerated ID used to prevent multiple independent servers from accidentally + # writing over each other's LODs when the same serverKey is set on both. + # + # How many LOD generation requests per second should a client send? + # Also limits the number of client requests allowed to stay in the server's queue. + generationRequestRateLimit = 20 + # + # How many LOD sync requests per second should a client send? + # Also limits the amount of player's requests allowed to stay in the server's queue. + syncOnLoadRateLimit = 50 + # + # If true, clients will receive real-time LOD updates for chunks outside the client's render distance. + enableRealTimeUpdates = true + # + # Maximum global speed for uploading LODs to the clients, in KB/s. + # Value of 0 disables the limit. + globalBandwidthLimit = 0 + # + # Maximum per-player speed for uploading LODs to the clients, in KB/s. + # Value of 0 disables the limit. + playerBandwidthLimit = 500 + # + # Enables adaptive transfer speed based on client performance. + # If true, DH will automatically adjust transfer rate to minimize connection lag. + # If false, transfer speed will remain fixed. + enableAdaptiveTransferSpeed = false + + [common.lodBuilding] + # + # How should block data be compressed when creating LOD data? + # This setting will only affect new or updated LOD data, + # any data already generated when this setting is changed will be + # unaffected until it is modified or re-loaded. + # + # MERGE_SAME_BLOCKS + # Every block/biome change is recorded in the database. + # This is what DH 2.0 and 2.0.1 all used by default and will store a lot of data. + # Expected Compression Ratio: 1.0 + # + # VISUALLY_EQUAL + # Only visible block/biome changes are recorded in the database. + # Hidden blocks (IE ores) are ignored. + # Expected Compression Ratio: 0.7 + worldCompression = "VISUALLY_EQUAL" + # + # Requires a level restart to apply. + # + # Setting this to a less strict mode increases DB read/write + # speed at the cost of potential data loss/corruption if + # the computer looses power + # (unexpected program shutdown should be safe for all options). + # + # FULL + # ACID - data will never be lost or corrupted + # Slow + # At max throughput: ~2k saves per sec, ~70% disk usage + # + # NORMAL + # May not be durable - some data may be lost on power loss, but DB should be safe from corruption + # Fast + # At max throughput: ~14k saves per sec, ~40% disk usage + # + # OFF + # Not consistent - database may be corrupted during power loss + # Very Fast + # At max throughput: ~16k saves per sec, ~6% disk usage + databaseSyncMode = "NORMAL" + dataCompression = "Z_STD_BLOCK" + # + # Enabling this will drastically speed up chunk processing time + # if you are CPU limited. + # Disabling it will drastically speed up chunk processing time + # if you are disk speed/IO limited. + # + # Normally DH will attempt to skip creating LODs for chunks it's already seen + # and that haven't changed. + # + # Disabling this option can also fix a rare bug where + # modified chunks are skipped due to being too similar to + # their saved hash. + disableUnchangedChunkCheck = false + + [common.multiThreading] + # + # How many threads should be used by Distant Horizons? + numberOfThreads = 2 + # + # A value between 1.0 and 0.0 that represents the percentage + # of time each thread can run before going idle. + # + # This can be used to reduce CPU usage if the thread count + # is already set to 1 for the given option, or more finely + # tune CPU performance. + threadRunTimeRatio = "1.0" + # + # What Java thread priority should DH's primary thread pools run with? + # + # You probably don't need to change this unless you are also + # running C2ME and are seeing thread starvation in either C2ME or DH. + threadPriority = 5 + + [common.logging] + # + # If enabled, the mod will log information about the renderer setup, cleanup, and any issues it may encounter. + # This can be useful for debugging. + logRendererEventToFile = "INFO" + # + # If enabled, the mod will log information about the world generation process. + # This can be useful for debugging. + logWorldGenEventToFile = "INFO" + # + # If enabled, the mod will log information about the renderer OpenGL process. + # This can be useful for debugging. + logRendererGLEventToChat = "ERROR" + # + # + globalChatMaxLevel = "ERROR" + # + # If enabled, the mod will log information about the world generation process. + # This can be useful for debugging. + logWorldGenChunkLoadEventToFile = "INFO" + # + # If enabled, the mod will log information about the renderer OpenGL process. + # This can be useful for debugging. + logRendererGLEventToFile = "INFO" + # + # If enabled, the mod will log information about network operations. + # This can be useful for debugging. + logNetworkEventToFile = "INFO" + # + # If enabled, config changes sent by the server will be logged. + logConnectionConfigChangesToFile = "WARN" + # + # + globalFileMaxLevel = "INFO" + + [common.logging.warning] + # + # If enabled, a message will be displayed in chat if explicit garbage collection + # is disabled. + # This is known to cause out-of-memory issues + # and is better solved with a concurrent garbage collector. + showExplicitGcDisabledWarning = false + # + # If enabled, a chat message will be displayed when DH has too many chunks + # queued for updating. + showSlowWorldGenSettingWarnings = true + # + # If enabled, a chat message will be displayed when DH has too many chunks + # queued for updating. + showUpdateQueueOverloadedChatWarning = false + # + # If enabled, a message will be logged if explicit garbage collection + # is disabled. + # This is known to cause out-of-memory issues + # and is better solved with a concurrent garbage collector. + logExplicitGcDisabledWarning = false + # + # If enabled, a chat message will be displayed if Java doesn't have enough + # memory allocated to run DH well. + showLowMemoryWarningOnStartup = true + # + # If enabled, a chat message will be displayed when a replay is started + # giving some basic information about how DH will function. + showReplayWarningOnStartup = true + # + # If enabled, a chat message will be displayed when a potentially problematic + # mod is installed alongside DH. + showModCompatibilityWarningsOnStartup = true + # + # If enabled, a chat message will be displayed if vanilla MC's + # render distance is higher than the recommended amount. + showHighVanillaRenderDistanceWarning = true + # + # If enabled, a chat message will be displayed if DH detects + # that any pooled objects have been garbage collected. + showPoolInsufficientMemoryWarning = true + # + # If enabled, a message will be logged if the garbage + # collector Java is currently using is known + # to cause frame stuttering and/or other issues. + logGarbageCollectorWarning = true + # + # If enabled, a chat message will be displayed in chat if the garbage + # collector Java is currently using is known + # to cause frame stuttering and/or other issues. + showGarbageCollectorWarning = true + + [common.worldGenerator] + # + # How should distant generator progress be displayed? + # + # OVERLAY: may be the same as CHAT for some Minecraft versions + # CHAT + # LOG + # DISABLED + showGenerationProgress = "DISABLED" + # + # If the SURFACE_THEN_CHUNKS generator plan is + # in use, this percentage can be defined to reduce how far the + # second high-quality generation pass will go + # as a percentage of your total render distance: + # -1.0 = Infinity + # 0.0 = 0% + # 0.5 = 50% + # 1.0 = 100% + # 2.0 = 200% + # + # Does nothing on a dedicated server. + surfaceRegenMaxDistancePercent = "-1.0" + # + # The max radius in chunks around the central point where world generation is allowed. + # If this value is set to 0, generation bounds are disabled and the render distance will be used. + # + # This should only be set if you have a pre-generated world that has a very limited size. + # Setting this on a normal MC world will prevent the world generator from filling + # out your render distance. + generationMaxChunkRadius = 0 + # + # If the Minecraft server thread is taking too long + # Distant Horizons will pause world gen to reduce server stuttering/lag. + limitIfServerUnhealthy = true + # + # How often should the distant generator progress be displayed? + generationProgressDisplayIntervalInSeconds = 2 + # + # When logging generation progress also include the rate at which chunks + # are being generated. + # This can be useful for troubleshooting performance. + generationProgressIncludeChunksPerSecond = true + # + # How detailed should LODs be generated outside the vanilla render distance? + # + # PRE_EXISTING_ONLY + # Only create LOD data for already generated chunks. + # + # FEATURES + # Generate everything except structures. + # Note: This may cause world generator bugs or instability when paired with certain world generator mods. + # + # INTERNAL_SERVER + # Ask the local server to generate/load each chunk. + # This is the most compatible and will generate structures correctly, + # but may cause server/simulation lag. + # Note: unlike other modes this option DOES save generated chunks to + # Minecraft's region files. + chunkGeneratorMode = "FEATURES" + # + # Defines how LODs will be generated + # outside the vanilla render distance. + # In multiplayer, this may be overridden by the server. + # + # SURFACE_THEN_CHUNKS + # The rough surface will be generated first + # then chunks will be generated to fill in + # missing features (ie trees and villages). + # + # Recommended for modded or vanilla worlds. + # + # SURFACE_ONLY + # Only the rough surface will be generated. + # Chunk features like trees and villages + # won't be generated. + # + # Recommended for computers that don't have + # enough CPU power or RAM space to handle + # the chunk generator. + # + # CHUNKS_ONLY + # Slower than either surface options, + # but provides more accurate terrain. + # + # Recommended for custom worlds + # where the surface generator would + # generate incorrect terrain. + # + # DISABLED + # No distant terrain will be generated. + generatorPlan = "SURFACE_THEN_CHUNKS" + # + # If true and the player/camera is moving quickly + # Distant Horizons will pause world gen to improve loading speed + # and reduce CPU load. + pauseIfMovingQuickly = true + # + # For how many seconds should instructions for disabling the distant generator progress be displayed? + # Setting this to 0 hides the instructional message so the world gen progress is shown immediately when it starts. + generationProgressDisableMessageDisplayTimeInSeconds = 20 + # + # The center Z chunk position that the world gen max radius is centered around. + generationCenterChunkZ = 0 + # + # The center X chunk position that the world gen max radius is centered around. + generationCenterChunkX = 0 + +[client] + # + # Should Distant Horizon's config button appear in Minecraft's options screen next to the fov slider? + showDhOptionsButtonInMinecraftUi = true + + [client.advanced.autoUpdater] + # + # If DH should use the nightly (provided by Gitlab), or stable (provided by Modrinth) build. + # If [AUTO] is selected DH will update to new stable releases if the current jar is a stable jar + # and will update to new nightly builds if the current jar is a nightly jar (IE the version number ends in '-dev'). + updateBranch = "AUTO" + # + # Automatically check for updates on game launch? + enableAutoUpdater = true + # + # Should Distant Horizons silently, automatically download and install new versions? + # This setting is force disabled on dedicated servers for stability reasons. + enableSilentUpdates = false + + [client.advanced.debugging] + # + # If enabled this will disable (most) vanilla Minecraft rendering. + # + # NOTE: Do not report any issues when this mode is on! + # This setting is only for fun and debugging. + # Mod compatibility is not guaranteed. + lodOnlyMode = false + # + # What renderer is active? + # + # DEFAULT: Default lod renderer + # DEBUG_TRIANGLE: Debug testing renderer + # DISABLED: Disable rendering + rendererMode = "DEFAULT" + # + # If true overlapping quads will be rendered as bright red for easy identification. + # If false the quads will be rendered normally. + showOverlappingQuadErrors = false + # + # If true OpenGL Buffer garbage collection will be logged + # this also includes the number of live buffers. + logBufferGarbageCollection = false + # + # Should specialized colors/rendering modes be used? + # + # OFF: LODs will be drawn with their normal colors. + # SHOW_DETAIL: LODs' color will be based on their detail level. + # SHOW_BLOCK_MATERIAL: LODs' color will be based on their material. + # SHOW_OVERLAPPING_QUADS: LODs will be drawn with total white, but overlapping quads will be drawn with red. + debugRenderingColors = "OFF" + # + # Stops vertex colors from being passed. + # Useful for debugging shaders + enableWhiteWorld = false + # + # If enabled the LODs will render as wireframe. + renderWireframe = false + # + # If true several keys can be used to toggle debug states. + # F6 - enable/disable LOD rendering + # F7 - enable/disable LOD only rendering + # F8 - cycle through the different debug rendering modes + enableDebugKeybindings = false + + [client.advanced.debugging.debugWireframe] + # + # Render LOD section status? + showRenderSectionStatus = false + # + # Render queued network sync on load tasks? + showNetworkSyncOnLoadQueue = false + # + # Render full data update/lock status? + showFullDataUpdateStatus = false + # + # Render queued world gen tasks? + showWorldGenQueue = false + # + # Render Quad Tree Rendering status? + showQuadTreeRenderStatus = false + # + # If enabled, various wireframes for debugging internal functions will be drawn. + # + # NOTE: There WILL be performance hit! + # Additionally, only stuff that's loaded after you enable this + # will render their debug wireframes. + enableRendering = false + + [client.advanced.debugging.openGl] + # + # Defines how OpenGL errors are handled. + # Requires rebooting Minecraft to change. + # Will catch OpenGL errors thrown by other mods. + overrideVanillaGLLogger = true + # + # Defines how OpenGL errors are handled. + # May incorrectly catch OpenGL errors thrown by other mods. + # + # IGNORE: Do nothing. + # LOG: write an error to the log. + # LOG_THROW: write to the log and throw an exception. + # Warning: this should only be enabled when debugging the LOD renderer + # as it may break Minecraft's renderer when an exception is thrown. + glErrorHandlingMode = "IGNORE" + # + # If true each Open GL error will only be logged once. + # Enabling this may cause some error logs to be missed. + # Does nothing if overrideVanillaGLLogger is set to false. + # + # Generally this can be kept as 'true' to prevent log spam. + # However, Please set this to 'false' if a developer needs your log to debug a GL issue. + onlyLogGlErrorsOnce = true + + [client.advanced.debugging.exampleConfigScreen] + shortTest = "69" + mapTest = "{}" + byteTest = "8" + longTest = "42069" + listTest = ["option 1", "option 2", "option 3"] + boolTest = false + doubleTest = "420.69" + floatTest = "0.42069" + linkableTest = 420 + intTest = 69420 + stringTest = "Test input box" + + [client.advanced.debugging.f3Screen] + # + # Shows info about the render thread tasks. + showRenderThreadTasks = false + # + # Shows how many chunks are queued for processing and the max count that can be queued. + showQueuedChunkUpdateCount = true + # + # Shows the memory use and array counts for each DH object pool. + showSeparatedObjectPools = false + # + # Shows the player's LOD position. + showPlayerPos = true + # + # Shows the combined memory use and array counts for all DH pooled objects. + showCombinedObjectPools = false + # + # Defines what internal detail level the player position will be shown as. + # Internal detail level means: 6 = 1x1 block, 7 = 2x2 blocks, etc. + playerPosSectionDetailLevel = 6 + # + # Only show levels that DH is actively rendering. + onlyShowRenderingLevels = true + # + # Shows info about each thread pool. + showThreadPools = true + # + # Shows what levels are loaded and world gen/rendering info about those levels. + showLevelStatus = true + + [client.advanced.debugging.positionFinderDebugging] + positionFinderEnable = false + positionFinderMinBlockY = -64 + positionFinderZPos = 0 + positionFinderXPos = 0 + positionFinderMaxBlockY = 125 + positionFinderDetailLevel = 6 + positionFinderMarginPercent = "0.0" + + [client.advanced.graphics] + # + # Enabling Anti-Aliasing smooths edges and reduces flickering when moving. + enableAntiAliasing = true + # + # Enable Screen Space Ambient Occlusion + enableSsao = false + # + # If true some vanilla graphics settings will be automatically changed + # during DH setup to provide a better experience. + # + # IE disabling vanilla clouds (which render on top of DH LODs), + # and chunk fading (DH already fades MC chunks) + overrideVanillaGraphicsSettings = true + + [client.advanced.graphics.culling] + # + # Determines how far from the camera Distant Horizons will start rendering. + # Measured as a percentage of the vanilla render distance. + # + # -1 = auto, overdraw will change based on the vanilla render distance. + # + # Higher values will prevent LODs from rendering behind vanilla blocks at a higher distance, + # but may cause holes in the world. + # Holes are most likely to appear when flying through unloaded terrain. + # + # Increasing the vanilla render distance increases the effectiveness of this setting. + overdrawPrevention = "-1.0" + # + # Identical to the other frustum culling option + # only used when a shader mod is present using the DH API + # and the shadow pass is being rendered. + # + # Disable this if shadows render incorrectly. + disableShadowPassFrustumCulling = false + # + # A comma separated list of block resource locations that will be replaced by water + # if they're visible on the water's surface. + waterSubSurfaceBlockReplacementCsv = "minecraft:kelp,minecraft:tall_seagrass,minecraft:seagrass" + # + # A comma separated list of block resource locations that won't be rendered by DH. + # Air is always included in this list. + # + # Note: + # If you see gaps, or holes you may have to change + # worldCompression to [MERGE_SAME_BLOCKS] and re-generate the LODs. + ignoredRenderBlockCsv = "minecraft:barrier,minecraft:structure_void,minecraft:light,minecraft:tripwire,minecraft:brown_mushroom" + # + # A comma separated list of block resource locations that will be removed + # when on top of water. + waterSurfaceBlockReplacementCsv = "minecraft:lily_pad" + # + # Defines what blocks should be rendered as LODs. + # + # NONE: Include all blocks in the LODs + # NON_COLLIDING: Only render solid blocks in the LODs (tall grass, torches, etc. will be ignored) + blocksToIgnore = "NON_COLLIDING" + # + # If true LODs outside the player's camera + # aren't drawn, increasing GPU performance. + # + # If false all LODs are drawn, even those behind + # the player's camera, decreasing GPU performance. + # + # Disable this if you see LODs disappearing at the corners of your vision. + disableFrustumCulling = false + # + # If false all beacons near the camera won't be drawn to prevent vanilla overdraw. + # If true all beacons will be rendered. + # + # Generally this should be left as true. It's main purpose is for debugging + # beacon updating/rendering. + disableBeaconDistanceCulling = true + # + # Should the blocks underneath avoided blocks gain the color of the avoided block? + # + # True: a red flower will tint the grass below it red. + # False: skipped blocks will not change color of surface below them. + tintWithAvoidedBlocks = true + # + # If enabled caves won't be rendered. + # + # Note: for some world types this can cause + # overhangs or walls for floating objects. + # Tweaking the caveCullingHeight, can resolve some + # of those issues. + enableCaveCulling = true + # + # At what Y value should cave culling start? + # Lower this value if you get walls for areas with 0 light. + caveCullingHeight = 60 + # + # A comma separated list of block resource locations that shouldn't be rendered + # if they are in a 0 sky light underground area. + # Air is always included in this list. + # + # Defaults to an empty list since most cave blocks will be automatically ignored due to being: + # transparent, non-solid, or liquids, but new blocks can be added here if needed. + ignoredRenderCaveBlockCsv = "" + # + # If set to true the overdraw prevention radius will get closer + # to the camera when flying/moving quickly. + # + # This helps reduce issues where Minecraft can't load or + # generate chunks fast enough to keep up with DH. + reduceOverdrawWithFastMovement = true + + [client.advanced.graphics.texture] + # + # A comma separated list of block resource locations + # that DH will render their sides using the bottom texture. + # Partial matches/incomplete resource locations will also match. + # + # Example: "minecraft:grass_block,nylium" + # + # Changes require a restart. + blocksDontUseSideTextureCsv = "grass_block,mycelium,nylium,dirt_path,grass" + # + # The highest detail level number that can render with block textures. + # At higher detail levels each LOD covers multiple blocks, + # which can essentially make textures smaller than a pixel and therefore invisible. + # + # Larger numbers texture more distant LODs + # but increase memory usage. + maxTexturedLodDetailLevel = 2 + # + # If true nearby and zoomed-in LODs will render with their block's + # actual texture instead of a single flat color. + # + # Only applies to high detail LODs where the texture is actually visible, + # distant LODs always use flat colors. + # Some shader packs nay not have an affect. + enableTexturedLods = true + # + # A comma separated list of block resource locations + # that DH won't render textures on. + # Partial matches/incomplete resource locations will also match. + # + # Example: "minecraft:grass_block,nylium" + # + # Changes require a restart. + blocksDontRenderTextureCsv = "minecraft:bamboo" + # + # A comma separated list of tag names + # that DH will render their sides using the bottom texture. + # + # Example: "grass_blocks,nylium" + # + # Changes require a restart. + blockTagsDontUseSideTextureCsv = "grass_blocks,nylium" + # + # A comma separated list of block resource locations + # that DH will use rasterization to determine + # the face textures. + # + # Can be used to fix issues with mods/blocks where + # a side uses just part of a modeled block's texture. + # + # Example: "minecraft:beacon" + # + # Changes require a restart. + blocksAlwaysRasterizeTextureCsv = "minecraft:beacon" + + [client.advanced.graphics.noiseTexture] + # + # Should a noise texture be applied to LODs? + # + # This is done to simulate textures and make the LODs appear more detailed. + enableNoiseTexture = true + # + # Defines how far should the noise texture render before it fades away. (in blocks) + # Set to 0 to disable noise from fading away + noiseDropoff = 1024 + # + # How many steps of noise should be applied to LODs? + noiseSteps = 4 + # + # How intense should the noise should be? + noiseIntensity = "0.05" + + [client.advanced.graphics.experimental] + # + # A comma separated list of dimension resource locations where DH won't render. + # + # Example: "minecraft:the_nether,minecraft:the_end" + # For Minecraft 1.12.2 and older: + # Open the F3 screen and copy the dimension_name:ID shown in yellow. Example: "overworld:0" + # + # Note: + # Some DH settings will be disabled and/or changed to improve + # visuals when DH rendering is disabled. + ignoredDimensionCsv = "" + # + # Requires a restart to change. + # + # Options: + # AUTO - changes based on the most likely API for that MC version + # OPEN_GL - The Default for MC 1.21.11 and older (supports Iris shaders) + # BLAZE_3D - The Default for MC 26.1.2 and newer (supports Vulkan) + renderingEngine = "AUTO" + # + # This is the earth size ratio when applying the curvature shader effect. + # Note: Enabling this feature may cause rendering bugs. + # + # 0 = flat/disabled + # 1 = 1 to 1 (6,371,000 blocks) + # 100 = 1 to 100 (63,710 blocks) + # 10000 = 1 to 10000 (637.1 blocks) + # + # Note: Due to current limitations, the min value is [50] + # and the max value is 5000. Any values outside this range + # will be set to 0 (disabled). + earthCurveRatio = 0 + + [client.advanced.graphics.genericRendering] + # + # A comma separated separated list of dimension resource locations where DH clouds will render. + # + # Example: "minecraft:overworld,minecraft:the_end" + # + # Changes require a world re-load. + dimensionEnabledCloudRenderingCsv = "minecraft:overworld" + # + # If true LOD clouds will be rendered. + enableCloudRendering = true + # + # If true LOD beacon beams will be rendered wider at extreme distances, + # making them easier to see. + # If false all LOD beacon beams will only ever be 1 block wide. + expandDistantBeacons = true + # + # Sets the maximum height beacons will render up to. + # + # Requires a world re-load to take affect. + beaconRenderHeight = 6000 + # + # If true LOD beacon beams will be rendered. + enableBeaconRendering = true + # + # If true non terrain objects will be rendered by DH. + # i.e. beacon beams and clouds. + enableGenericRendering = true + # + # False = DH will render a single layer of clouds, like vanilla Minecraft. + # True = DH will render 3 layers of clouds at different heights. + enableMultiLayerClouds = true + + [client.advanced.graphics.quality] + # + # What is the maximum detail LODs can render at? + # Higher settings will increase memory and GPU usage. + # + # CHUNK: render 1 LOD for each Chunk. + # HALF_CHUNK: render 4 LODs for each Chunk. + # FOUR_BLOCKS: render 16 LODs for each Chunk. + # TWO_BLOCKS: render 64 LODs for each Chunk. + # BLOCK: render 256 LODs for each Chunk (width of one block). + # + # Fastest: CHUNK + # Fanciest: BLOCK + maxHorizontalResolution = "BLOCK" + # + # If true LODs will fade away as you get closer to them. + # If false LODs will cut off abruptly at a set distance from the camera. + # This setting is affected by the vanilla overdraw prevention config. + ditherDhFade = true + # + # If true DH will try to use the camera position when + # determining LOD quality drop-off. + # If false DH will use the player's position. + # + # Enabling helps free-cam mods render correctly. + # Disabling helps multi-camera mods render correctly (ie Immersive Portals or camera mods). + useCameraPositionForQualityDropOff = true + # + # How bright LOD colors are. + # + # 0 = black + # 1 = normal + # 2 = near white + brightnessMultiplier = "1.0" + # + # How many detail levels zooming in can increase LOD quality by. + # Higher numbers allow stronger zooms to render crisper terrain, + # but will increase memory and GPU usage while zoomed in. + # + # A vanilla spyglass needs 4 detail levels to reach its full quality. + maxZoomQualityIncrease = 4 + # + # How should LODs be shaded? + # + # AUTO: Uses the same side shading as vanilla Minecraft blocks. + # ENABLED: Simulates Minecraft's block shading for LODs. + # Can be used to force LOD shading when using some shaders. + # DISABLED: All LOD sides will be rendered with the same brightness. + lodShading = "AUTO" + # + # How saturated LOD colors are. + # + # 0 = black and white + # 1 = normal + # 2 = very saturated + saturationMultiplier = "1.0" + # + # This indicates how well LODs will represent + # overhangs, caves, floating islands, etc. + # Higher options will make the world more accurate, butwill increase memory and GPU usage. + # + # Lowest Quality: HEIGHT_MAP + # Highest Quality: PIXEL_ART + verticalQuality = "MEDIUM" + # + # The radius of the mod's render distance. (measured in chunks) + # + # Note: this is a best effort number. + # The actual render distance may be above or below this number + # depending on your other graphic settings. + lodChunkRenderDistanceRadius = 128 + # + # How should the sides and bottom of grass block LODs render? + # + # AS_GRASS: all sides of dirt LOD's render using the top (green) color. + # FADE_TO_DIRT: sides fade from grass to dirt. + # AS_DIRT: sides render entirely as dirt. + grassSideRendering = "FADE_TO_DIRT" + # + # This indicates how far apart drops in LOD quality are. + # + # Higher settings will increase the distance between drops + # but will increase memory and GPU usage. + horizontalQuality = "MEDIUM" + # + # How should LOD transparency be handled. + # + # COMPLETE: LODs will render transparent. + # DISABLED: LODs will be opaque. + transparency = "COMPLETE" + # + # This is the same as vanilla Biome Blending settings for Lod area. + # Note: anything above '0' will slow down LOD loading time. + # + # '0' equals to Vanilla Biome Blending of '1x1' or 'OFF', + # '1' equals to Vanilla Biome Blending of '3x3', + # '2' equals to Vanilla Biome Blending of '5x5'... + lodBiomeBlending = 3 + # + # How should vanilla Minecraft fade into Distant Horizons LODs? + # + # NONE: Fastest, there will be a pronounced border between DH and MC rendering. + # SINGLE_PASS: Fades after MC's transparent pass, opaque blocks underwater won't be faded. + # DOUBLE_PASS: Slowest, fades after both MC's opaque and transparent passes, provides the smoothest transition. + vanillaFadeMode = "DOUBLE_PASS" + # + # If true LOD quality will increase when the camera is zoomed in, + # IE when using a spyglass or zoom mod. + # + # Only LODs visible through the camera view are affected. + # + # When zoomed in LODs will load to the same detail level + # they would have if you were close to them. + increaseQualityWhenZoomedIn = true + + [client.advanced.graphics.fog] + # + # Should Minecraft's fog render? + # Note: Other mods may conflict with this setting. + enableVanillaFog = false + # + # What is the maximum fog thickness? + # + # 0.0: No fog. + # 1.0: Fully opaque fog. + farFogMax = "1.0" + # + # Determines if fog is drawn on DH LODs. + enableDhFog = true + # + # At what distance should the far fog start? + # + # 0.0: Fog starts at the player's position. + # 1.0: Fog starts at the closest edge of the vanilla render distance. + # 1.414: Fog starts at the corner of the vanilla render distance. + farFogStart = "0.4" + # + # What is the minimum fog thickness? + # + # 0.0: No fog. + # 1.0: Fully opaque fog. + farFogMin = "0.0" + # + # What color should fog use? + # + # USE_WORLD_FOG_COLOR: Use the world's fog color. + # USE_SKY_COLOR: Use the sky's color. + colorMode = "USE_WORLD_FOG_COLOR" + # + # How should the fog thickness should be calculated? + # + # LINEAR: Linear based on distance (will ignore 'density') + # EXPONENTIAL: 1/(e^(distance*density)) + # EXPONENTIAL_SQUARED: 1/(e^((distance*density)^2) + farFogFalloff = "EXPONENTIAL_SQUARED" + # + # Used in conjunction with the Fog Falloff. + farFogDensity = "2.5" + # + # Where should the far fog end? + # + # 0.0: Fog ends at player's position. + # 1.0: Fog ends at the closest edge of the vanilla render distance. + # 1.414: Fog ends at the corner of the vanilla render distance. + farFogEnd = "1.0" + + [client.advanced.graphics.fog.heightFog] + # + # Where should the height fog start? + # + # ABOVE_CAMERA: Height fog starts at the camera and goes towards the sky + # BELOW_CAMERA: Height fog starts at the camera and goes towards the void + # ABOVE_AND_BELOW_CAMERA: Height fog starts from the camera to goes towards both the sky and void + # ABOVE_SET_HEIGHT: Height fog starts from a set height and goes towards the sky + # BELOW_SET_HEIGHT: Height fog starts from a set height and goes towards the void + # ABOVE_AND_BELOW_SET_HEIGHT: Height fog starts from a set height and goes towards both the sky and void + heightFogDirection = "BELOW_SET_HEIGHT" + # + # What is the minimum fog thickness? + # + # 0.0: No fog. + # 1.0: Fully opaque fog. + heightFogMin = "0.0" + # + # If the height fog is calculated around a set height, what is that height position? + heightFogBaseHeight = "80.0" + # + # What is the maximum fog thickness? + # + # 0.0: No fog. + # 1.0: Fully opaque fog. + heightFogMax = "1.0" + # + # How should the height fog thickness should be calculated? + # + # LINEAR: Linear based on height (will ignore 'density') + # EXPONENTIAL: 1/(e^(height*density)) + # EXPONENTIAL_SQUARED: 1/(e^((height*density)^2) + heightFogFalloff = "EXPONENTIAL_SQUARED" + # + # What is the height fog's density? + heightFogDensity = "20.0" + # + # How should height effect the fog thickness? + # Note: height fog is combined with the other fog settings. + # + # SPHERICAL: Fog is calculated based on camera distance. + # CYLINDRICAL: Ignore height, fog is calculated based on horizontal distance. + # + # MAX: max(heightFog, farFog) + # ADDITION: heightFog + farFog + # MULTIPLY: heightFog * farFog + # INVERSE_MULTIPLY: 1 - (1-heightFog) * (1-farFog) + # LIMITED_ADDITION: farFog + max(farFog, heightFog) + # MULTIPLY_ADDITION: farFog + farFog * heightFog + # INVERSE_MULTIPLY_ADDITION: farFog + 1 - (1-heightFog) * (1-farFog) + # AVERAGE: farFog*0.5 + heightFog*0.5 + heightFogMixMode = "SPHERICAL" + # + # Should the start of the height fog be offset? + # + # 0.0: Fog start with no offset. + # 1.0: Fog start with offset of the entire world's height. (Includes depth) + heightFogStart = "0.0" + # + # Should the end of the height fog be offset? + # + # 0.0: Fog end with no offset. + # 1.0: Fog end with offset of the entire world's height. (Include depth) + heightFogEnd = "0.6" + + [client.advanced.multiplayer] + # + # How should multiplayer save folders should be named? + # + # NAME_ONLY: Example: "Minecraft Server" + # IP_ONLY: Example: "192.168.1.40" + # NAME_IP: Example: "Minecraft Server IP 192.168.1.40" + # NAME_IP_PORT: Example: "Minecraft Server IP 192.168.1.40:25565"NAME_IP_PORT_MC_VERSION: Example: "Minecraft Server IP 192.168.1.40:25565 GameVersion 1.16.5" + serverFolderNameMode = "NAME_ONLY" diff --git a/config/onion-perf/mid/config/entity_model_features.json b/config/onion-perf/mid/config/entity_model_features.json new file mode 100644 index 0000000..9ea5681 --- /dev/null +++ b/config/onion-perf/mid/config/entity_model_features.json @@ -0,0 +1,36 @@ +{ + "allowedCEM": "ALL", + "logModelCreationData": false, + "debugOnRightClick": false, + "renderModeChoice": "NORMAL", + "vanillaModelHologramRenderMode_2": "OFF", + "modelExportMode": "NONE", + "automaticModelExporting": false, + "attemptPhysicsModPatch_2": "CUSTOM", + "modelUpdateFrequency": "Slow", + "entityRenderModeOverrides": {}, + "entityPhysicsModPatchOverrides": {}, + "entityVanillaHologramOverrides": {}, + "modelsNamesDisabled": [], + "allowEBEModConfigModify": true, + "animationLODDistance": 12, + "retainDetailOnLowFps": true, + "retainDetailOnLargerMobs": true, + "animationFrameSkipDuringIrisShadowPass": true, + "preventFirstPersonHandAnimating": false, + "onlyClientPlayerModel": false, + "doubleChestAnimFix": true, + "enforceOptifineVariationRequiresDefaultModel": false, + "enforceOptifineVariationRequiresDefaultModel_v2": false, + "resetPlayerModelEachRender": true, + "resetPlayerModelEachRender_v2": true, + "onlyDebugRenderOnHover": false, + "enforceOptifineSubFoldersVariantOnly": false, + "enforceOptiFineAnimSyntaxLimits": true, + "allowOptifineFallbackProperties": true, + "showReloadErrorToast": true, + "exportRotations": false, + "asmMaths": true, + "logASM": false, + "parrotShoulderPositionAnimatesByDefault": true +} diff --git a/config/onion-perf/mid/config/flywheel-client.toml b/config/onion-perf/mid/config/flywheel-client.toml new file mode 100644 index 0000000..8b5c625 --- /dev/null +++ b/config/onion-perf/mid/config/flywheel-client.toml @@ -0,0 +1,14 @@ +#Select the backend to use. Set to "DEFAULT" to let Flywheel decide. +backend = "DEFAULT" +#Enable or disable instance update limiting with distance. +limitUpdates = true +#The number of worker threads to use. Set to -1 to let Flywheel decide. Set to 0 to disable parallelism. Requires a game restart to take effect. +# Default: -1 +# Range: -1 ~ 4 +workerThreads = -1 + +#Config options for Flywheel's built-in backends. +[flw_backends] + #How smooth Flywheel's shader-based lighting should be. May have a large performance impact. + #Allowed Values: FLAT, TRI_LINEAR, SMOOTH, SMOOTH_INNER_FACE_CORRECTED + lightSmoothness = "TRI_LINEAR" diff --git a/config/onion-perf/mid/config/lambdynlights.toml b/config/onion-perf/mid/config/lambdynlights.toml new file mode 100644 index 0000000..24fc7a1 --- /dev/null +++ b/config/onion-perf/mid/config/lambdynlights.toml @@ -0,0 +1,16 @@ +mode = "fast" +chunk_rebuild_scheduler = "culling" + +[adaptive_ticking] +slow = 5 +slower = 8 +background_sleep = true + +[light_sources] +entities = true +self = true +water_sensitive_check = true +beam = true +guardian_laser = true +sonic_boom = true +glowing_effect = true diff --git a/config/onion-perf/mid/config/sound_physics_remastered/sound_rates.properties b/config/onion-perf/mid/config/sound_physics_remastered/sound_rates.properties new file mode 100644 index 0000000..c3ea8c0 --- /dev/null +++ b/config/onion-perf/mid/config/sound_physics_remastered/sound_rates.properties @@ -0,0 +1,20 @@ +# Partial file: SPR merges these over its generated per-sound defaults (-1 = unlimited). +create\:cogs=4 +create\:mixing=4 +create\:mixing_compounded_1=4 +create\:mechanical_press_activation=4 +create\:mechanical_press_activation_compounded_1=4 +create\:mechanical_press_activation_belt=4 +create\:mechanical_press_activation_belt_compounded_1=4 +create\:crushing_1=4 +create\:crushing_2=4 +create\:crushing_3=4 +create\:saw_activate_stone=4 +create\:saw_activate_wood=4 +create\:funnel_flap=4 +create\:funnel_flap_compounded_1=4 +create\:depot_slide=4 +create\:depot_plop=4 +create\:steam=4 +create\:sanding_short=4 +create\:sanding_long=4 diff --git a/config/onion-perf/mid/config/sound_physics_remastered/soundphysics.properties b/config/onion-perf/mid/config/sound_physics_remastered/soundphysics.properties new file mode 100644 index 0000000..f6ec8e3 --- /dev/null +++ b/config/onion-perf/mid/config/sound_physics_remastered/soundphysics.properties @@ -0,0 +1,99 @@ +# Enables/Disables all sound effects +enabled=true +# Affects how quiet a sound gets based on distance +# Lower values mean distant sounds are louder +# This setting requires you to be in singleplayer or having the mod installed on the server +# 1.0 is the physically correct value +attenuation_factor=1.0 +# The ray distance at which reverb starts +# 0.0 disables reverb attenuation +reverb_attenuation_distance=0.0 +# The volume of simulated reverberations +reverb_gain=1.0 +# The brightness of reverberation +# Higher values result in more high frequencies in reverberation +# Lower values give a more muffled sound to the reverb +reverb_brightness=1.0 +# The distance of reverb relative to the sound distance +reverb_distance=1.5 +# The amount of sound that will be absorbed when traveling through blocks +block_absorption=1.0 +# Higher values mean smaller objects won't be considered as occluding +occlusion_variation=0.35 +# The default amount of sound reflectance energy for all blocks +# Lower values result in more conservative reverb simulation with shorter reverb tails +# Higher values result in more generous reverb simulation with higher reverb tails +default_block_reflectivity=0.5 +# The default amount of occlusion for all blocks +# Lower values will result in sounds being less muffled through walls +# Higher values mean sounds will be not audible though thicker walls +default_block_occlusion_factor=1.0 +# Minecraft won't allow sounds to play past a certain distance +# This parameter is a multiplier for how far away a sound source is allowed to be in order for it to actually play +# This setting only takes affect in singleplayer worlds and when installed on the server +sound_distance_allowance=4.0 +# A value controlling the amount that air absorbs high frequencies with distance +# A value of 1.0 is physically correct for air with normal humidity and temperature +# Higher values mean air will absorb more high frequencies with distance +# 0 disables this effect +air_absorption=1.0 +# How much sound is filtered when the player is underwater +# 0.0 means no filter +# 1.0 means fully filtered +underwater_filter=0.9 +# Whether sounds like cave, nether or underwater ambient sounds should have sound physics +evaluate_ambient_sounds=false +# The number of rays to trace to determine reverberation for each sound source +# More rays provides more consistent tracing results but takes more time to calculate +# Decrease this value if you experience lag spikes when sounds play +environment_evaluation_ray_count=16 +# The number of rays bounces to trace to determine reverberation for each sound source +# More bounces provides more echo and sound ducting but takes more time to calculate +# Decrease this value if you experience lag spikes when sounds play +environment_evaluation_ray_bounces=2 +# If sound hits a non-full-square side, block occlusion is multiplied by this +non_full_block_occlusion_factor=0.25 +# The maximum amount of rays to determine occlusion +# Directly correlates to the amount of blocks between walls that are considered +max_occlusion_rays=16 +# The amount at which occlusion is capped +max_occlusion=64.0 +# If enabled, the occlusion calculation only uses one path between the sound source and the listener instead of 9 +strict_occlusion=false +# Whether to try calculating where the sound should come from based on reflections +sound_direction_evaluation=true +# Skip redirecting non-occluded sounds (the ones you can see directly) +redirect_non_occluded_sounds=true +# If music discs or other longer sounds should be frequently reevaluated +update_moving_sounds=false +# The interval in ticks that moving sounds are reevaluated +# Lower values mean more frequent reevaluation but also more lag +# This option only takes effect if update_moving_sounds is enabled +sound_update_interval=5 +# The maximum distance a sound can be processed +max_sound_processing_distance=512.0 +# Disable level clone and cache. This will fall back to original main thread access. +# WARNING! Enabling this will cause instability and issues with other mods. +unsafe_level_access=false +# The radius of chunks to clone for level access +level_clone_range=4 +# The maximum number of ticks to retain the cloned level in the cache +level_clone_max_retain_ticks=20 +# The maximum distance a player can move from the cloned origin before invalidation +level_clone_max_retain_block_distance=16 +# Enables debug logging +debug_logging=false +# Provides more information about occlusion in the logs +occlusion_logging=false +# Provides more information about the environment calculation in the logs +environment_logging=false +# Provides more information about how long computations take +performance_logging=false +# If enabled, the path of the sound will be rendered in game +render_sound_bounces=false +# If enabled, occlusion will be visualized in game +render_occlusion=false +# Enables/Disables sound effects for Simple Voice Chat audio +simple_voice_chat_integration=true +# Enables/Disables hearing your own echo with Simple Voice Chat +simple_voice_chat_hear_self=false diff --git a/config/onion-perf/mid/config/ssrd-common.toml b/config/onion-perf/mid/config/ssrd-common.toml new file mode 100644 index 0000000..30fedc0 --- /dev/null +++ b/config/onion-perf/mid/config/ssrd-common.toml @@ -0,0 +1,12 @@ +#The render distance for physics objects (SubLevels) in chunks. +# Default: 128 +# Range: 1 ~ 1000000 +physicsRenderDistance = 16 +#The minimum render distance for physics objects (SubLevels) in chunks. +# Default: 16 +# Range: 1 ~ 1000000 +minPhysicsRenderDistance = 16 +#The maximum render distance for physics objects (SubLevels) in chunks. +# Default: 4096 +# Range: 1 ~ 1000000 +maxPhysicsRenderDistance = 4096 diff --git a/config/onion-perf/mid/options.txt b/config/onion-perf/mid/options.txt new file mode 100644 index 0000000..27086e3 --- /dev/null +++ b/config/onion-perf/mid/options.txt @@ -0,0 +1,11 @@ +version:3955 +renderDistance:8 +simulationDistance:8 +biomeBlendRadius:1 +mipmapLevels:2 +entityDistanceScaling:0.75 +particles:0 +entityShadows:true +graphicsMode:1 +maxFps:120 +enableVsync:true diff --git a/index.toml b/index.toml index 0391714..189838c 100644 --- a/index.toml +++ b/index.toml @@ -40,6 +40,106 @@ hash = "62034e0589087dab02d1a15192ad313a57f907d5ee9ebbf8853151f7831851a1" file = "config/modernfix-mixins.properties" hash = "ca92e91a2d856d42e4a5b1ba1900fbed0e942bcbeddd75c0195a2375ade75695" +[[files]] +file = "config/onion-perf/deck/config/DistantHorizons.toml" +hash = "46910495d79b540beed8137765fff4e14be3fd1860a5cadc73b38a6fbc0f3984" + +[[files]] +file = "config/onion-perf/deck/config/entity_model_features.json" +hash = "89a8e21f43f512d78bfbc3ffb97b6d65cedc732a65ee565aed46499aa79fd57d" + +[[files]] +file = "config/onion-perf/deck/config/flywheel-client.toml" +hash = "e10963bf43711e1d326e076a5b5baa5654b73d1a3878da6aa11c373b47c9e3ac" + +[[files]] +file = "config/onion-perf/deck/config/lambdynlights.toml" +hash = "53a0c285438775ce29b8d44180feba1fd17b496eb0bbe5cb18684f2af1fdd3c9" + +[[files]] +file = "config/onion-perf/deck/config/sodium-options.json" +hash = "c8c04fb322fc59c73e446f665522c3f0cdaafe6143b94b5895bb07f267489235" + +[[files]] +file = "config/onion-perf/deck/config/sound_physics_remastered/sound_rates.properties" +hash = "c4676fcc924cc4bacc187d5364831aac1be170b93a2dc8e11119bff0235353e9" + +[[files]] +file = "config/onion-perf/deck/config/sound_physics_remastered/soundphysics.properties" +hash = "912706e845015c30604db7ad0020a4ca95cdf4a94f7cad9eb8a166eab83f8279" + +[[files]] +file = "config/onion-perf/deck/config/ssrd-common.toml" +hash = "9b75828543ed2b8cc5804eabecdc28262297a90d6f0e8e771d64ff779a69e3c9" + +[[files]] +file = "config/onion-perf/deck/options.txt" +hash = "c021331ed6ac5150025ccf8f61fc96793fdf2d2950617a85b68b977f7510ee47" + +[[files]] +file = "config/onion-perf/high/config/DistantHorizons.toml" +hash = "b4070cb07cf2fb9c7b14a2c49bc6b45b6aeb26d650fe8de80e4f9cbe67cb3ff5" + +[[files]] +file = "config/onion-perf/high/config/entity_model_features.json" +hash = "7650058e21d1eaafc14cc1879bc20c2b510eb9f3095914322b8b08fc31025437" + +[[files]] +file = "config/onion-perf/high/config/flywheel-client.toml" +hash = "8171fd8500c7bbd52df9fe4f8ea1b7abdc6a24868a9e7e54fa908b4725382bde" + +[[files]] +file = "config/onion-perf/high/config/lambdynlights.toml" +hash = "0406650cc9d47011360284e0019f237ba3c94fc3067dc2bb4171f9a5fbea8367" + +[[files]] +file = "config/onion-perf/high/config/sound_physics_remastered/sound_rates.properties" +hash = "c4676fcc924cc4bacc187d5364831aac1be170b93a2dc8e11119bff0235353e9" + +[[files]] +file = "config/onion-perf/high/config/sound_physics_remastered/soundphysics.properties" +hash = "912706e845015c30604db7ad0020a4ca95cdf4a94f7cad9eb8a166eab83f8279" + +[[files]] +file = "config/onion-perf/high/config/ssrd-common.toml" +hash = "9b744451175d440c4f2567d1fdd9799c2dc434012f5b1edb33cc7550193c4cef" + +[[files]] +file = "config/onion-perf/high/options.txt" +hash = "22900375cf1d9a608d9d19c8bdbd5bd497d47f66a11a57182de576e09497fd7d" + +[[files]] +file = "config/onion-perf/mid/config/DistantHorizons.toml" +hash = "8949bf3c7a43df7a7ae384213db0985425db3559219c29cb63eaef45c7962dcc" + +[[files]] +file = "config/onion-perf/mid/config/entity_model_features.json" +hash = "7650058e21d1eaafc14cc1879bc20c2b510eb9f3095914322b8b08fc31025437" + +[[files]] +file = "config/onion-perf/mid/config/flywheel-client.toml" +hash = "517e16b3dc86f15b5dccd9ff4f70f767b73ebc2166f6ea2891565417d930772a" + +[[files]] +file = "config/onion-perf/mid/config/lambdynlights.toml" +hash = "3876c8b0c49cc8c2a7f500bc5d77429035e4edb25e16d27434e1dd4d546ae510" + +[[files]] +file = "config/onion-perf/mid/config/sound_physics_remastered/sound_rates.properties" +hash = "c4676fcc924cc4bacc187d5364831aac1be170b93a2dc8e11119bff0235353e9" + +[[files]] +file = "config/onion-perf/mid/config/sound_physics_remastered/soundphysics.properties" +hash = "d93803ffc12f4b55f9668dc2b9a4823d733b77f02dfee0879d6507f262ad34c6" + +[[files]] +file = "config/onion-perf/mid/config/ssrd-common.toml" +hash = "9b75828543ed2b8cc5804eabecdc28262297a90d6f0e8e771d64ff779a69e3c9" + +[[files]] +file = "config/onion-perf/mid/options.txt" +hash = "62034e0589087dab02d1a15192ad313a57f907d5ee9ebbf8853151f7831851a1" + [[files]] file = "config/paxi/datapacks/onion-fixes/data/adorablehamsterpets/recipe/cucumber_crate.json" hash = "21b11674b18c3fb0d8292095cf7c12bca82ef4054ec3f1cd8d1e0222d1655629" @@ -1311,6 +1411,18 @@ file = "mods/zume.pw.toml" hash = "165466fe8e528309d95875396f2a5e13c0bab7bcb0c1134d1fd5f3a935d488f5" metafile = true +[[files]] +file = "onion-perf-setup.bat" +hash = "8e8e613429e5a2243829fa023c1dcc36b874ce42176bfa55dfa3c8a73122ccfd" + +[[files]] +file = "onion-perf-setup.ps1" +hash = "86e12ff56f13229c3b0159eb2ea0cba403f35c6221be67037ea8481d370fa30d" + +[[files]] +file = "onion-perf-setup.sh" +hash = "ecd5dfd5e135db6e9a98df65a7176cc2a9b3e14d7a140a3dcce90aae64d06519" + [[files]] file = "resourcepacks/better-leaves.pw.toml" hash = "c26f8da8b6f013fb7e917e29fc6ae783eb379c539da12d9d61196bc762fd26e1" diff --git a/onion-perf-setup.bat b/onion-perf-setup.bat new file mode 100644 index 0000000..892666f --- /dev/null +++ b/onion-perf-setup.bat @@ -0,0 +1,7 @@ +@echo off +rem Onion MC: apply a performance tier (deck / mid / high) to this instance. +rem Double-click it in the instance folder, or run: onion-perf-setup.bat high --yes +powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0onion-perf-setup.ps1" %* +set ONION_RC=%ERRORLEVEL% +pause +exit /b %ONION_RC% diff --git a/onion-perf-setup.ps1 b/onion-perf-setup.ps1 new file mode 100644 index 0000000..ff10b43 --- /dev/null +++ b/onion-perf-setup.ps1 @@ -0,0 +1,183 @@ +# Onion MC: apply a performance tier's tuned settings to this instance. +# +# onion-perf-setup.bat [deck|mid|high] [--yes] (or run this .ps1 directly) +# +# Lives in the instance's game folder (the one that holds config\ and options.txt) +# after a pack update. Close Minecraft first. Every file it changes is backed up to +# onion-perf-backup\\ first. options.txt is merged key by key: only the +# tier's video keys change; keybinds, audio, resource packs etc. are left alone. +# No network access. Windows PowerShell 5.1 compatible. + +$ErrorActionPreference = 'Stop' + +function Fail([string]$msg) { + [Console]::Error.WriteLine("error: $msg") + exit 1 +} + +$Game = $PSScriptRoot +if (-not $Game) { $Game = Split-Path -Parent $MyInvocation.MyCommand.Path } + +$Tier = '' +$Yes = $false +foreach ($a in $args) { + $s = ([string]$a).ToLowerInvariant() + if (@('deck', 'mid', 'high') -contains $s) { + if ($Tier) { Fail 'more than one tier given' } + $Tier = $s + } elseif (@('-y', '--yes', '-yes', '/y') -contains $s) { + $Yes = $true + } else { + Fail "unknown argument '$a' (use: deck | mid | high, optionally --yes)" + } +} + +$Perf = Join-Path $Game 'config\onion-perf' +if (-not (Test-Path -LiteralPath (Join-Path $Perf 'mid') -PathType Container)) { + Fail "$Perf not found. Update the modpack first (it ships these settings), and run this script from the instance's game folder." +} + +$Interactive = [Environment]::UserInteractive -and -not [Console]::IsInputRedirected + +if (-not $Tier) { + if ($Interactive) { + Write-Host 'Which tier fits this machine?' + Write-Host ' deck Steam Deck, handheld, laptop/integrated graphics' + Write-Host ' mid GTX 1060 / RX 580 class (~6 GB VRAM), 4-6 core CPU [pack default]' + Write-Host ' high 8 GB+ VRAM graphics card (GTX 1080 Ti, RTX 3060 and up)' + $Tier = (Read-Host 'Tier [mid]').Trim().ToLowerInvariant() + if (-not $Tier) { $Tier = 'mid' } + if (@('deck', 'mid', 'high') -notcontains $Tier) { Fail "unknown tier '$Tier'" } + } else { + $Tier = 'mid' + } +} +$Src = Join-Path $Perf $Tier +if (-not (Test-Path -LiteralPath $Src -PathType Container)) { Fail "$Src not found. Update the modpack first." } + +if (-not $Yes) { + if (-not $Interactive) { Fail 'not running interactively: close Minecraft, then re-run with --yes' } + $ans = Read-Host 'Is Minecraft closed? [y/N]' + if (@('y', 'yes') -notcontains $ans.Trim().ToLowerInvariant()) { + Write-Host 'Close Minecraft and run this again.' + exit 1 + } +} + +$Stamp = Get-Date -Format 'yyyyMMdd-HHmmss' +$Backup = Join-Path $Game (Join-Path 'onion-perf-backup' $Stamp) +$n = 1 +while (Test-Path -LiteralPath $Backup) { + $Backup = Join-Path $Game (Join-Path 'onion-perf-backup' "$Stamp-$n") + $n++ +} +# .NET file calls, not New-Item/Copy-Item: instance folders often contain '[' (Prism +# names the game dir after the instance) and -Path/Copy-Item -Destination glob those. +[IO.Directory]::CreateDirectory($Backup) | Out-Null + +function Save-Backup([string]$rel) { + $from = Join-Path $Game $rel + if (-not (Test-Path -LiteralPath $from -PathType Leaf)) { return } + $to = Join-Path $Backup $rel + [IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName($to)) | Out-Null + [IO.File]::Copy($from, $to, $true) +} + +function Test-SameFile([string]$a, [string]$b) { + if (-not (Test-Path -LiteralPath $b -PathType Leaf)) { return $false } + $x = [IO.File]::ReadAllBytes($a) + $y = [IO.File]::ReadAllBytes($b) + if ($x.Length -ne $y.Length) { return $false } + return [Convert]::ToBase64String($x) -ceq [Convert]::ToBase64String($y) +} + +$replaced = 0 +$unchanged = 0 +Write-Host "Applying tier '$Tier' to $Game" +$srcConfig = Join-Path $Src 'config' +$files = @() +if (Test-Path -LiteralPath $srcConfig) { + $srcConfig = (Get-Item -LiteralPath $srcConfig).FullName.TrimEnd('\', '/') + $files = @(Get-ChildItem -LiteralPath $srcConfig -Recurse -File | Sort-Object FullName) +} +foreach ($f in $files) { + $rel = 'config' + $f.FullName.Substring($srcConfig.Length) + $dst = Join-Path $Game $rel + if (Test-SameFile $f.FullName $dst) { $unchanged++; continue } + Save-Backup $rel + [IO.Directory]::CreateDirectory([IO.Path]::GetDirectoryName($dst)) | Out-Null + [IO.File]::Copy($f.FullName, $dst, $true) + Write-Host " replaced $($rel -replace '\\', '/')" + $replaced++ +} + +$Opt = Join-Path $Game 'options.txt' +$SrcOpt = Join-Path $Src 'options.txt' +$Utf8 = New-Object Text.UTF8Encoding $false +if (-not (Test-Path -LiteralPath $SrcOpt -PathType Leaf)) { + Write-Host ' (tier has no options.txt)' +} elseif (-not (Test-Path -LiteralPath $Opt -PathType Leaf)) { + Write-Host ' options.txt not found: skipped (Default Options seeds it on first launch)' +} else { + $skip = @('version', 'maxFps', 'enableVsync') + $want = @{} + $order = New-Object System.Collections.Generic.List[string] + foreach ($line in [IO.File]::ReadAllLines($SrcOpt, $Utf8)) { + $i = $line.IndexOf(':') + if ($i -lt 0) { continue } + $k = $line.Substring(0, $i) + if ($skip -ccontains $k) { continue } + if (-not $want.ContainsKey($k)) { $order.Add($k) } + $want[$k] = $line.Substring($i + 1) + } + $raw = [IO.File]::ReadAllText($Opt, $Utf8) + $nl = "`n" + if ($raw.Contains("`r`n")) { $nl = "`r`n" } + $lines = $raw -split "`r?`n" + $trailing = $raw.EndsWith("`n") + if ($trailing) { $lines = $lines[0..($lines.Length - 2)] } + if ($raw.Length -eq 0) { $lines = @() } + $out = New-Object System.Collections.Generic.List[string] + $done = @{} + $changes = New-Object System.Collections.Generic.List[string] + foreach ($line in $lines) { + $i = $line.IndexOf(':') + if ($i -gt 0) { + $k = $line.Substring(0, $i) + if ($want.ContainsKey($k) -and -not $done.ContainsKey($k)) { + $v = $line.Substring($i + 1) + if ($v -cne $want[$k]) { $changes.Add(" ${k}: $v -> $($want[$k])") } + $out.Add("${k}:$($want[$k])") + $done[$k] = $true + continue + } + } + $out.Add($line) + } + foreach ($k in $order) { + if (-not $done.ContainsKey($k)) { + $changes.Add(" ${k}: (unset) -> $($want[$k])") + $out.Add("${k}:$($want[$k])") + } + } + if ($changes.Count -gt 0) { + Save-Backup 'options.txt' + # WriteAllText (not WriteAllLines): same UTF-8-without-BOM bytes, but joins with + # the file's own line endings - WriteAllLines always uses Environment.NewLine. + $text = [string]::Join($nl, $out.ToArray()) + $nl + [IO.File]::WriteAllText($Opt, $text, $Utf8) + Write-Host ' options.txt keys changed:' + foreach ($c in $changes) { Write-Host $c } + } else { + Write-Host ' options.txt: already matches the tier' + } +} + +if (@(Get-ChildItem -LiteralPath $Backup -Force).Count -eq 0) { + Remove-Item -LiteralPath $Backup -Force + $Backup = '(nothing changed, no backup needed)' +} +Write-Host "Done: tier '$Tier'; $replaced file(s) replaced, $unchanged already up to date." +Write-Host "Backup: $Backup" +Write-Host 'Also set Java memory in your launcher (5 GB is enough): see PLAYER-TUNING.md section 2.' +exit 0 diff --git a/onion-perf-setup.sh b/onion-perf-setup.sh new file mode 100755 index 0000000..dca77a5 --- /dev/null +++ b/onion-perf-setup.sh @@ -0,0 +1,157 @@ +#!/bin/sh +# Onion MC: apply a performance tier's tuned settings to this instance. +# +# sh onion-perf-setup.sh [deck|mid|high] [--yes] +# +# Run it from (or point it at) the instance's game folder - the one that holds +# config/ and options.txt; this script lives there after a pack update. +# Close Minecraft first. Every file it changes is backed up to +# onion-perf-backup// first. options.txt is merged key by key: only the +# tier's video keys change; keybinds, audio, resource packs etc. are left alone. +# No network access. Windows: double-click onion-perf-setup.bat instead. + +die() { echo "error: $*" >&2; exit 1; } + +case "$0" in + */*) GAME=$(cd "${0%/*}" && pwd) || die "cannot find the script's folder" ;; + *) GAME=$(pwd) ;; +esac + +TIER="" +YES=0 +for a in "$@"; do + case "$a" in + deck|mid|high) [ -z "$TIER" ] || die "more than one tier given"; TIER=$a ;; + -y|--yes) YES=1 ;; + -h|--help) sed -n '2,11p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;; + *) die "unknown argument '$a' (use: deck | mid | high, optionally --yes)" ;; + esac +done + +PERF="$GAME/config/onion-perf" +[ -d "$PERF/mid" ] || die "$PERF not found. Update the modpack first (it ships these +settings), and run this script from the instance's game folder." + +INTERACTIVE=0 +[ -t 0 ] && INTERACTIVE=1 + +if [ -z "$TIER" ]; then + if [ "$INTERACTIVE" = 1 ]; then + cat <<'EOF' +Which tier fits this machine? + deck Steam Deck, handheld, laptop/integrated graphics + mid GTX 1060 / RX 580 class (~6 GB VRAM), 4-6 core CPU [pack default] + high 8 GB+ VRAM graphics card (GTX 1080 Ti, RTX 3060 and up) +EOF + printf 'Tier [mid]: ' + read -r TIER || TIER="" + [ -n "$TIER" ] || TIER=mid + case "$TIER" in deck|mid|high) ;; *) die "unknown tier '$TIER'" ;; esac + else + TIER=mid + fi +fi +SRC="$PERF/$TIER" +[ -d "$SRC" ] || die "$SRC not found. Update the modpack first." + +if [ "$YES" != 1 ]; then + [ "$INTERACTIVE" = 1 ] || die "not running interactively: close Minecraft, then re-run with --yes" + printf 'Is Minecraft closed? [y/N]: ' + read -r ans || ans="" + case "$ans" in y|Y|yes|YES|Yes) ;; *) echo "Close Minecraft and run this again."; exit 1 ;; esac +fi + +STAMP=$(date +%Y%m%d-%H%M%S) +BACKUP="$GAME/onion-perf-backup/$STAMP" +n=1 +while [ -e "$BACKUP" ]; do BACKUP="$GAME/onion-perf-backup/$STAMP-$n"; n=$((n + 1)); done +mkdir -p "$BACKUP" || die "cannot create $BACKUP" + +backup() { # backup , if it exists + [ -f "$GAME/$1" ] || return 0 + case "$1" in */*) mkdir -p "$BACKUP/${1%/*}" || die "cannot create backup folder" ;; esac + cp -p "$GAME/$1" "$BACKUP/$1" || die "cannot back up $1" +} + +LIST=$(mktemp "${TMPDIR:-/tmp}/onion-perf.XXXXXX") || die "mktemp failed" +REPORT=$(mktemp "${TMPDIR:-/tmp}/onion-perf.XXXXXX") || die "mktemp failed" +trap 'rm -f "$LIST" "$REPORT"' EXIT +(cd "$SRC" && find config -type f) | sort > "$LIST" || die "cannot list $SRC" + +replaced=0 +unchanged=0 +echo "Applying tier '$TIER' to $GAME" +while IFS= read -r rel; do + if [ -f "$GAME/$rel" ] && cmp -s "$SRC/$rel" "$GAME/$rel"; then + unchanged=$((unchanged + 1)) + continue + fi + backup "$rel" + case "$rel" in */*) mkdir -p "$GAME/${rel%/*}" || die "cannot create folder for $rel" ;; esac + cp "$SRC/$rel" "$GAME/$rel" || die "cannot write $rel" + echo " replaced $rel" + replaced=$((replaced + 1)) +done < "$LIST" + +OPT="$GAME/options.txt" +if [ ! -f "$SRC/options.txt" ]; then + echo " (tier has no options.txt)" +elif [ ! -f "$OPT" ]; then + echo " options.txt not found: skipped (Default Options seeds it on first launch)" +else + TMP="$OPT.onion-perf.tmp" + awk -v rep="$REPORT" ' + NR == FNR { + sub(/\r$/, "") + i = index($0, ":") + if (i == 0) next + k = substr($0, 1, i - 1) + if (k == "version" || k == "maxFps" || k == "enableVsync") next + if (!(k in want)) order[++n] = k + want[k] = substr($0, i + 1) + next + } + { + cr = "" + if (sub(/\r$/, "")) { cr = "\r"; crlf = 1 } + i = index($0, ":") + if (i > 0) { + k = substr($0, 1, i - 1) + if ((k in want) && !(k in done)) { + v = substr($0, i + 1) + if (v != want[k]) print " " k ": " v " -> " want[k] > rep + print k ":" want[k] cr + done[k] = 1 + next + } + } + print $0 cr + } + END { + for (j = 1; j <= n; j++) { + k = order[j] + if (!(k in done)) { + print " " k ": (unset) -> " want[k] > rep + print k ":" want[k] (crlf ? "\r" : "") + } + } + } + ' "$SRC/options.txt" "$OPT" > "$TMP" || { rm -f "$TMP"; die "cannot merge options.txt"; } + if [ -s "$REPORT" ]; then + backup options.txt + mv "$TMP" "$OPT" || die "cannot write options.txt" + echo " options.txt keys changed:" + cat "$REPORT" + else + rm -f "$TMP" + echo " options.txt: already matches the tier" + fi +fi + +if [ -z "$(ls -A "$BACKUP")" ]; then + rmdir "$BACKUP" + BACKUP="(nothing changed, no backup needed)" +fi +echo "Done: tier '$TIER'; $replaced file(s) replaced, $unchanged already up to date." +echo "Backup: $BACKUP" +echo "Also set Java memory in your launcher (5 GB is enough): see PLAYER-TUNING.md section 2." diff --git a/pack.toml b/pack.toml index 2f1d2fc..e20adfc 100644 --- a/pack.toml +++ b/pack.toml @@ -6,7 +6,7 @@ pack-format = "packwiz:1.1.0" [index] file = "index.toml" hash-format = "sha256" -hash = "07463f2d8920a7a3ec3f9b3d7d5f0883ed265d3bc8c34e0c956b09d8ce277814" +hash = "f4b8ec15830662e033bd5c7723357a58aeeaf9dad1c5957f103961fb83ee0fd1" [versions] minecraft = "1.21.1"