Interface CapabilityRegistry.CapabilityConstructor<C>

Enclosing class:
CapabilityRegistry<C>
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface CapabilityRegistry.CapabilityConstructor<C>
  • Method Summary

    Modifier and Type
    Method
    Description
    create(ResourceLocation name, Class<?> typeClass, Class<?> contextClass)
    Creates a new capability with the given name, type class and context class.
  • Method Details

    • create

      C create(ResourceLocation name, Class<?> typeClass, Class<?> contextClass)
      Creates a new capability with the given name, type class and context class.

      Implementations should use a subclass of BaseCapability to easily store this metadata.