Package net.minecraft
Record Class WorldVersion.Simple
java.lang.Object
java.lang.Record
net.minecraft.WorldVersion.Simple
- All Implemented Interfaces:
WorldVersion
- Enclosing interface:
WorldVersion
public static record WorldVersion.Simple(String id, String name, DataVersion dataVersion, int protocolVersion, PackFormat resourcePackVersion, PackFormat datapackVersion, Date buildTime, boolean stable)
extends Record
implements WorldVersion
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.WorldVersion
WorldVersion.Simple -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DateThe field for thebuildTimerecord component.private final PackFormatThe field for thedatapackVersionrecord component.private final DataVersionThe field for thedataVersionrecord component.private final StringThe field for theidrecord component.private final StringThe field for thenamerecord component.private final intThe field for theprotocolVersionrecord component.private final PackFormatThe field for theresourcePackVersionrecord component.private final booleanThe field for thestablerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSimple(String id, String name, DataVersion dataVersion, int protocolVersion, PackFormat resourcePackVersion, PackFormat datapackVersion, Date buildTime, boolean stable) Creates an instance of aSimplerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebuildTimerecord component.Returns the value of thedatapackVersionrecord component.Returns the value of thedataVersionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.name()Returns the value of thenamerecord component.packVersion(PackType p_415556_) intReturns the value of theprotocolVersionrecord component.Returns the value of theresourcePackVersionrecord component.booleanstable()Returns the value of thestablerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
id
The field for theidrecord component. -
name
The field for thenamerecord component. -
dataVersion
The field for thedataVersionrecord component. -
protocolVersion
private final int protocolVersionThe field for theprotocolVersionrecord component. -
resourcePackVersion
The field for theresourcePackVersionrecord component. -
datapackVersion
The field for thedatapackVersionrecord component. -
buildTime
The field for thebuildTimerecord component. -
stable
private final boolean stableThe field for thestablerecord component.
-
-
Constructor Details
-
Simple
public Simple(String id, String name, DataVersion dataVersion, int protocolVersion, PackFormat resourcePackVersion, PackFormat datapackVersion, Date buildTime, boolean stable) Creates an instance of aSimplerecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentdataVersion- the value for thedataVersionrecord componentprotocolVersion- the value for theprotocolVersionrecord componentresourcePackVersion- the value for theresourcePackVersionrecord componentdatapackVersion- the value for thedatapackVersionrecord componentbuildTime- the value for thebuildTimerecord componentstable- the value for thestablerecord component
-
-
Method Details
-
packVersion
- Specified by:
packVersionin interfaceWorldVersion
-
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 '=='. -
id
Returns the value of theidrecord component.- Specified by:
idin interfaceWorldVersion- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Specified by:
namein interfaceWorldVersion- Returns:
- the value of the
namerecord component
-
dataVersion
Returns the value of thedataVersionrecord component.- Specified by:
dataVersionin interfaceWorldVersion- Returns:
- the value of the
dataVersionrecord component
-
protocolVersion
public int protocolVersion()Returns the value of theprotocolVersionrecord component.- Specified by:
protocolVersionin interfaceWorldVersion- Returns:
- the value of the
protocolVersionrecord component
-
resourcePackVersion
Returns the value of theresourcePackVersionrecord component.- Returns:
- the value of the
resourcePackVersionrecord component
-
datapackVersion
Returns the value of thedatapackVersionrecord component.- Returns:
- the value of the
datapackVersionrecord component
-
buildTime
Returns the value of thebuildTimerecord component.- Specified by:
buildTimein interfaceWorldVersion- Returns:
- the value of the
buildTimerecord component
-
stable
public boolean stable()Returns the value of thestablerecord component.- Specified by:
stablein interfaceWorldVersion- Returns:
- the value of the
stablerecord component
-