Record Class MappingsMigrator.Inputs

java.lang.Object
java.lang.Record
dev.architectury.loom.forge.MappingsMigrator.Inputs
Record Components:
cache - 迁移器缓存所在目录(与 ForgeProvider.getForgeCache 同一个)
rawMappings - 迁移前、已按命名空间合并好的映射树
patchedIntermediateJar - 打补丁后的中间 Minecraft jar(缓存未命中时才读)
forgeJar - Forge 的 universal jar(继承关系来源之一)
userdevJar - Forge 的 userdev jar(同上)
hasSrg - 本配置是否生成 srg 命名空间的映射
hasMojang - 本配置是否生成 mojang 命名空间的映射
refreshDeps - 是否显式要求刷新(刷新时一律走重建分支、忽略缓存)
info - 日志出口:配置期路径传项目 logger,执行期任务传任务自己的 logger
Enclosing interface:
MappingsMigrator

public static record MappingsMigrator.Inputs(Path cache, Path rawMappings, Path patchedIntermediateJar, Path forgeJar, Path userdevJar, boolean hasSrg, boolean hasMojang, boolean refreshDeps, Consumer<String> info) extends Record
一次迁移所需的全部输入.

刻意不含 Project:同一份实现被配置期回退路径与执行期任务共用,而任务在 配置缓存开启时不允许在执行期触碰 Task.project(Gradle 会直接以 Invocation of 'Task.project' ... is unsupported with the configuration cache 拒绝执行)。 因此配置期路径负责把「项目模型里读到的值」折算成这里的纯值,执行期任务给出它自己声明的输入。

  • Constructor Details

    • Inputs

      public Inputs(Path cache, Path rawMappings, Path patchedIntermediateJar, Path forgeJar, Path userdevJar, boolean hasSrg, boolean hasMojang, boolean refreshDeps, Consumer<String> info)
      Creates an instance of a Inputs record class.
      Parameters:
      cache - the value for the cache record component
      rawMappings - the value for the rawMappings record component
      patchedIntermediateJar - the value for the patchedIntermediateJar record component
      forgeJar - the value for the forgeJar record component
      userdevJar - the value for the userdevJar record component
      hasSrg - the value for the hasSrg record component
      hasMojang - the value for the hasMojang record component
      refreshDeps - the value for the refreshDeps record component
      info - the value for the info record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • cache

      public Path cache()
      Returns the value of the cache record component.
      Returns:
      the value of the cache record component
    • rawMappings

      public Path rawMappings()
      Returns the value of the rawMappings record component.
      Returns:
      the value of the rawMappings record component
    • patchedIntermediateJar

      public Path patchedIntermediateJar()
      Returns the value of the patchedIntermediateJar record component.
      Returns:
      the value of the patchedIntermediateJar record component
    • forgeJar

      public Path forgeJar()
      Returns the value of the forgeJar record component.
      Returns:
      the value of the forgeJar record component
    • userdevJar

      public Path userdevJar()
      Returns the value of the userdevJar record component.
      Returns:
      the value of the userdevJar record component
    • hasSrg

      public boolean hasSrg()
      Returns the value of the hasSrg record component.
      Returns:
      the value of the hasSrg record component
    • hasMojang

      public boolean hasMojang()
      Returns the value of the hasMojang record component.
      Returns:
      the value of the hasMojang record component
    • refreshDeps

      public boolean refreshDeps()
      Returns the value of the refreshDeps record component.
      Returns:
      the value of the refreshDeps record component
    • info

      public Consumer<String> info()
      Returns the value of the info record component.
      Returns:
      the value of the info record component