Package net.fabricmc.loom.pipeline
Enum Class ExecutionProcessorContext.JarConfigurationKind
java.lang.Object
java.lang.Enum<ExecutionProcessorContext.JarConfigurationKind>
net.fabricmc.loom.pipeline.ExecutionProcessorContext.JarConfigurationKind
- All Implemented Interfaces:
Serializable,Comparable<ExecutionProcessorContext.JarConfigurationKind>,Constable
- Enclosing class:
ExecutionProcessorContext
public static enum ExecutionProcessorContext.JarConfigurationKind
extends Enum<ExecutionProcessorContext.JarConfigurationKind>
MinecraftJarConfiguration 的可序列化身份.
MinecraftJarConfiguration 本身进不了任务输入:它是持有 6 个工厂方法引用的 record,
其 create*Provider 方法都要 Project/ConfigContext 才能工作,只在配置期成立。
任务只需要记住「是哪一种配置」,执行期用它回答 ProcessorContext.isSplit()。
注意 MERGED 与 LEGACY_MERGED 的 jar 布局完全相同(都是单个 merged jar),
二者只在 provider 实现上不同;SPLIT 的两个 jar 也分别与 SERVER_ONLY、
CLIENT_ONLY 的 jar 完全相同,只有配置身份能区分它们。
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionof(MinecraftJarConfiguration<?, ?, ?> configuration) 由配置期的配置常量得到可序列化身份.Returns the enum constant of this class with the specified name.values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
MERGED
-
LEGACY_MERGED
-
SERVER_ONLY
-
CLIENT_ONLY
-
SPLIT
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
of
public static ExecutionProcessorContext.JarConfigurationKind of(MinecraftJarConfiguration<?, ?, ?> configuration) 由配置期的配置常量得到可序列化身份.- Parameters:
configuration- 配置期的 jar 配置,须是MinecraftJarConfiguration的五个常量之一- Returns:
- 对应的身份
- Throws:
IllegalArgumentException- 传入的不是已知常量
-