Feat: Add tick hooks and Fabric 26.2 support

- Add ClassHook/HookManager pipeline that patches classes through
  JuiceAgent retransform
- Fire EventTickPre/EventTickPost around Minecraft.runTick
  (1.8.9: runTick()V, 26.2: runTick(Z)V)
- Prepare the javassist ClassPool with OrangeX.jar and imported
  packages, avoiding the vanilla 1.8.8 default-package "cn" class
  collision on qualified names
- Access the JuiceAgent API through the system ClassLoader so
  Fabric's Knot does not load a second copy without native methods
- Document the hook architecture, event bus and troubleshooting
  under docs/
This commit is contained in:
xiaozhou233 committed 2026-11-05 14:27:31 +08:00
1 parent 40ca99f853
commit 6c19985e52
14 files changed
+1101 -1

No files matched your search

@@ -49,6 +49,9 @@ public class Loader {
orangexFile = new File(OrangeXPath + "/OrangeX.jar");
}
System.out.println("OrangeX Injection: " + orangexFile.getAbsolutePath());
// javassist's ClassPool cannot always discover this jar through the
// game ClassLoader, so expose the path to OrangeX explicitly.
System.setProperty("orangex.jar", orangexFile.getAbsolutePath());
addToGameClassLoader(orangexFile, minecraftClassLoader);
// Start OrangeX