Package net.fabricmc.loader.api.metadata
Interface ModDependency
public interface ModDependency
Represents a dependency.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetKind()
Get the kind of dependency.getModId()
Returns the ID of the mod to check.Returns the version intervals covered by the dependency's version requirements.Returns a representation of the dependency's version requirements.boolean
Returns if the version fulfills this dependency's version requirement.
-
Method Details
-
getKind
ModDependency.Kind getKind()Get the kind of dependency. -
getModId
String getModId()Returns the ID of the mod to check. -
matches
Returns if the version fulfills this dependency's version requirement.- Parameters:
version
- the version to check
-
getVersionRequirements
Collection<VersionPredicate> getVersionRequirements()Returns a representation of the dependency's version requirements.- Returns:
- representation of the dependency's version requirements
-
getVersionIntervals
List<VersionInterval> getVersionIntervals()Returns the version intervals covered by the dependency's version requirements.There may be multiple because the allowed range may not be consecutive.
-