接口 IExtensionPoint<T extends Record>

类型参数:
T - the type of the record which is held by the extension point
所有已知实现类:
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.

  • 嵌套类概要

    嵌套类
    修饰符和类型
    接口
    说明
    static final record 
    Extension point for the compatibility display test used on the server selection screen.