Class DataMapProvider.Builder<T,R>
java.lang.Object
net.neoforged.neoforge.common.data.DataMapProvider.Builder<T,R>
- Direct Known Subclasses:
DataMapProvider.AdvancedBuilder
- Enclosing class:
DataMapProvider
-
Field Summary
Modifier and TypeFieldDescriptionprivate final List<ICondition>
protected final ResourceKey<Registry<R>>
protected final List<DataMapEntry.Removal<T,
R>> private boolean
private final DataMapType<R,
T> private final Map<com.mojang.datafixers.util.Either<TagKey<R>,
ResourceKey<R>>, Optional<WithConditions<DataMapEntry<T>>>> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(Holder<R> object, T value, boolean replace, ICondition... conditions) add
(ResourceKey<R> key, T value, boolean replace, ICondition... conditions) add
(ResourceLocation id, T value, boolean replace, ICondition... conditions) add
(TagKey<R> tag, T value, boolean replace, ICondition... conditions) build()
conditions
(ICondition... conditions) replace
(boolean replace)
-
Field Details
-
values
private final Map<com.mojang.datafixers.util.Either<TagKey<R>,ResourceKey<R>>, valuesOptional<WithConditions<DataMapEntry<T>>>> -
removals
-
registryKey
-
type
-
conditions
-
replace
private boolean replace
-
-
Constructor Details
-
Builder
-
-
Method Details
-
add
public DataMapProvider.Builder<T,R> add(ResourceKey<R> key, T value, boolean replace, ICondition... conditions) -
add
public DataMapProvider.Builder<T,R> add(ResourceLocation id, T value, boolean replace, ICondition... conditions) -
add
public DataMapProvider.Builder<T,R> add(Holder<R> object, T value, boolean replace, ICondition... conditions) -
add
public DataMapProvider.Builder<T,R> add(TagKey<R> tag, T value, boolean replace, ICondition... conditions) -
remove
-
remove
-
remove
-
replace
-
conditions
-
build
-