Developer Tiered Integration - Atlasroar/WandererZ GitHub Wiki

Tiered Integration — Methodology

This page documents why and how Globox1997/tiered was merged directly into WandererZ in v2.1.0, following the same playbook as the JobsAddon and RpgDifficulty merges.

Why this was different from the previous two merges

Tiered is a standalone item-tiering/anvil-reforging mod, but unlike RpgDifficulty it was built as an optional addon for the original LevelZ mod specifically — it shipped a modCompileOnly 'maven.modrinth:levelz:1.4.10' compile dependency and hard import net.levelz.* statements in two files, gated behind FabricLoader.isModLoaded("levelz"). Since Tiered is now bundled in the same jar as WandererZ, this soft dependency became a tautology (always true) rather than a real integration point, so it needed targeted find-and-replace rather than a net-new compat mixin.

Both mods also:

  • target the same Minecraft version (1.20.1) and Yarn mappings
  • use fully disjoint Java packages (net.wandererz.* / net.jobsaddon.* / net.rpgdifficulty.* vs draylar.tiered.*) — Tiered keeps its upstream draylar package root unchanged, same convention as the other two merges keeping their own roots
  • use disjoint resource namespaces (assets/tiered, data/tiered), aside from small additive contributions to the shared assets/emi and assets/legendarytooltips compat namespaces

Step-by-step methodology

  1. Inventory the tree. Cloned Tiered's 1.20 branch — by far the largest of the three merged addons (~55 Java files, ~150 JSON item-attribute data files, its own anvil/reforge GUI, and custom packet networking). Grepped for every levelz-related reference (17 matches across 8 files) to scope the compat rewrite.
  2. Copy source wholesale, keeping draylar.tiered as the package name, and copy all resources (assets/tiered, assets/emi/tag/exclusions/tiered.json, assets/legendarytooltips, data/tiered, tiered.mixins.json).
  3. Rewrite the LevelZ compat points (the one thing structurally different from JobsAddon/RpgDifficulty):
    • Tiered.isLevelZLoaded → Tiered.isWandererzLoaded, checking FabricLoader.isModLoaded("wandererz") instead of "levelz".
    • TieredMixinPlugin — the FabricLoader.isModLoaded("levelz") guard controlling whether SkillInfoScreenMixin applies was updated to check "wandererz". The unrelated isModLoaded("easyanvils") guard for ModAnvilScreenMixin was left untouched (genuinely optional third-party compat).
    • SkillInfoScreenMixin — net.levelz.screen.SkillInfoScreen import (and the mixin's string-based method descriptor) repointed to net.wandererz.screen.SkillInfoScreen, the actual class at that path post-rename.
    • ModifierUtils — net.levelz.access.PlayerStatsManagerAccess / net.levelz.stats.Skill imports repointed to net.wandererz.*.
    • TieredConfig.levelzReforgeModifier (a brand-new config field being introduced by this merge, not a previously-shipped one) was renamed to wandererzReforgeModifier for branding consistency, along with its lang keys across all 5 shipped translations.
    • Dropped the now-unnecessary modCompileOnly 'maven.modrinth:levelz:1.4.10' Gradle dependency entirely — the code it used to compile against is now in the same source tree.
  4. Extract the Mod Menu screen. Same single-entrypoint-per-id constraint as the previous two merges. Tiered's standalone ModMenuIntegration implements ModMenuApi class was deleted, and WandererZ's combined chooser screen gained a fourth button that opens AutoConfig.getConfigScreen(TieredConfig.class, this).
  5. Merge the manifest. fabric.mod.json: appended Tiered's main/client entrypoints, registered tiered.mixins.json alongside the existing three mixin configs, and added autotag-convention to depends (Tiered's own required, separately-installed dependency — not bundled). Did not carry over Tiered's own mc-publish block (belongs to the upstream project, not this fork), matching the precedent from the original rename.
  6. Add Gradle dependencies.
    • AutoTag (com.github.apace100:autotag-api / autotag) — a required, separately-installed dependency (not bundled), published to https://maven.willbl.dev/releases (not jitpack, despite the upstream repo also having a jitpack.yml — its actual publish target is willbl.dev). Added that repository URL to build.gradle.
    • Reach Entity Attributes (com.jamieswhiteshirt:reach-entity-attributes) — bundled via Loom's include(...), matching upstream's approach, so end users don't need to install it separately.
    • EasyAnvils and TooltipFix — optional modCompileOnly soft-compat dependencies, carried over as-is (unrelated third-party mods, gated by their own isModLoaded checks).
    • gradle.properties: added autotag_version=2.0.2+1.20 and reach_attributes_version=2.4.0.
  7. Validate. gradlew compileJava then gradlew build on JDK 17 — both succeeded, producing wandererz-2.1.0.jar. Verified the jar contains the expected draylar/tiered/** classes, data/tiered/** resources, the bundled reach-entity-attributes jar under META-INF/jars, and the merged fabric.mod.json.
  8. Version bump. mod_version went from 2.0.0 → 2.1.0 — a MINOR semver bump (additive functionality, no breaking changes).

Gotcha worth calling out: AutoTag's actual Maven host

AutoTag's repo ships a jitpack.yml, which looks like a signal it publishes via jitpack.io — but its build.gradle actually configures Maven publishing directly to https://maven.willbl.dev/releases, and its real release tags (e.g. v2.0.2+1.20) don't resolve on jitpack (400 Bad Request for both the API and implementation artifacts, likely due to jitpack rejecting the + character in version tags during on-demand building). Using the dependency coordinates com.github.apace100:autotag-api:2.0.2+1.20 / com.github.apace100:autotag:2.0.2+1.20 against the maven.willbl.dev/releases repository (not jitpack) resolved correctly.

Things deliberately not changed

  • Tiered's item-attribute/reforge data format, tier list (common/uncommon/rare/epic/legendary/unique), NBT keys (Tiered/Tier), and /tiered tier//tiered untier commands were left 100% intact.
  • ModAnvilScreenMixin's EasyAnvils compat and the TooltipFix compat dependency are unrelated third-party integrations and were left untouched.
  • Non-English Tiered lang files were copied as-is, aside from the mechanical levelzReforgeModifier → wandererzReforgeModifier key rename (translated text preserved).

Risk register (resolved)

Risk Resolution
Mod Menu only showing one config per button slot Added a fourth button to the existing combined chooser Screen
net.levelz.* imports no longer resolving Repointed to the equivalent net.wandererz.* classes at their actual current paths
isModLoaded("levelz") becoming a dead/always-false check Repointed to "wandererz", now a tautological always-true check (consistent with how the JobsAddon/RpgDifficulty merges handled the same pattern)
AutoTag failing to resolve via jitpack Identified its real publish target (maven.willbl.dev/releases) and added that repository instead
Config field name colliding with the "LevelZ" brand Renamed the brand-new levelzReforgeModifier field to wandererzReforgeModifier (safe since it wasn't a previously-shipped field)
Hidden package/mixin-target/resource collisions Verified none exist via full file-tree and @Mixin target review before copying