Guidance for Claude Code and other agentic coding tools working in this repository.
ProtoHax is a Gradle-based Kotlin/JVM library for a platform-agnostic Minecraft: Bedrock Edition relay/packet-layer client. The repository is no longer actively maintained upstream, so prefer small, targeted changes over broad rewrites.
Primary package: dev.sora.relay
- Use JDK 11. The Gradle build config sets
kotlin.jvmToolchain(11). - Build the project with
./gradlew build. - Publish locally with
./gradlew publishToMavenLocal. - Create the shaded artifact with
./gradlew shadowJar. - There is no conventional unit test suite in this repo.
src/testis example/runtime code and may require Microsoft/Xbox authentication state; do not assume it can run unattended.
src/main/java/dev/sora/relay/session: relay session and listener pipeline.src/main/java/dev/sora/relay/game: game session state, entities, inventory, world, registries, and events.src/main/java/dev/sora/relay/cheat: modules, commands, config, and value system.src/main/java/org/cloudburstmc/protocol: local protocol utility/codec overrides.src/main/resources/assets: bundled assets and mapping data.src/test: example relay entry point and supporting test utilities.
- Follow
.editorconfig: LF endings, UTF-8, final newline, and tabs for Kotlin indentation. - Keep Kotlin changes consistent with the surrounding code style, including existing package layout and concise module classes.
- Prefer adding behavior through the existing event system (
GameEvent,EventManager,CheatModule.handle*) instead of introducing parallel callback mechanisms. - Register new cheat modules in
ModuleManager.init()and place them under the appropriateimpl/<category>package. - Use the existing
Valueclasses for configurable module settings so config serialization and visibility handling keep working. - Keep protocol, registry, and packet handling changes version-aware. This project is intended to adapt across Bedrock protocol versions.
- Dependencies are declared in
build.gradle. - The build uses
mavenLocal(), Maven Central, OpenCollab repositories, andmccheatz.github.io/maven_repo. - The
embedconfiguration feeds the Shadow plugin. If adding a runtime dependency that must be bundled, useembed; otherwise use the narrowest suitable Gradle configuration. src/main/resources/assets/mcpedatais a git submodule. If mapping files are missing, initialize submodules rather than replacing generated data by hand.
- Do not commit secrets, OAuth tokens, session data, or local config files. The example auth flow in
src/test/README.mduses a.ms_refresh_tokenfile that must remain local. - Avoid changing public package names, artifact coordinates, or shaded dependency behavior unless the requested task explicitly requires it.
- Keep documentation in English, matching the repository README guidance.