Class AFLFeature

java.lang.Object
de.florianmichael.asmfabricloader.loader.AFLFeature

public class AFLFeature extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 mods
      name - The name of the feature
      impl - 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 container
      name - The name of the feature
      Returns:
      True if the mod has the feature