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, int resourcePackVersion, int 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 Date
The field for thebuildTime
record component.private final int
The field for thedatapackVersion
record component.private final DataVersion
The field for thedataVersion
record component.private final String
The field for theid
record component.private final String
The field for thename
record component.private final int
The field for theprotocolVersion
record component.private final int
The field for theresourcePackVersion
record component.private final boolean
The field for thestable
record component. -
Constructor Summary
ConstructorsConstructorDescriptionSimple
(String id, String name, DataVersion dataVersion, int protocolVersion, int resourcePackVersion, int datapackVersion, Date buildTime, boolean stable) Creates an instance of aSimple
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebuildTime
record component.int
Returns the value of thedatapackVersion
record component.Returns the value of thedataVersion
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.name()
Returns the value of thename
record component.int
packVersion
(PackType p_415556_) int
Returns the value of theprotocolVersion
record component.int
Returns the value of theresourcePackVersion
record component.boolean
stable()
Returns the value of thestable
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
id
The field for theid
record component. -
name
The field for thename
record component. -
dataVersion
The field for thedataVersion
record component. -
protocolVersion
private final int protocolVersionThe field for theprotocolVersion
record component. -
resourcePackVersion
private final int resourcePackVersionThe field for theresourcePackVersion
record component. -
datapackVersion
private final int datapackVersionThe field for thedatapackVersion
record component. -
buildTime
The field for thebuildTime
record component. -
stable
private final boolean stableThe field for thestable
record component.
-
-
Constructor Details
-
Simple
public Simple(String id, String name, DataVersion dataVersion, int protocolVersion, int resourcePackVersion, int datapackVersion, Date buildTime, boolean stable) Creates an instance of aSimple
record class.- Parameters:
id
- the value for theid
record componentname
- the value for thename
record componentdataVersion
- the value for thedataVersion
record componentprotocolVersion
- the value for theprotocolVersion
record componentresourcePackVersion
- the value for theresourcePackVersion
record componentdatapackVersion
- the value for thedatapackVersion
record componentbuildTime
- the value for thebuildTime
record componentstable
- the value for thestable
record component
-
-
Method Details
-
packVersion
- Specified by:
packVersion
in 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 theid
record component.- Specified by:
id
in interfaceWorldVersion
- Returns:
- the value of the
id
record component
-
name
Returns the value of thename
record component.- Specified by:
name
in interfaceWorldVersion
- Returns:
- the value of the
name
record component
-
dataVersion
Returns the value of thedataVersion
record component.- Specified by:
dataVersion
in interfaceWorldVersion
- Returns:
- the value of the
dataVersion
record component
-
protocolVersion
public int protocolVersion()Returns the value of theprotocolVersion
record component.- Specified by:
protocolVersion
in interfaceWorldVersion
- Returns:
- the value of the
protocolVersion
record component
-
resourcePackVersion
public int resourcePackVersion()Returns the value of theresourcePackVersion
record component.- Returns:
- the value of the
resourcePackVersion
record component
-
datapackVersion
public int datapackVersion()Returns the value of thedatapackVersion
record component.- Returns:
- the value of the
datapackVersion
record component
-
buildTime
Returns the value of thebuildTime
record component.- Specified by:
buildTime
in interfaceWorldVersion
- Returns:
- the value of the
buildTime
record component
-
stable
public boolean stable()Returns the value of thestable
record component.- Specified by:
stable
in interfaceWorldVersion
- Returns:
- the value of the
stable
record component
-