public class MinecraftVersion
extends java.lang.Object
implements com.mojang.bridge.game.GameVersion
修飾子 | コンストラクタと説明 |
---|---|
|
MinecraftVersion() |
protected |
MinecraftVersion(com.google.gson.JsonObject p_i51407_1_) |
修飾子とタイプ | メソッドと説明 |
---|---|
java.util.Date |
getBuildTime()
The date & time that this version was built.
|
java.lang.String |
getId()
A unique identified for this version.
|
java.lang.String |
getName()
A human readable name of this version.
|
int |
getPackVersion()
The format of the resource/data packs used by this version.
|
int |
getProtocolVersion()
The format of the network protocol that is used by this version.
|
java.lang.String |
getReleaseTarget()
A human readable release target for this version.
|
int |
getWorldVersion()
The format of world data that is used by this version.
|
boolean |
isStable()
Whether or not this version is considered stable.
|
static com.mojang.bridge.game.GameVersion |
load()
Creates a new instance containing game version data from version.json (or fallback data if necessary).
|
public MinecraftVersion()
protected MinecraftVersion(com.google.gson.JsonObject p_i51407_1_)
public static com.mojang.bridge.game.GameVersion load()
SharedConstants.getVersion()
instead, as that is cached.public java.lang.String getId()
com.mojang.bridge.game.GameVersion
The only guarantees about this string are that it will be 100 characters or less, and that it will always be unique to a version. Do not make any other assumptions on the format, as it may change at any time.
getId
インタフェース内 com.mojang.bridge.game.GameVersion
public java.lang.String getName()
com.mojang.bridge.game.GameVersion
This may not be unique to two versions, do not use it for anything programmatic - only for displaying to humans in lieu of any other data represented by this class.
The format of this may change, it may be duplicated across multiple versions (such as in development, multiple builds have the same name), or sometimes it may be plain wrong (for example, the old april fools "2.0" version).
getName
インタフェース内 com.mojang.bridge.game.GameVersion
public java.lang.String getReleaseTarget()
com.mojang.bridge.game.GameVersion
A "release target" is the target version that this hopes to be. For example, multiple snapshots previewing features for "1.14" may return "1.14", as well as the actual "1.14" version itself.
This value is suitable for grouping versions based on the same release type, and helping to disambiguate snapshots. The format contained within this string is still not guaranteed, and should not be used for anything other than checking for equality with another version's release target.
getReleaseTarget
インタフェース内 com.mojang.bridge.game.GameVersion
public int getWorldVersion()
com.mojang.bridge.game.GameVersion
This number is not unique, but is guaranteed to be comparable. Two versions with the same number are compatible, a version with a lower number will be upgraded and a version with a higher number may suffer data-loss.
This number is also not contiguous, and will often skip whole ranges.
getWorldVersion
インタフェース内 com.mojang.bridge.game.GameVersion
public int getProtocolVersion()
com.mojang.bridge.game.GameVersion
This number is not unique, but is guaranteed to be comparable. Two versions with the same number are compatible, a version with a lower number will be upgraded and a version with a higher number may suffer data-loss.
This number is also not contiguous, and will often skip whole ranges.
getProtocolVersion
インタフェース内 com.mojang.bridge.game.GameVersion
public int getPackVersion()
com.mojang.bridge.game.GameVersion
This number is not unique, but is guaranteed to be comparable. Two versions with the same number are compatible, a version with a lower number will be outdated and a version with a higher number may not be understood at all.
This number is also not contiguous, and may skip whole ranges.
getPackVersion
インタフェース内 com.mojang.bridge.game.GameVersion
public java.util.Date getBuildTime()
com.mojang.bridge.game.GameVersion
This is useful for having a rough idea of when a version was released. The actual release time of a version isn't well defined, as "release" has various different stages and meanings, so the build time is close enough.
Note that you can't accurately sort versions by this field, as a patch for 1.13 may be released after 1.14 (for example), which should ideally be sorted as "1.13, 1.13.1, 1.14" but this field will sort it as "1.13", "1.14", "1.13.1".
getBuildTime
インタフェース内 com.mojang.bridge.game.GameVersion
public boolean isStable()
com.mojang.bridge.game.GameVersion
Typically, full releases will be marked stable and snapshots/pre-releases/internal previews will not.
isStable
インタフェース内 com.mojang.bridge.game.GameVersion