Class AFLFeature
java.lang.Object
de.florianmichael.asmfabricloader.loader.AFLFeature
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyForMods(Collection<net.fabricmc.loader.api.ModContainer> modContainers, String name, BiConsumer<net.fabricmc.loader.api.ModContainer, net.fabricmc.loader.api.metadata.CustomValue> impl) Applies the given function to all mods that have the given featurestatic net.fabricmc.loader.api.metadata.CustomValuegetAflFeature(net.fabricmc.loader.api.ModContainer modContainer, String name) Checks if the mod has the afl: namespace or the afl:environment: namespace (e.g. afl:client: or afl:server:) and returns the feature if it exists or null if it doesn't exist or the environment doesn't match
-
Constructor Details
-
AFLFeature
public AFLFeature()
-
-
Method Details
-
applyForMods
public static void applyForMods(Collection<net.fabricmc.loader.api.ModContainer> modContainers, String name, BiConsumer<net.fabricmc.loader.api.ModContainer, net.fabricmc.loader.api.metadata.CustomValue> impl) Applies the given function to all mods that have the given feature- Parameters:
modContainers- The modsname- The name of the featureimpl- The function to apply
-
getAflFeature
public static net.fabricmc.loader.api.metadata.CustomValue getAflFeature(net.fabricmc.loader.api.ModContainer modContainer, String name) Checks if the mod has the afl: namespace or the afl:environment: namespace (e.g. afl:client: or afl:server:) and returns the feature if it exists or null if it doesn't exist or the environment doesn't match- Parameters:
modContainer- The mod containername- The name of the feature- Returns:
- True if the mod has the feature
-