Class ModFormats
java.lang.Object
dev.puzzleshq.mod.ModFormats
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic IModContainer
getContainer
(String id) Gets theIModContainer
of a mod.static IModFormat
Gets the format of the given version.static void
Initialise the default mod formats.static void
register
(Integer spec, IModFormat format) Registers a mod format.static void
register
(Function<String, IModContainer> containerFunction) Registers a function that gets theIModContainer
of a mod ID.
-
Constructor Details
-
ModFormats
public ModFormats()
-
-
Method Details
-
initDefaultFormats
public static void initDefaultFormats()Initialise the default mod formats. -
register
Registers a function that gets theIModContainer
of a mod ID.- Parameters:
containerFunction
- the function to register.
-
register
Registers a mod format.- Parameters:
spec
- the formats version.format
- theIModFormat
format.
-
getContainer
Gets theIModContainer
of a mod.- Parameters:
id
- the id of the mod.- Returns:
IModContainer
-
getFormat
Gets the format of the given version.- Parameters:
spec
- the version of the format.
-