Package net.minecraft
Record Class SaveVersion
java.lang.Object
java.lang.Record
net.minecraft.SaveVersion
- Record Components:
id
-series
-
The version components of Minecraft that is used for identification in
save games.
- Mappings:
Namespace Name named net/minecraft/SaveVersion
intermediary net/minecraft/class_6595
official fck
named id
intermediary comp_4038
official b
named series
intermediary comp_4039
official c
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSaveVersion
(int id, String series) Creates an instance of aSaveVersion
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.int
id()
Returns the integer data version of this save version.boolean
isAvailableTo
(SaveVersion other) Returns whether this save version can be loaded by theother
version.boolean
series()
Returns the series of this version.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
id
private final int idThe field for theid
record component. -
series
The field for theseries
record component. -
MAIN_SERIES
The default series of a version,main
, if a series is not specified.- See Also:
- Mappings:
Namespace Name Mixin selector named MAIN_SERIES
Lnet/minecraft/SaveVersion;MAIN_SERIES:Ljava/lang/String;
intermediary field_34768
Lnet/minecraft/class_6595;field_34768:Ljava/lang/String;
official a
Lfck;a:Ljava/lang/String;
-
-
Constructor Details
-
Method Details
-
isNotMainSeries
public boolean isNotMainSeries()- Mappings:
Namespace Name Mixin selector named isNotMainSeries
Lnet/minecraft/SaveVersion;isNotMainSeries()Z
intermediary method_38490
Lnet/minecraft/class_6595;method_38490()Z
official a
Lfck;a()Z
-
isAvailableTo
Returns whether this save version can be loaded by theother
version.- Returns:
- whether this save version can be loaded by the
other
version - Mappings:
Namespace Name Mixin selector named isAvailableTo
Lnet/minecraft/SaveVersion;isAvailableTo(Lnet/minecraft/SaveVersion;)Z
intermediary method_38493
Lnet/minecraft/class_6595;method_38493(Lnet/minecraft/class_6595;)Z
official a
Lfck;a(Lfck;)Z
-
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
public int id()Returns the integer data version of this save version.- Returns:
- the integer data version of this save version
- Mappings:
Namespace Name Mixin selector named id
Lnet/minecraft/SaveVersion;id()I
intermediary comp_4038
Lnet/minecraft/class_6595;comp_4038()I
official b
Lfck;b()I
-
series
Returns the series of this version.This is stored in the
Series
field withinlevel.dat
.Known values include:
main
for versions that are not experimental snapshotsccpreview
for the 1.18 Caves and Cliffs experimental snapshotsdeep_dark_preview
for 1.19 Deep Dark experimental snapshots
- Returns:
- the series of this version
- Mappings:
Namespace Name Mixin selector named series
Lnet/minecraft/SaveVersion;series()Ljava/lang/String;
intermediary comp_4039
Lnet/minecraft/class_6595;comp_4039()Ljava/lang/String;
official c
Lfck;c()Ljava/lang/String;
-