Interface FabricRenderState


@NonExtendable public interface FabricRenderState
Fabric-provided extensions for render states, allowing for the addition of extra render data.

Note: This interface is automatically implemented on the following classes via Mixin and interface injection:

  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Clears all extra render data on the render state.
    default <T> T
    Get extra render data from the render state.
    default <T> void
    setData(RenderStateDataKey<T> key, T value)
    Set extra render data to the render state.
  • Method Details

    • getData

      @Nullable default <T> T getData(RenderStateDataKey<T> key)
      Get extra render data from the render state.
      Type Parameters:
      T - the type of the data
      Parameters:
      key - the key of the data
      Returns:
      the data, or null if it cannot be found.
    • setData

      default <T> void setData(RenderStateDataKey<T> key, @Nullable T value)
      Set extra render data to the render state.
      Type Parameters:
      T - the type of the data
      Parameters:
      key - the key of the data
      value - the data
    • clearExtraData

      default void clearExtraData()
      Clears all extra render data on the render state.