类 AdvancedDataMapType.Builder<T,R,VR extends DataMapValueRemover<R,T>>

java.lang.Object
net.neoforged.neoforge.registries.datamaps.DataMapType.Builder<T,R>
net.neoforged.neoforge.registries.datamaps.AdvancedDataMapType.Builder<T,R,VR>
类型参数:
T - the type of the data
R - the registry the data is for
VR - the type of the remover
封闭类:
AdvancedDataMapType<R,T,VR extends DataMapValueRemover<R,T>>

public static final class AdvancedDataMapType.Builder<T,R,VR extends DataMapValueRemover<R,T>> extends DataMapType.Builder<T,R>
  • 字段详细资料

  • 构造器详细资料

  • 方法详细资料

    • remover

      public <VR1 extends DataMapValueRemover<R, T>> AdvancedDataMapType.Builder<T,R,VR1> remover(com.mojang.serialization.Codec<VR1> remover)
      Configures a remover for the data map.
      类型参数:
      VR1 - the type of the new remover
      参数:
      remover - a codec used to decode the remover
      返回:
      the builder instance
      另请参阅:
    • merger

      Configures the merger that will handle conflicting values for the same registry object.
      参数:
      merger - a merger that handles conflicting values
      返回:
      the builder instance
    • synced

      public AdvancedDataMapType.Builder<T,R,VR> synced(com.mojang.serialization.Codec<T> networkCodec, boolean mandatory)
      Marks the data map as synced.
      A synced data map will be sent to clients that support it.
      覆盖:
      synced 在类中 DataMapType.Builder<T,R>
      参数:
      networkCodec - a codec used to sync the values
      mandatory - if true, clients that do not support this data map will not be able to connect to the server
      返回:
      the builder instance
    • build

      public AdvancedDataMapType<R,T,VR> build()
      返回 a built advanced data map type。
      覆盖:
      build 在类中 DataMapType.Builder<T,R>
      返回:
      a built advanced data map type