Record Class ProcessorContextImpl
java.lang.Object
java.lang.Record
net.fabricmc.loom.configuration.processors.ProcessorContextImpl
- All Implemented Interfaces:
ProcessorContext
public record ProcessorContextImpl(ConfigContext configContext, MinecraftJar minecraftJar)
extends Record
implements ProcessorContext
-
Constructor Summary
ConstructorsConstructorDescriptionProcessorContextImpl(ConfigContext configContext, MinecraftJar minecraftJar) Creates an instance of aProcessorContextImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconfigContextrecord component.LazyCloseable<net.fabricmc.tinyremapper.TinyRemapper> createRemapper(MappingsNamespace from, MappingsNamespace to) booleanfinal booleanIndicates whether some other object is "equal to" this one.本平台在工具链中自带数据文件所用的命名空间:fabric/quilt 为intermediary、 forge 为srg、neoforge 为mojang.net.fabricmc.mappingio.tree.MemoryMappingTreefinal inthashCode()Returns a hash code value for this object.booleanbooleanbooleanisMerged()booleanisSplit()本上下文服务的 jar 是否来自 split(客户端与服务端分开产出)配置.Returns the value of theminecraftJarrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ProcessorContextImpl
Creates an instance of aProcessorContextImplrecord class.- Parameters:
configContext- the value for theconfigContextrecord componentminecraftJar- the value for theminecraftJarrecord component
-
-
Method Details
-
isSplit
public boolean isSplit()Description copied from interface:ProcessorContext本上下文服务的 jar 是否来自 split(客户端与服务端分开产出)配置.split 配置会产出两个 jar,它们与 client only / server only 配置产出的 jar 在
ProcessorContext.isMerged()、ProcessorContext.includesClient()、ProcessorContext.includesServer()上完全一致: 单看一个 jar 无法区分「这是 split 的一半」还是「本来就是单边配置」。 只有本方法能给出这一信息,需要在 split 下改变行为的 processor 必须用它判断。- Specified by:
isSplitin interfaceProcessorContext- Returns:
- 本 jar 是否属于 split 配置
-
isMerged
public boolean isMerged()- Specified by:
isMergedin interfaceProcessorContext
-
includesClient
public boolean includesClient()- Specified by:
includesClientin interfaceProcessorContext
-
includesServer
public boolean includesServer()- Specified by:
includesServerin interfaceProcessorContext
-
createRemapper
public LazyCloseable<net.fabricmc.tinyremapper.TinyRemapper> createRemapper(MappingsNamespace from, MappingsNamespace to) - Specified by:
createRemapperin interfaceProcessorContext
-
getMappings
public net.fabricmc.mappingio.tree.MemoryMappingTree getMappings()- Specified by:
getMappingsin interfaceProcessorContext
-
disableObfuscation
public boolean disableObfuscation()- Specified by:
disableObfuscationin interfaceProcessorContext
-
getProductionNamespace
- Specified by:
getProductionNamespacein interfaceProcessorContext
-
getIntermediaryNamespace
Description copied from interface:ProcessorContext本平台在工具链中自带数据文件所用的命名空间:fabric/quilt 为intermediary、 forge 为srg、neoforge 为mojang.它与
ProcessorContext.getProductionNamespace()不是一回事:后者可以被用户配置成official之类的取值,而平台自带的文件(例如 Forge 的accesstransformer.cfg) 始终写在平台自己的命名空间里。- Specified by:
getIntermediaryNamespacein interfaceProcessorContext- Returns:
- 平台默认命名空间
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
configContext
Returns the value of theconfigContextrecord component.- Returns:
- the value of the
configContextrecord component
-
minecraftJar
Returns the value of theminecraftJarrecord component.- Returns:
- the value of the
minecraftJarrecord component
-