Skip to content

Minecraft: Java Edition 26.3 rewritten from scratch in Rust, checked against vanilla with 281 differential harnesses. Get it with the Horizon launcher.

pacing_bench: import its helpers as the other tools do (no sys.path change)

Ludovic Maried1ee2d879cca
diff --git a/tools/pacing_bench.py b/tools/pacing_bench.py
index 1ad8e49c1..a0aae6452 100644
--- a/tools/pacing_bench.py
+++ b/tools/pacing_bench.py
@@ -26,13 +26,15 @@ import math
import os
import re
import subprocess
-import sys
import time
from pathlib import Path
-sys.path.insert(0, str(Path(__file__).resolve().parent))
-import lab # noqa: E402
-import perf_bench as pb # noqa: E402
+try:
+ from . import lab
+ from . import perf_bench as pb
+except ImportError:
+ import lab
+ import perf_bench as pb
WORK = lab.ROOT / ".local/pacing-bench"
SCENARIOS = ["fly16", "ocean", "fly64", "teleport", "nether", "inventory"]