MinecraftVersion class
Class representing a Minecraft version with support for different mod loaders.
Constructors
- MinecraftVersion({required String baseVersion, String? modLoader})
- Constructor for creating a version from separate parts
- MinecraftVersion.parse(String versionString)
-
Constructor for parsing a version string (e.g., "forge:1.21.2")
factory
Properties
- baseVersion → String
-
The base Minecraft version (e.g., "1.21.2")
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isFabric → bool
-
Returns true if this is a Fabric version
no setter
- isForge → bool
-
Returns true if this is a Forge version
no setter
- isNeoForge → bool
-
Returns true if this is a NeoForge version
no setter
- isQuilt → bool
-
Returns true if this is a Quilt version
no setter
- isVanilla → bool
-
Returns true if this is a vanilla version (no mod loader)
no setter
- modLoader → String?
-
The mod loader type (e.g., "forge", "fabric", "neoforge", or null for vanilla)
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns the formatted version string
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited