Skip to content

Latest commit

 

History

History
70 lines (53 loc) · 2.84 KB

File metadata and controls

70 lines (53 loc) · 2.84 KB

Contributing to Effective Instruments

Thanks for considering a contribution. This mod is small and opinionated, so a few notes up front save everyone time.

Dev setup

  1. Clone the repo.
  2. ./gradlew build — this pulls Genshin Instruments and Even More Instruments from Curse Maven at compile time only (both are compileOnly since 1.5.0). No local jars required.
  3. ./gradlew runClient launches a dev client without Genshin Instruments on the runtime classpath — useful for verifying the GI-absent code paths.
  4. ./gradlew runClient -PdevRuntimeGenshin=true launches a dev client with Genshin Instruments included at runtime so the stationary tier actually works in-game.

You need JDK 17 (Temurin recommended). The Gradle wrapper jar is committed, so ./gradlew works out of the box.

If you bump a dependency version, update the matching _file_id property in gradle.properties. Look up file ids at https://www.curseforge.com/minecraft/mc-mods/<slug>/files.

Backend-quarantine invariant

Since 1.5.0, Genshin Instruments is an optional backend. Always-loaded classes must not import com.cstav.genshinstrument.*. The audit grep grep -R "com.cstav.genshinstrument" src/main/java/ should return only matches in compat/genshin/ (the quarantined event handler and the client-side reflection bridge). If you need to consume a new GI API, either extend GenshinInstrumentEventHandler or add a method to the reflection bridge — never import GI from a class that loads unconditionally.

Scope

  • The core feature set (aura presets, instrument mapping, selector UI, effect application) is intentionally minimal. Proposals to rework core mechanics need a design discussion before a PR.
  • New config knobs are welcome when they address a modpack-author pain point. Aim for sensible defaults that preserve existing behavior.
  • Avoid drive-by refactors. A bug fix should fix the bug, not also rename three variables.

Tests

  • Unit tests live under src/test/java/. They run on plain JUnit 5 without a Minecraft runtime — keep it that way.
  • Pure functions (e.g. OverwritePolicy.shouldOverwrite) can be tested directly. For logic that touches ForgeRegistries or MobEffect, mirror the approach in InstrumentAuraMappingJsonTest and parse a local-record version of the data.
  • ./gradlew test before pushing.

Commits

  • Keep commit messages descriptive — the "why" matters more than the "what".
  • No co-author tags unless you actually had a co-author.
  • Don't amend published commits.

Reporting bugs

Open an issue with: Minecraft version, Forge version, mod version, list of other installed mods, and a log excerpt. Server-side bugs should include logs/latest.log from a dedicated server if possible.

Security

Please report security issues privately — see SECURITY.md.