Skip to content

Development

TheonlyTazz edited this page Jul 23, 2026 · 1 revision

Development

Dynamic Brewing targets Java 21, Minecraft 1.21.1, and NeoForge 21.1.242.

Commands

.\gradlew.bat build
.\gradlew.bat runGameTestServer
.\gradlew.bat runClient

runGameTestServer uses run/gameTest, separate from client and server development directories. Test Java, the Apple → Diamond fixture, and its structure template live in src/gameTest; none are included in the production JAR.

Source layout

  • src/main/java: recipe implementation, brewing hooks, mixins, and optional integrations
  • src/main/resources/data/minecraft/recipe/brewing: built-in vanilla-equivalent recipes
  • src/gameTest: integration tests and test-only data
  • docs: user and contributor documentation

Brewing lookup lifecycle

PotionBrewing delegates data-recipe queries to an immutable BrewingRecipeSnapshot. The snapshot is attached to the existing brewing service, indexed by possible input and ingredient items, and replaced only when the associated RecipeManager instance or revision changes. RecipeManagerMixin advances that revision after both datapack application and client-side recipe replacement.

Keep the recipe manager authoritative. Do not copy datapack recipes into PotionBrewing.Builder: the builder is a startup lifecycle and cannot represent live recipe removal or client recipe resynchronization without replacing or mutating objects held by other mods.

Validation expectations

Before publishing:

  1. Run a clean build.
  2. Run all GameTests.
  3. Launch with neither optional mod, with JEI, with KubeJS, and with both.
  4. Inspect the JAR for test classes and fixtures.
  5. Check runtime logs for mixin, recipe-sync, and optional-integration errors.

Clone this wiki locally