Record Class BaseGameVersion
java.lang.Object
java.lang.Record
net.raphimc.viabedrock.api.resourcepack.BaseGameVersion
- All Implemented Interfaces:
Comparable<BaseGameVersion>
public record BaseGameVersion(int major, int minor, int patch)
extends Record
implements Comparable<BaseGameVersion>
The cumulative vanilla resource cutoff advertised by a world, independent of server packs.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBaseGameVersion(int major, int minor, int patch) Creates an instance of aBaseGameVersionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(BaseGameVersion other) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanincludes(ResourcePack pack) intmajor()Returns the value of themajorrecord component.intminor()Returns the value of theminorrecord component.static BaseGameVersionintpatch()Returns the value of thepatchrecord component.toString()Returns a string representation of this record class.static BaseGameVersionvanillaLayer(String name)
-
Field Details
-
CURRENT
-
-
Constructor Details
-
BaseGameVersion
public BaseGameVersion(int major, int minor, int patch) Creates an instance of aBaseGameVersionrecord class.- Parameters:
major- the value for themajorrecord componentminor- the value for theminorrecord componentpatch- the value for thepatchrecord component
-
-
Method Details
-
parse
-
vanillaLayer
-
includes
-
compareTo
- Specified by:
compareToin interfaceComparable<BaseGameVersion>
-
toString
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
major
public int major()Returns the value of themajorrecord component.- Returns:
- the value of the
majorrecord component
-
minor
public int minor()Returns the value of theminorrecord component.- Returns:
- the value of the
minorrecord component
-
patch
public int patch()Returns the value of thepatchrecord component.- Returns:
- the value of the
patchrecord component
-