Package net.minecraftforge.fml.loading
Record Class VersionInfo
java.lang.Object
java.lang.Record
net.minecraftforge.fml.loading.VersionInfo
public record VersionInfo(String forgeVersion, String mcVersion, String mcpVersion, String forgeGroup)
extends Record
TODO: [FML][Loader] Remove VersionInfo - we shouldn't need to base any decisions on forge or mc version info at the loader level. So once I get a proper replacement i'm gunna kill this.
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
The field for theforgeGroup
record component.private final String
The field for theforgeVersion
record component.private static final com.google.gson.Gson
private final String
The field for themcpVersion
record component.private final String
The field for themcVersion
record component. -
Constructor Summary
ConstructorDescriptionVersionInfo
(String forgeVersion, String mcVersion, String mcpVersion, String forgeGroup) Creates an instance of aVersionInfo
record class. -
Method Summary
Modifier and TypeMethodDescription(package private) static VersionInfo
detect()
final boolean
Indicates whether some other object is "equal to" this one.Returns the value of theforgeGroup
record component.Returns the value of theforgeVersion
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of themcpVersion
record component.Returns the value of themcVersion
record component.private static <T> T
final String
toString()
Returns a string representation of this record class.
-
Field Details
-
forgeVersion
The field for theforgeVersion
record component. -
mcVersion
The field for themcVersion
record component. -
mcpVersion
The field for themcpVersion
record component. -
forgeGroup
The field for theforgeGroup
record component. -
GSON
private static final com.google.gson.Gson GSON
-
-
Constructor Details
-
VersionInfo
Creates an instance of aVersionInfo
record class.- Parameters:
forgeVersion
- the value for theforgeVersion
record componentmcVersion
- the value for themcVersion
record componentmcpVersion
- the value for themcpVersion
record componentforgeGroup
- the value for theforgeGroup
record component
-
-
Method Details
-
mcAndForgeVersion
-
mcAndMCPVersion
-
readJson
-
detect
-
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)
. -
forgeVersion
Returns the value of theforgeVersion
record component.- Returns:
- the value of the
forgeVersion
record component
-
mcVersion
Returns the value of themcVersion
record component.- Returns:
- the value of the
mcVersion
record component
-
mcpVersion
Returns the value of themcpVersion
record component.- Returns:
- the value of the
mcpVersion
record component
-
forgeGroup
Returns the value of theforgeGroup
record component.- Returns:
- the value of the
forgeGroup
record component
-