Record Class VersionCapabilities
java.lang.Object
java.lang.Record
net.neoforged.moddevgradle.internal.utils.VersionCapabilities
- Record Components:
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
public record VersionCapabilities(int javaVersion, boolean splitDataRuns, boolean testFixtures)
extends Record
implements Serializable
Models the changing capabilities of the modding platform and Vanilla, which we tie to the Minecraft version.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionVersionCapabilities(int javaVersion, boolean splitDataRuns, boolean testFixtures) Creates an instance of aVersionCapabilitiesrecord 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 VersionCapabilitieslatest()static VersionCapabilitiesofForgeVersion(String version) static VersionCapabilitiesofMinecraftVersion(String minecraftVersion) static VersionCapabilitiesofNeoForgeVersion(String version) static VersionCapabilitiesofNeoFormVersion(String version) static VersionCapabilitiesofVersionIndex(int versionIndex) booleanReturns the value of thesplitDataRunsrecord component.booleanReturns the value of thetestFixturesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
VersionCapabilities
public VersionCapabilities(int javaVersion, boolean splitDataRuns, boolean testFixtures) Creates an instance of aVersionCapabilitiesrecord class.- Parameters:
javaVersion- the value for thejavaVersionrecord componentsplitDataRuns- the value for thesplitDataRunsrecord componenttestFixtures- the value for thetestFixturesrecord component
-
-
Method Details
-
latest
-
ofMinecraftVersion
-
ofVersionIndex
-
ofNeoForgeVersion
-
ofNeoFormVersion
-
ofForgeVersion
-
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 with '=='. -
javaVersion
public int javaVersion()Returns the value of thejavaVersionrecord component.- Returns:
- the value of the
javaVersionrecord component
-
splitDataRuns
public boolean splitDataRuns()Returns the value of thesplitDataRunsrecord component.- Returns:
- the value of the
splitDataRunsrecord component
-
testFixtures
public boolean testFixtures()Returns the value of thetestFixturesrecord component.- Returns:
- the value of the
testFixturesrecord component
-