Skip to content

Using MojMap instead of Intermediary on Fabric <=1.21.11 #33

Description

@Olafcio1

To compile for all the modloaders Avoid supports, compromises have to be done. Either I suffer, or Avoid devs suffer.

Why?

Modern Non-Fabric loaders use mojmap - not intermediary or srg. Therefore, mods that build for fabric <=1.21.11, and use minecraft classes, will not work on other loaders.

Solution

  1. Set productionNamespace as NAMED in Avoid-Mod-Template
  2. Remap Avoid addons' code on Fabric <=1.21.11

Remapping: before-mods

  1. Get the version name with SharedConstants.getVersion().name()

  2. Fetch, cache and parse https://raw.githubusercontent.com/FabricMC/intermediary/refs/heads/master/mappings/{$versionName}.tiny


    1. If mojang version mappings cached:
      • parse it
    2. If fresh:
      • fetch & parse the Mojang versions manifest
      • resolve, then fetch & parse the current version manifest
      • resolve, then fetch, cache and parse the current version mojmaps

Remapping: mod-class-loader

  1. convert into OBFUSCATED (<- intermediary)
  2. convert into MOJMAP

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions