Interface ComponentRenderer<C>

Type Parameters:
C - the context type
All Known Implementing Classes:
AbstractComponentRenderer, TranslatableComponentRenderer

public interface ComponentRenderer<C>
A component renderer.
Since:
4.0.0
  • Method Details

    • render

      @NonNull Component render​(@NonNull Component component, @NonNull C context)
      Renders a component.
      Parameters:
      component - the component
      context - the context
      Returns:
      the rendered component
      Since:
      4.0.0
    • mapContext

      default <T> ComponentRenderer<T> mapContext​(Function<T,​C> transformer)
      Return a ComponentRenderer that takes a different context type.
      Type Parameters:
      T - transformation function
      Parameters:
      transformer - context type transformer
      Returns:
      mapping renderer
      Since:
      4.0.0