Minecraft Versions

Cubiomes.MCVersionsModule
MCVersions

Representation of Minecraft versions in Julia. Works like the built in VersionNumber but for Minecraft versions, with the mcv"" string macro and the MCVersion(@ref) abstract type.

source

Index

API

Cubiomes.MCVersions.@mcv_strMacro
@mcv_str

A string macro to get a Minecraft version. For example mcv"1.8.9" represents the 1.8.9 version or mcv"beta1.7" for the beta 1.7.

Warning

It does not exactly represents a Minecraft version, but more a close one, where the biome generation is the same. For example, mcv"1.8.6" is exactly equal to mcv"1.8.9 since the generation does not change between those two versions.

source
Cubiomes.MCVersions.@mcvt_strMacro
@mcvt_str

A string macro to get the type representation of one or more (with an Union{}) Minecraft versions. Useful for functions who need to dispatch over specifics versions.

The syntax is:

  • mcvt"1.8.9" -> expands to Type{mcv"1.8.9"}
  • mcvt">=1.8.9" -> expands to Union{...}on every version >=1.8.9. The supported operations are<, <=, >, >=`.
  • mcvt"1.0.0<=x<=1.8.9" -> expands to Union{...} on every version such that 1.0.0<=version<=1.8.9. The place holder x can be anything, can even be empty. The supported operations are only <, <=.

Examples

julia> end_type(::mcvt"<1.0.0") = nothing
end_type (generic function with 3 methods)

julia> end_type(::mcvt"1.0.0<=_<1.9.0") = :old
end_type (generic function with 3 methods)

julia> end_type(::mcvt">=1.9.0") = :new
end_type (generic function with 3 methods)

julia> end_type(mcv"1.13")
:new
source

Private API

Click to see