Record Class UserdevConfig

java.lang.Object
java.lang.Record
com.cleanroommc.gradle.api.schema.UserdevConfig
Record Components:
spec - format version of this file, SPEC
minecraftVersion - the Minecraft version the artifact targets
cleanroomVersion - version of the loader the artifact was cut from
forgeVersion - the Forge version the loader reports at runtime
mcpConfig - 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 names
binpatches - path of the binpatch archive inside the artifact
clientBinpatches - prefix of the client patch entries inside binpatches
serverBinpatches - prefix of the server patch entries inside binpatches
srg2mcp - path of the SRG to MCP mapping inside the artifact
mcp2srg - path of the MCP to SRG mapping inside the artifact
accessTransformers - paths of the loader's access transformers inside the artifact
libraries - dependency notations the loader needs on a runtime classpath
group - the loader's maven group, reported to the runtime as FORGE_GROUP
runs - 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.
  • Field Details

  • 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 a UserdevConfig record class.
      Parameters:
      spec - the value for the spec record component
      minecraftVersion - the value for the minecraftVersion record component
      cleanroomVersion - the value for the cleanroomVersion record component
      forgeVersion - the value for the forgeVersion record component
      mcpConfig - the value for the mcpConfig record component
      binpatches - the value for the binpatches record component
      clientBinpatches - the value for the clientBinpatches record component
      serverBinpatches - the value for the serverBinpatches record component
      srg2mcp - the value for the srg2mcp record component
      mcp2srg - the value for the mcp2srg record component
      accessTransformers - the value for the accessTransformers record component
      libraries - the value for the libraries record component
      group - the value for the group record component
      runs - the value for the runs record component
  • Method Details

    • read

      public static UserdevConfig read(File file)
      Reads the config out of an extracted userdev directory.
    • readFromJar

      public static UserdevConfig readFromJar(File jar)
      Reads the config straight out of a userdev jar.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • spec

      public int spec()
      Returns the value of the spec record component.
      Returns:
      the value of the spec record component
    • minecraftVersion

      public String minecraftVersion()
      Returns the value of the minecraftVersion record component.
      Returns:
      the value of the minecraftVersion record component
    • cleanroomVersion

      public String cleanroomVersion()
      Returns the value of the cleanroomVersion record component.
      Returns:
      the value of the cleanroomVersion record component
    • forgeVersion

      public String forgeVersion()
      Returns the value of the forgeVersion record component.
      Returns:
      the value of the forgeVersion record component
    • mcpConfig

      public String mcpConfig()
      Returns the value of the mcpConfig record component.
      Returns:
      the value of the mcpConfig record component
    • binpatches

      public String binpatches()
      Returns the value of the binpatches record component.
      Returns:
      the value of the binpatches record component
    • clientBinpatches

      public String clientBinpatches()
      Returns the value of the clientBinpatches record component.
      Returns:
      the value of the clientBinpatches record component
    • serverBinpatches

      public String serverBinpatches()
      Returns the value of the serverBinpatches record component.
      Returns:
      the value of the serverBinpatches record component
    • srg2mcp

      public String srg2mcp()
      Returns the value of the srg2mcp record component.
      Returns:
      the value of the srg2mcp record component
    • mcp2srg

      public String mcp2srg()
      Returns the value of the mcp2srg record component.
      Returns:
      the value of the mcp2srg record component
    • accessTransformers

      public List<String> accessTransformers()
      Returns the value of the accessTransformers record component.
      Returns:
      the value of the accessTransformers record component
    • libraries

      public List<String> libraries()
      Returns the value of the libraries record component.
      Returns:
      the value of the libraries record component
    • group

      public String group()
      Returns the value of the group record component.
      Returns:
      the value of the group record component
    • runs

      public UserdevConfig.Runs runs()
      Returns the value of the runs record component.
      Returns:
      the value of the runs record component