Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

19 Commits

Folders and files

Repository files navigation

ProjectZomboidMixin

A runtime patching framework (Java Agent) for Project Zomboid based on Sponge Mixin. It modifies game client code at runtime through -javaagent injection, without modifying game files or depending on any mod loader.

中文文档

Features

  • Bytecode-level runtime injection, zero modification to game files
  • Declarative patches written with Sponge Mixin
  • MixinExtras integrated

Requirements

Item Requirement
JDK 21+
Project Zomboid Official client (you must provide your own projectzomboid.jar)

Installation

  1. Copy projectzomboid.jar from your game directory into the libs/ folder. It is only used at compile time to resolve game classes, so make sure its version matches the game you intend to patch.

  2. Build:

    ./gradlew shadowJar
  3. The output JAR is at build/libs/ProjectZomboidMixin-1.0.jar.

Usage (Steam)

Inject the agent through the Launch Options in the Steam client:

  1. Right-click Project Zomboid in your Steam Library and select Properties.

  2. Open the General tab and click Launch Options.

  3. Add the full path to the agent JAR, e.g.:

    -javaagent="C:\path\to\ProjectZomboidMixin-1.0.jar"
    
  4. Launch the game. The console prints [AgentJar] Mixin loaded successfully! when injection succeeds, and [Agent Diagnostics] >>> Mixin Applied !!! each time a target class is successfully patched.

Project Structure

src/main/java/ink/szd/pz_optimize_framework/
├── AgentMain.java              # Agent entry: initializes Mixin and registers the transformer
├── bootstrap/                  # Mixin service and transformer adaptation layer
│   ├── PZMixinService.java     # Custom IMixinService adapted to game ClassLoader
│   ├── PZMixinServiceBootstrap.java
│   ├── PZGlobalPropertyService.java
│   ├── PZMixinTransformer.java
│   └── PZClassTransformer.java # Intercepts zombie/* classes and runs Mixin transformation
└── mixins/
    └── SleepOptionMixin.java   # Sample patch: sleep retry cooldown 1h -> 10min

Configuration

Mixin declarations live in src/main/resources/mixins.pz.json. When adding a patch class, register its simple class name in the mixins array.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages