Class TinyRemapperHelper

java.lang.Object
net.fabricmc.loom.util.TinyRemapperHelper

public final class TinyRemapperHelper extends Object
Contains shortcuts to create tiny remappers using the mappings accessibly to the project.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Map<String,String>
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.fabricmc.tinyremapper.IMappingProvider
    create(Path mappings, String from, String to, boolean remapLocalVariables)
     
    static net.fabricmc.tinyremapper.IMappingProvider
    create(net.fabricmc.mappingio.tree.MappingTree mappings, String from, String to, boolean remapLocalVariables, boolean validateTargetNamespace)
     
    static net.fabricmc.tinyremapper.TinyRemapper
    getTinyRemapper(net.fabricmc.mappingio.tree.MemoryMappingTree mappingTree, String fromM, String toM, boolean fixRecords, boolean validateTargetNamespace, Consumer<net.fabricmc.tinyremapper.TinyRemapper.Builder> builderConsumer, Set<String> fromClassNames, boolean isForgeLike, Set<String> knownIndyBsms)
    构建重映射器,全部输入由调用方备妥.
    static net.fabricmc.tinyremapper.TinyRemapper
    getTinyRemapper(org.gradle.api.Project project, ServiceFactory serviceFactory, String fromM, String toM)
     
    static net.fabricmc.tinyremapper.TinyRemapper
    getTinyRemapper(org.gradle.api.Project project, ServiceFactory serviceFactory, String fromM, String toM, boolean fixRecords, boolean validateTargetNamespace, Consumer<net.fabricmc.tinyremapper.TinyRemapper.Builder> builderConsumer, Set<String> fromClassNames)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • JSR_TO_JETBRAINS

      public static final Map<String,String> JSR_TO_JETBRAINS
  • Method Details

    • getTinyRemapper

      public static net.fabricmc.tinyremapper.TinyRemapper getTinyRemapper(org.gradle.api.Project project, ServiceFactory serviceFactory, String fromM, String toM) throws IOException
      Throws:
      IOException
    • getTinyRemapper

      public static net.fabricmc.tinyremapper.TinyRemapper getTinyRemapper(net.fabricmc.mappingio.tree.MemoryMappingTree mappingTree, String fromM, String toM, boolean fixRecords, boolean validateTargetNamespace, Consumer<net.fabricmc.tinyremapper.TinyRemapper.Builder> builderConsumer, Set<String> fromClassNames, boolean isForgeLike, Set<String> knownIndyBsms) throws IOException
      构建重映射器,全部输入由调用方备妥.

      不依赖 Project,这是把重映射算法从「依赖装满运行状态的 LoomGradleExtension」改造为 「输入文件 + 显式参数 → 结果」的落点。任务化之后,重映射可以在执行阶段 用已经解析好的参数构造,而不必在配置阶段触碰项目模型。

      Parameters:
      mappingTree - 已解析好的映射树(不经过 Project 获取)
      isForgeLike - 是否 Forge/NeoForge 系(影响冲突忽略策略与内部类映射)
      knownIndyBsms - 已知的 indy BSM 集合
      Throws:
      IOException
    • getTinyRemapper

      public static net.fabricmc.tinyremapper.TinyRemapper getTinyRemapper(org.gradle.api.Project project, ServiceFactory serviceFactory, String fromM, String toM, boolean fixRecords, boolean validateTargetNamespace, Consumer<net.fabricmc.tinyremapper.TinyRemapper.Builder> builderConsumer, Set<String> fromClassNames) throws IOException
      Throws:
      IOException
    • create

      public static net.fabricmc.tinyremapper.IMappingProvider create(Path mappings, String from, String to, boolean remapLocalVariables) throws IOException
      Throws:
      IOException
    • create

      public static net.fabricmc.tinyremapper.IMappingProvider create(net.fabricmc.mappingio.tree.MappingTree mappings, String from, String to, boolean remapLocalVariables, boolean validateTargetNamespace)