Skip to content

Developer JobsAddon Integration

Atlasroar edited this page Oct 3, 2026 · 2 revisions

JobsAddon Integration — Methodology

This page documents why and how Globox1997/JobsAddon was merged directly into WandererZ in v1.5.0, as a reference for future similar merges and for anyone auditing the change.

Implementing PRs: #1 — Integrate JobsAddon directly into WandererZ, #2 — Add 1.5.0 changelog and issue templates.

Why this was safe to do mechanically

JobsAddon was already built as a genuine Fabric addon to WandererZ — its source directly imported WandererZ's public API (net.wandererz.init.ConfigInit, net.wandererz.access.PlayerSyncAccess) and both mods:

  • target the same Minecraft version (1.20.1) and Yarn mappings (1.20.1+build.10)
  • are authored by the same person (Globox_Z)
  • use fully disjoint Java packages (net.wandererz.* vs net.jobsaddon.*)
  • use disjoint resource/data namespaces (assets/wandererz, data/wandererz vs assets/jobsaddon, data/jobsaddon)

This one-directional dependency (Jobs → WandererZ, never the reverse) meant there was no circular-dependency problem to solve — only packaging and loader-identity concerns.

Step-by-step methodology

  1. Inventory both trees. Cloned JobsAddon's 1.20 branch and diffed its full file list (Java classes, mixins, assets, data) against WandererZ's to rule out any class name collisions, resource namespace collisions, or advancement/criteria id collisions. None were found; even duplicate class names (ConfigInit, EventInit, etc.) live safely in separate packages.
  2. Copy source wholesale, keeping net.jobsaddon as the package name (no renaming), to keep the diff reviewable and preserve JobsAddon's own git history/blame if ever needed for reference.
  3. Fix the one id-sensitive runtime call. EventInit.java called FabricLoader.getInstance().getModContainer("jobsaddon") in 8 places to register built-in compat resource packs via ResourceManagerHelper.registerBuiltinResourcePack. Since mod ids (unlike resource namespaces) are real registered identities, and the merged jar now only declares the wandererz id, all 8 call sites were updated to getModContainer("wandererz"). Missing this would throw NoSuchElementException at runtime for any player with a detected compat mod installed.
  4. Resolve the Mod Menu single-entrypoint conflict. Mod Menu keys its config-screen-factory map by mod id. Two separate ModMenuApi implementations can't both be registered productively under one id — only the last-registered would be reachable. The fix was a small combined net.wandererz.config.ModMenuIntegration that opens a custom vanilla Screen with two buttons, each opening AutoConfig.getConfigScreen(...) for WandererzConfig or JobsAddonConfig respectively. This preserves both configs/JSON files unmodified — no config schema merging was needed.
  5. Merge the manifest. fabric.mod.json: appended JobsAddon's main/client entrypoints (additive arrays — safe), registered jobsaddon.mixins.json alongside wandererz.mixins.json, updated the description. Left depends untouched (no self-dependency on wandererz to remove was actually present after copy, verified by direct inspection).
  6. Reconcile build configuration.
    • gradle.properties: took the newer of each differing version (loader_version, fabric_version, cloth_config_version) on the assumption that newer Fabric/Loom-ecosystem versions are backward compatible — verified afterward by a full gradlew build.
    • build.gradle: added modCompileOnly entries for JobsAddon's optional compat dependencies (Numismatic Overhaul, Farmer's Delight, FallingTree, Harvest Scythes) so its conditionally-compiled mixins resolve at compile time. treechop was already present in WandererZ's build.gradle at a compatible version/API, so it was left untouched rather than adding a duplicate/conflicting entry.
    • libz (the shared tab-registry dependency both mods already used) was bumped to the version JobsAddon required.
  7. Validate. gradlew compileJava then gradlew build on JDK 17 (the project's --release 17 target) — both succeeded, producing levelz-1.5.0.jar (the project's name at the time) with no additional source changes required beyond the two fixes above. See Build & Release.
  8. Version bump. mod_version went from 1.4.13 → 1.5.0 — a MINOR semver bump, since the merge is purely additive (new functionality, same save/data format, same public API surface plus new APIs) and introduces no breaking changes for existing worlds, configs, or API consumers.

Things deliberately not changed

  • JobsAddon's own job-XP/job-level formulas, NBT keys, and network packet identifiers were left 100% intact — this is a packaging merge, not a gameplay rewrite.
  • The CookingPotResultSlotMixin file exists in the source tree but, matching upstream JobsAddon behavior, is intentionally not listed in jobsaddon.mixins.json's mixins array.
  • Non-English JobsAddon lang files (pt_br, zh_cn) were copied as-is; only the 3 new Mod Menu chooser-screen strings were added to WandererZ's en_us.json (other WandererZ locales fall back to English for those 3 keys).

Risk register (resolved)

Risk Resolution
getModContainer("jobsaddon") throwing post-merge Changed to "wandererz" (8 call sites)
Mod Menu only showing one mod's config Combined chooser Screen
Version skew between the two gradle.properties Adopted newer values; validated via full build
Hidden package/resource collisions Verified none exist via full file-tree diff before copying

Clone this wiki locally