类 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 dataR
- the registry the data is forVR
- 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>
A builder for
advanced data map types
.-
字段概要
字段从类继承的字段 net.neoforged.neoforge.registries.datamaps.DataMapType.Builder
codec, id, mandatorySync, networkCodec, registryKey
-
构造器概要
构造器构造器说明Builder
(ResourceKey<Registry<R>> registryKey, ResourceLocation id, com.mojang.serialization.Codec<T> codec) -
方法概要
修饰符和类型方法说明build()
返回 a built advanced data map type。merger
(DataMapValueMerger<R, T> merger) Configures the merger that will handle conflicting values for the same registry object.<VR1 extends DataMapValueRemover<R,
T>>
AdvancedDataMapType.Builder<T, R, VR1> remover
(com.mojang.serialization.Codec<VR1> remover) Configures a remover for the data map.Marks the data map as synced.
-
字段详细资料
-
remover
-
merger
-
-
构造器详细资料
-
Builder
Builder(ResourceKey<Registry<R>> registryKey, ResourceLocation id, com.mojang.serialization.Codec<T> codec)
-
-
方法详细资料
-
remover
public <VR1 extends DataMapValueRemover<R,T>> AdvancedDataMapType.Builder<T,R, removerVR1> (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, syncedVR> (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 valuesmandatory
- iftrue
, clients that do not support this data map will not be able to connect to the server- 返回:
- the builder instance
-
build
返回 a built advanced data map type。- 覆盖:
build
在类中DataMapType.Builder<T,
R> - 返回:
- a built advanced data map type
-