接口 IWithData<R>

类型参数:
R - the type of the object
所有已知子接口:
Holder<T>, IHolderExtension<T>
所有已知实现类:
DeferredBlock, DeferredBlockBuilder, DeferredEntityTypeBuilder, DeferredHolder, DeferredItem, DeferredItemBuilder, Holder.Direct, Holder.Reference, RegistrySetBuilder.LazyHolder

public interface IWithData<R>
Represents a registry object (usually a Holder) that has data maps.
  • 方法概要

    修饰符和类型
    方法
    说明
    default <T> T
    返回 the data of the given type that is attached to this object, or null if one isn't。
  • 方法详细资料

    • getData

      @Nullable default <T> T getData(DataMapType<R,T> type)
      返回 the data of the given type that is attached to this object, or null if one isn't。
      类型参数:
      T - the type of the data
      参数:
      type - the data type
      返回:
      the data of the given type that is attached to this object, or null if one isn't