Package dev.architectury.loom.mcpconfig
Record Class McpConfigData
java.lang.Object
java.lang.Record
dev.architectury.loom.mcpconfig.McpConfigData
- Record Components:
version- the Minecraft version - the value of theversionpropertydata- the value of thedatapropertymappingsPath- the path to srg mappings inside the MCP zip, ornullif absent (spec 6+)official- the value of theofficialpropertysteps- the MCP step definitions by environment typefunctions- the MCP function definitions by name
public record McpConfigData(String version, com.google.gson.JsonObject data, @Nullable String mappingsPath, boolean official, Map<String,List<McpConfigStep>> steps, Map<String,McpConfigFunction> functions)
extends Record
Data extracted from the MCPConfig JSON file.
-
Constructor Summary
ConstructorsConstructorDescriptionMcpConfigData(String version, com.google.gson.JsonObject data, @Nullable String mappingsPath, boolean official, Map<String, List<McpConfigStep>> steps, Map<String, McpConfigFunction> functions) Creates an instance of aMcpConfigDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.google.gson.JsonObjectdata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.static McpConfigDatafromJson(com.google.gson.JsonObject json) Returns the value of thefunctionsrecord component.final inthashCode()Returns a hash code value for this object.boolean@Nullable StringReturns the value of themappingsPathrecord component.booleanofficial()Returns the value of theofficialrecord component.steps()Returns the value of thestepsrecord component.final StringtoString()Returns a string representation of this record class.version()Returns the value of theversionrecord component.
-
Constructor Details
-
McpConfigData
public McpConfigData(String version, com.google.gson.JsonObject data, @Nullable String mappingsPath, boolean official, Map<String, List<McpConfigStep>> steps, Map<String, McpConfigFunction> functions) Creates an instance of aMcpConfigDatarecord class.- Parameters:
version- the value for theversionrecord componentdata- the value for thedatarecord componentmappingsPath- the value for themappingsPathrecord componentofficial- the value for theofficialrecord componentsteps- the value for thestepsrecord componentfunctions- the value for thefunctionsrecord component
-
-
Method Details
-
hasMappings
public boolean hasMappings() -
fromJson
-
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 '=='. -
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
data
public com.google.gson.JsonObject data()Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-
mappingsPath
Returns the value of themappingsPathrecord component.- Returns:
- the value of the
mappingsPathrecord component
-
official
public boolean official()Returns the value of theofficialrecord component.- Returns:
- the value of the
officialrecord component
-
steps
Returns the value of thestepsrecord component.- Returns:
- the value of the
stepsrecord component
-
functions
Returns the value of thefunctionsrecord component.- Returns:
- the value of the
functionsrecord component
-