Interface IExtensionPoint<T extends Record>

Type Parameters:
T - the type of the record which is held by the extension point
All Known Implementing Classes:
ConfigScreenHandler.ConfigScreenFactory, IExtensionPoint.DisplayTest

public interface IExtensionPoint<T extends Record>
An extension point for a mod container.

An extension point can be registered for a mod container using ModContainer.registerExtensionPoint(Class, Supplier) and retrieved (if present) using ModContainer.getCustomExtension(Class). An extension point allows a mod to supply an arbitrary value as a record class to another mod or framework through their mod container class, avoiding the use of InterModComms or other external frameworks to pass around these values.

The usual way to declare an extension point is to implement this interface on a record class, with the type parameter being a reference to the class itself. For example, record MyExtension(...) extends IExtensionPoint<MyExtension> would declare an extension point which supplies a MyExtension object. However, there is no hard requirement that an extension point's type parameter must be in reference to itself; the type parameter may reference another record class instead.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Extension point for the compatibility display test used on the server selection screen.