Record Class UserdevConfig
java.lang.Object
java.lang.Record
com.cleanroommc.gradle.api.schema.UserdevConfig
- Record Components:
spec- format version of this file,SPECminecraftVersion- the Minecraft version the artifact targets (TODO: hardcode 1.12.2)cleanroomVersion- version of the loader the artifact was cut fromforgeVersion- the Forge version the loader reports at runtimemcpConfig- dependency notation of the MCP config the SRG names come from. A consumer must use this exact one: the binpatches and the loader classes are keyed against its SRG namesbinpatches- path of the binpatch archive inside the artifactclientBinpatches- prefix of the client patch entries insidebinpatchesserverBinpatches- prefix of the server patch entries insidebinpatchessrg2mcp- path of the SRG to MCP mapping inside the artifactmcp2srg- path of the MCP to SRG mapping inside the artifactaccessTransformers- paths of the loader's access transformers inside the artifactlibraries- dependency notations the loader needs on a runtime classpathgroup- the loader's maven group, reported to the runtime asFORGE_GROUPruns- how the loader is launched on either side
public record UserdevConfig(int spec, String minecraftVersion, String cleanroomVersion, String forgeVersion, String mcpConfig, String binpatches, String clientBinpatches, String serverBinpatches, String srg2mcp, String mcp2srg, List<String> accessTransformers, List<String> libraries, String group, UserdevConfig.Runs runs)
extends Record
Metadata shipped inside the userdev artifact, describing how a mod developer's environment has to be
constructed. The loader project writes it with
writeUserdevConfig and a consuming project reads
it back to verify that its pipeline lines up with the one the artifact was built by.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionUserdevConfig(int spec, String minecraftVersion, String cleanroomVersion, String forgeVersion, String mcpConfig, String binpatches, String clientBinpatches, String serverBinpatches, String srg2mcp, String mcp2srg, List<String> accessTransformers, List<String> libraries, String group, UserdevConfig.Runs runs) Creates an instance of aUserdevConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccessTransformersrecord component.Returns the value of thebinpatchesrecord component.Returns the value of thecleanroomVersionrecord component.Returns the value of theclientBinpatchesrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theforgeVersionrecord component.group()Returns the value of thegrouprecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thelibrariesrecord component.mcp2srg()Returns the value of themcp2srgrecord component.Returns the value of themcpConfigrecord component.Returns the value of theminecraftVersionrecord component.static UserdevConfigReads the config out of an extracted userdev directory.static UserdevConfigreadFromJar(File jar) Reads the config straight out of a userdev jar.runs()Returns the value of therunsrecord component.Returns the value of theserverBinpatchesrecord component.intspec()Returns the value of thespecrecord component.srg2mcp()Returns the value of thesrg2mcprecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
SPEC
public static final int SPEC- See Also:
-
FILE_NAME
- See Also:
-
BINPATCHES
- See Also:
-
CLIENT_BINPATCHES
- See Also:
-
SERVER_BINPATCHES
- See Also:
-
SRG2MCP
- See Also:
-
MCP2SRG
- See Also:
-
ATS
- See Also:
-
-
Constructor Details
-
UserdevConfig
public UserdevConfig(int spec, String minecraftVersion, String cleanroomVersion, String forgeVersion, String mcpConfig, String binpatches, String clientBinpatches, String serverBinpatches, String srg2mcp, String mcp2srg, List<String> accessTransformers, List<String> libraries, String group, UserdevConfig.Runs runs) Creates an instance of aUserdevConfigrecord class.- Parameters:
spec- the value for thespecrecord componentminecraftVersion- the value for theminecraftVersionrecord componentcleanroomVersion- the value for thecleanroomVersionrecord componentforgeVersion- the value for theforgeVersionrecord componentmcpConfig- the value for themcpConfigrecord componentbinpatches- the value for thebinpatchesrecord componentclientBinpatches- the value for theclientBinpatchesrecord componentserverBinpatches- the value for theserverBinpatchesrecord componentsrg2mcp- the value for thesrg2mcprecord componentmcp2srg- the value for themcp2srgrecord componentaccessTransformers- the value for theaccessTransformersrecord componentlibraries- the value for thelibrariesrecord componentgroup- the value for thegrouprecord componentruns- the value for therunsrecord component
-
-
Method Details
-
read
Reads the config out of an extracted userdev directory. -
readFromJar
Reads the config straight out of a userdev jar. -
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
spec
-
minecraftVersion
Returns the value of theminecraftVersionrecord component.- Returns:
- the value of the
minecraftVersionrecord component
-
cleanroomVersion
Returns the value of thecleanroomVersionrecord component.- Returns:
- the value of the
cleanroomVersionrecord component
-
forgeVersion
Returns the value of theforgeVersionrecord component.- Returns:
- the value of the
forgeVersionrecord component
-
mcpConfig
-
binpatches
Returns the value of thebinpatchesrecord component.- Returns:
- the value of the
binpatchesrecord component
-
clientBinpatches
Returns the value of theclientBinpatchesrecord component.- Returns:
- the value of the
clientBinpatchesrecord component
-
serverBinpatches
Returns the value of theserverBinpatchesrecord component.- Returns:
- the value of the
serverBinpatchesrecord component
-
srg2mcp
-
mcp2srg
-
accessTransformers
Returns the value of theaccessTransformersrecord component.- Returns:
- the value of the
accessTransformersrecord component
-
libraries
-
group
-
runs
-