Record Class MinecraftPatchedProvider.ProductionOptions
java.lang.Object
java.lang.Record
dev.architectury.loom.forge.minecraft.MinecraftPatchedProvider.ProductionOptions
- Record Components:
atPatchedJar- 打过补丁并做过 access transform 的中间 Minecraft jar(重映射的输入)forgeJar- Forge 的 universal jarforgeUserdevJar- Forge 的 userdev jarclientJar- client jar;不产出 client-extra 时为nullserverJar- 服务端侧 jar(bootstrap 版本是抽取产物,否则是下载下来的 server jar); 只有 NeoForge 的 MERGED dist 清单会读它,其余情形为nullmappings- 映射树;unobfuscated Forge 下为null(那时没有映射配置)clientExtra- 本次是否产出 client-extraneoForge- 是否 NeoForge(决定是否挂 mixin 扩展、是否写 dist 清单)forge- 是否 Forge(决定 client-extra 是否写空 MANIFEST)unobfuscatedForge- 是否 unobfuscated Forge(最终 jar 走 userdev 合并分支、dist 清单用空映射树)runtimeMojang- 是否在运行时使用 mojang 映射(决定 coremod 重映射的方向)merged- 是否 MERGED 形态(决定 dist 清单是否按 client/server 分边)remapNamespace- 重映射的源命名空间(Forge 为srg、NeoForge 为mojang)coreModNamespace- coremod 重映射使用的源命名空间(生产命名空间)distAttribute- 写进 dist 清单的Minecraft-Dists取值
- Enclosing class:
MinecraftPatchedProvider
public static record MinecraftPatchedProvider.ProductionOptions(Path atPatchedJar, Path forgeJar, Path forgeUserdevJar, @Nullable Path clientJar, @Nullable Path serverJar, @Nullable net.fabricmc.mappingio.tree.MemoryMappingTree mappings, boolean clientExtra, boolean neoForge, boolean forge, boolean unobfuscatedForge, boolean runtimeMojang, boolean merged, String remapNamespace, String coreModNamespace, String distAttribute)
extends Record
一次最终产物生产所需的全部输入与平台开关.
逐项对应执行期任务声明的输入,也逐项对应配置期路径自己持有的状态:两条路径都构造这一个对象, 生产实现只认它。这样「任务声明的输入」与「生产真正读入的输入」不可能不一致——否则 up-to-date 判定就是假的(改了输入却不重建),而等价性对照也验不出「接线接错了哪个输入」。
它必须**完全不依赖 Gradle 项目模型**(只有路径、布尔与字符串):任务对象会被配置缓存序列化,
任何指向 Project/SourceSet 的引用都会让整个 Forge 工程无法使用配置缓存。
平台开关因此在这里显式取值,而不是在执行期回读 extension。
-
Constructor Summary
ConstructorsConstructorDescriptionProductionOptions(Path atPatchedJar, Path forgeJar, Path forgeUserdevJar, @Nullable Path clientJar, @Nullable Path serverJar, @Nullable net.fabricmc.mappingio.tree.MemoryMappingTree mappings, boolean clientExtra, boolean neoForge, boolean forge, boolean unobfuscatedForge, boolean runtimeMojang, boolean merged, String remapNamespace, String coreModNamespace, String distAttribute) Creates an instance of aProductionOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theatPatchedJarrecord component.booleanReturns the value of theclientExtrarecord component.@Nullable PathReturns the value of theclientJarrecord component.Returns the value of thecoreModNamespacerecord component.Returns the value of thedistAttributerecord component.final booleanIndicates whether some other object is "equal to" this one.booleanforge()Returns the value of theforgerecord component.forgeJar()Returns the value of theforgeJarrecord component.Returns the value of theforgeUserdevJarrecord component.final inthashCode()Returns a hash code value for this object.@Nullable net.fabricmc.mappingio.tree.MemoryMappingTreemappings()Returns the value of themappingsrecord component.booleanmerged()Returns the value of themergedrecord component.booleanneoForge()Returns the value of theneoForgerecord component.Returns the value of theremapNamespacerecord component.booleanReturns the value of theruntimeMojangrecord component.@Nullable PathReturns the value of theserverJarrecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of theunobfuscatedForgerecord component.
-
Constructor Details
-
ProductionOptions
public ProductionOptions(Path atPatchedJar, Path forgeJar, Path forgeUserdevJar, @Nullable Path clientJar, @Nullable Path serverJar, @Nullable net.fabricmc.mappingio.tree.MemoryMappingTree mappings, boolean clientExtra, boolean neoForge, boolean forge, boolean unobfuscatedForge, boolean runtimeMojang, boolean merged, String remapNamespace, String coreModNamespace, String distAttribute) Creates an instance of aProductionOptionsrecord class.- Parameters:
atPatchedJar- the value for theatPatchedJarrecord componentforgeJar- the value for theforgeJarrecord componentforgeUserdevJar- the value for theforgeUserdevJarrecord componentclientJar- the value for theclientJarrecord componentserverJar- the value for theserverJarrecord componentmappings- the value for themappingsrecord componentclientExtra- the value for theclientExtrarecord componentneoForge- the value for theneoForgerecord componentforge- the value for theforgerecord componentunobfuscatedForge- the value for theunobfuscatedForgerecord componentruntimeMojang- the value for theruntimeMojangrecord componentmerged- the value for themergedrecord componentremapNamespace- the value for theremapNamespacerecord componentcoreModNamespace- the value for thecoreModNamespacerecord componentdistAttribute- the value for thedistAttributerecord 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 '=='. -
atPatchedJar
Returns the value of theatPatchedJarrecord component.- Returns:
- the value of the
atPatchedJarrecord component
-
forgeJar
Returns the value of theforgeJarrecord component.- Returns:
- the value of the
forgeJarrecord component
-
forgeUserdevJar
Returns the value of theforgeUserdevJarrecord component.- Returns:
- the value of the
forgeUserdevJarrecord component
-
clientJar
Returns the value of theclientJarrecord component.- Returns:
- the value of the
clientJarrecord component
-
serverJar
Returns the value of theserverJarrecord component.- Returns:
- the value of the
serverJarrecord component
-
mappings
public @Nullable net.fabricmc.mappingio.tree.MemoryMappingTree mappings()Returns the value of themappingsrecord component.- Returns:
- the value of the
mappingsrecord component
-
clientExtra
public boolean clientExtra()Returns the value of theclientExtrarecord component.- Returns:
- the value of the
clientExtrarecord component
-
neoForge
public boolean neoForge()Returns the value of theneoForgerecord component.- Returns:
- the value of the
neoForgerecord component
-
forge
public boolean forge()Returns the value of theforgerecord component.- Returns:
- the value of the
forgerecord component
-
unobfuscatedForge
public boolean unobfuscatedForge()Returns the value of theunobfuscatedForgerecord component.- Returns:
- the value of the
unobfuscatedForgerecord component
-
runtimeMojang
public boolean runtimeMojang()Returns the value of theruntimeMojangrecord component.- Returns:
- the value of the
runtimeMojangrecord component
-
merged
public boolean merged()Returns the value of themergedrecord component.- Returns:
- the value of the
mergedrecord component
-
remapNamespace
Returns the value of theremapNamespacerecord component.- Returns:
- the value of the
remapNamespacerecord component
-
coreModNamespace
Returns the value of thecoreModNamespacerecord component.- Returns:
- the value of the
coreModNamespacerecord component
-
distAttribute
Returns the value of thedistAttributerecord component.- Returns:
- the value of the
distAttributerecord component
-