Minecraft Versions
Cubiomes.MCVersions — ModuleMCVersionsRepresentation 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.
Index
API
Cubiomes.MCVersions.MCVersion — TypeMCVersionThe parent type of every Minecraft version.
Cubiomes.MCVersions.@mcv_str — Macro@mcv_strA 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.
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.
Cubiomes.MCVersions.@mcvt_str — Macro@mcvt_strA 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 toType{mcv"1.8.9"}mcvt">=1.8.9"-> expands toUnion{...}on every version >=1.8.9. The supported operations are<, <=, >, >=`.mcvt"1.0.0<=x<=1.8.9"-> expands toUnion{...}on every version such that 1.0.0<=version<=1.8.9. The place holderxcan 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