Minecraft Versions
Cubiomes.MCVersions
— ModuleMCVersions
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.
Index
API
Cubiomes.MCVersions.MCVersion
— TypeMCVersion
The parent type of every Minecraft version.
Cubiomes.MCVersions.@mcv_str
— Macro@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.
Cubiomes.MCVersions.@mcvt_str
— Macro@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 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 holderx
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