Record Class VersionCapabilitiesInternal
java.lang.Object
java.lang.Record
net.neoforged.moddevgradle.internal.utils.VersionCapabilitiesInternal
- Record Components:
minecraftVersion- The Minecraft version.javaVersion- Which Java version Vanilla uses to compile and run.splitDataRuns- Whether Vanilla has separate main classes for generating client and server data.testFixtures- If the NeoForge version for this Minecraft version supports test fixtures.
- All Implemented Interfaces:
Serializable,VersionCapabilities
public record VersionCapabilitiesInternal(String minecraftVersion, int javaVersion, boolean splitDataRuns, boolean testFixtures, boolean modLocatorRework, boolean legacyClasspath)
extends Record
implements VersionCapabilities, Serializable
Models the changing capabilities of the modding platform and Vanilla, which we tie to the Minecraft version.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVersionCapabilitiesInternal(String minecraftVersion, int javaVersion, boolean splitDataRuns, boolean testFixtures, boolean modLocatorRework, boolean legacyClasspath) Creates an instance of aVersionCapabilitiesInternalrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of thejavaVersionrecord component.static VersionCapabilitiesInternallatest()booleanReturns the value of thelegacyClasspathrecord component.Returns the value of theminecraftVersionrecord component.booleanReturns the value of themodLocatorReworkrecord component.static VersionCapabilitiesInternalofForgeVersion(String version) static VersionCapabilitiesInternalofMinecraftVersion(String minecraftVersion) static VersionCapabilitiesInternalofNeoForgeVersion(String version) static VersionCapabilitiesInternalofNeoFormVersion(String version) static VersionCapabilitiesInternalofVersionIndex(int versionIndex) static VersionCapabilitiesInternalofVersionIndex(int versionIndex, String minecraftVersion) booleanReturns the value of thesplitDataRunsrecord component.booleanReturns the value of thetestFixturesrecord component.final StringtoString()Returns a string representation of this record class.withMinecraftVersion(String minecraftVersion)
-
Constructor Details
-
VersionCapabilitiesInternal
public VersionCapabilitiesInternal(String minecraftVersion, int javaVersion, boolean splitDataRuns, boolean testFixtures, boolean modLocatorRework, boolean legacyClasspath) Creates an instance of aVersionCapabilitiesInternalrecord class.- Parameters:
minecraftVersion- the value for theminecraftVersionrecord componentjavaVersion- the value for thejavaVersionrecord componentsplitDataRuns- the value for thesplitDataRunsrecord componenttestFixtures- the value for thetestFixturesrecord componentmodLocatorRework- the value for themodLocatorReworkrecord componentlegacyClasspath- the value for thelegacyClasspathrecord component
-
-
Method Details
-
latest
-
ofMinecraftVersion
-
ofVersionIndex
-
ofVersionIndex
-
ofNeoForgeVersion
-
ofNeoFormVersion
-
ofForgeVersion
-
withMinecraftVersion
-
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 '=='. -
minecraftVersion
Returns the value of theminecraftVersionrecord component.- Returns:
- the value of the
minecraftVersionrecord component
-
javaVersion
public int javaVersion()Returns the value of thejavaVersionrecord component.- Specified by:
javaVersionin interfaceVersionCapabilities- Returns:
- the value of the
javaVersionrecord component
-
splitDataRuns
public boolean splitDataRuns()Returns the value of thesplitDataRunsrecord component.- Specified by:
splitDataRunsin interfaceVersionCapabilities- Returns:
- the value of the
splitDataRunsrecord component
-
testFixtures
public boolean testFixtures()Returns the value of thetestFixturesrecord component.- Specified by:
testFixturesin interfaceVersionCapabilities- Returns:
- the value of the
testFixturesrecord component
-
modLocatorRework
public boolean modLocatorRework()Returns the value of themodLocatorReworkrecord component.- Returns:
- the value of the
modLocatorReworkrecord component
-
legacyClasspath
public boolean legacyClasspath()Returns the value of thelegacyClasspathrecord component.- Returns:
- the value of the
legacyClasspathrecord component
-