Package dev.architectury.loom.forge
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncache()Returns the value of thecacherecord component.final booleanIndicates whether some other object is "equal to" this one.forgeJar()Returns the value of theforgeJarrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehasMojangrecord component.booleanhasSrg()Returns the value of thehasSrgrecord component.info()Returns the value of theinforecord component.Returns the value of thepatchedIntermediateJarrecord component.Returns the value of therawMappingsrecord component.booleanReturns the value of therefreshDepsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theuserdevJarrecord component.
-
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 aInputsrecord class.- Parameters:
cache- the value for thecacherecord componentrawMappings- the value for therawMappingsrecord componentpatchedIntermediateJar- the value for thepatchedIntermediateJarrecord componentforgeJar- the value for theforgeJarrecord componentuserdevJar- the value for theuserdevJarrecord componenthasSrg- the value for thehasSrgrecord componenthasMojang- the value for thehasMojangrecord componentrefreshDeps- the value for therefreshDepsrecord componentinfo- the value for theinforecord component
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object); primitive components are compared with '=='. -
cache
Returns the value of thecacherecord component.- Returns:
- the value of the
cacherecord component
-
rawMappings
Returns the value of therawMappingsrecord component.- Returns:
- the value of the
rawMappingsrecord component
-
patchedIntermediateJar
Returns the value of thepatchedIntermediateJarrecord component.- Returns:
- the value of the
patchedIntermediateJarrecord component
-
forgeJar
Returns the value of theforgeJarrecord component.- Returns:
- the value of the
forgeJarrecord component
-
userdevJar
Returns the value of theuserdevJarrecord component.- Returns:
- the value of the
userdevJarrecord component
-
hasSrg
public boolean hasSrg()Returns the value of thehasSrgrecord component.- Returns:
- the value of the
hasSrgrecord component
-
hasMojang
public boolean hasMojang()Returns the value of thehasMojangrecord component.- Returns:
- the value of the
hasMojangrecord component
-
refreshDeps
public boolean refreshDeps()Returns the value of therefreshDepsrecord component.- Returns:
- the value of the
refreshDepsrecord component
-
info
Returns the value of theinforecord component.- Returns:
- the value of the
inforecord component
-