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/SaveVersionintermediary net/minecraft/class_6595official fhznamed idintermediary comp_4038official bnamed seriesintermediary comp_4039official c
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSaveVersion(int id, String series) Creates an instance of aSaveVersionrecord 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.intid()Returns the integer data version of this save version.booleanisAvailableTo(SaveVersion other) Returns whether this save version can be loaded by theotherversion.booleanseries()Returns the series of this version.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
id
private final int idThe field for theidrecord component. -
series
The field for theseriesrecord 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_SERIESLnet/minecraft/SaveVersion;MAIN_SERIES:Ljava/lang/String;intermediary field_34768Lnet/minecraft/class_6595;field_34768:Ljava/lang/String;official aLfhz;a:Ljava/lang/String;
-
-
Constructor Details
-
Method Details
-
isNotMainSeries
public boolean isNotMainSeries()- Mappings:
Namespace Name Mixin selector named isNotMainSeriesLnet/minecraft/SaveVersion;isNotMainSeries()Zintermediary method_38490Lnet/minecraft/class_6595;method_38490()Zofficial aLfhz;a()Z
-
isAvailableTo
Returns whether this save version can be loaded by theotherversion.- Returns:
- whether this save version can be loaded by the
otherversion - Mappings:
Namespace Name Mixin selector named isAvailableToLnet/minecraft/SaveVersion;isAvailableTo(Lnet/minecraft/SaveVersion;)Zintermediary method_38493Lnet/minecraft/class_6595;method_38493(Lnet/minecraft/class_6595;)Zofficial aLfhz;a(Lfhz;)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 idLnet/minecraft/SaveVersion;id()Iintermediary comp_4038Lnet/minecraft/class_6595;comp_4038()Iofficial bLfhz;b()I
-
series
Returns the series of this version.This is stored in the
Seriesfield withinlevel.dat.Known values include:
mainfor versions that are not experimental snapshotsccpreviewfor the 1.18 Caves and Cliffs experimental snapshotsdeep_dark_previewfor 1.19 Deep Dark experimental snapshots
- Returns:
- the series of this version
- Mappings:
Namespace Name Mixin selector named seriesLnet/minecraft/SaveVersion;series()Ljava/lang/String;intermediary comp_4039Lnet/minecraft/class_6595;comp_4039()Ljava/lang/String;official cLfhz;c()Ljava/lang/String;
-