This file is for coding agents working in this repository. It consolidates local build/test commands and code conventions.
- This repo is FPSMaster Edge: Minecraft Forge 1.8.9 only. Multi-version / modern MC work belongs in Nova, not here.
- Primary references:
build.gradle.ktsdocs/code_standards.mddocs/development_environment.mddocs/development_tutorial.mdREADME.md
- If this file conflicts with code or Gradle config, follow code and Gradle.
- Performance campaign docs under
docs/performance/andbenchmark/RESULTS.mdare historical measurement notes, not an open backlog unless the user says otherwise. Start atdocs/performance/index.mdif needed.
- Treat only committed repo files as policy. Local untracked
.cursor/skills or rules may exist on a machine; do not assume they are part of the project unless present in git.
- Single Gradle project for Minecraft Forge 1.8.9.
- Java sources:
src/main/java/(packages undertop.fpsmaster.*). - Resources:
src/main/resources/(mcmod, mixins, assets, access transformer config). - Docs:
docs/(dev guides at root; performance archive indocs/performance/; icon bake underdocs/icons/). - Branding/assets:
pictures/. - Benchmark harness:
benchmark/(scripts/scenarios; large result dirs are gitignored).
- Gradle toolchain targets Java 8 bytecode.
- Use JDK 17 or 21 for Gradle and IDE import (JDK 25 is not supported by the current wrapper/Loom stack).
- Use JDK 8 for running the Minecraft client. On Apple Silicon, use an x86_64 JDK 8 via Rosetta.
- IntelliJ run configs are generated with Gradle and may require manual copy/refresh (
docs/development_environment.md). - Version strings:
FPSMaster.CLIENT_VERSION(1.0.0) andEDITION(Edge); keepmcmod.infoin sync.
Run from repository root.
- Windows:
gradlew.bat <task> - Unix-like:
./gradlew <task>
gradlew.bat build— full build; produces remapped outputs through assemble dependencies.gradlew.bat assemble— assemble pipeline; includes remap output.gradlew.bat remapJar— final remapped jar without classifier.gradlew.bat shadowJar— shaded dev jar (all-devclassifier).gradlew.bat genIntelliJRuns— generates IntelliJ run configurations.
gradlew.bat test— all tests (tree may be sparse).- Single class:
gradlew.bat test --tests "com.example.MyFeatureTest" - Single method:
gradlew.bat test --tests "com.example.MyFeatureTest.shouldHandleEdgeCase"
- No Spotless/Checkstyle/PMD task is configured — do not invent one.
- Apply style from
docs/code_standards.mdand surrounding code.
Follow docs/code_standards.md and patterns in src/main/java.
- Packages, methods, variables:
camelCase. - Classes/interfaces/enums:
PascalCase. - Constants:
UPPER_SNAKE_CASE.
- 4 spaces; K&R braces; space after control keywords; space around binary operators.
- Fields, constructors, methods; group related methods; narrowest viable access.
- Keep imports tidy; remove unused; avoid wildcards unless the file already uses that pattern.
- Prefer concrete types at API boundaries; no raw types in new code.
- Null-check Minecraft runtime objects, file I/O, and reflection results.
- JavaDoc for non-obvious public API; inline comments only for non-obvious logic.
- Register modules in
ModuleManager.init(), HUD components inComponentsManager.init(). InterfaceModuleappearance settings come fromTrait+registerCommonSettings()— do not re-registerbg/rounded/… in subclasses.- HUD text colors must include alpha (see
Component.drawString).
- No empty
catchin new code; useClientLoggerwith context. - Prefer specific exceptions; recoverable → log + fallback; unrecoverable → clear throw/wrap.
- Do not expand legacy broad/empty catches; tighten when editing if low risk.
- JUnit 5 present; gameplay changes need manual 1.8.9 verification notes.
- Validate edge cases for changed logic.
- Short imperative subjects; conventional prefixes (
feat:,fix:,docs:) are fine. - Keep PR scope tight; note verification performed.
./gradlew build(orgradlew.bat build) succeeds.- Targeted tests run, or document why none exist.
- No style regressions against
docs/code_standards.md. - Logging remains informative and non-silent.