Class FabricTagProvider.FabricTagBuilder
java.lang.Object
net.minecraft.data.tag.TagProvider.ProvidedTagBuilder<T>
net.fabricmc.fabric.api.datagen.v1.provider.FabricTagProvider.FabricTagBuilder
- Enclosing class:
FabricTagProvider<T>
An extension to
TagProvider.ProvidedTagBuilder that provides additional functionality.-
Method Summary
Modifier and TypeMethodDescriptionadd(RegistryKey<T> registryKey) Add an element to the tag.final FabricTagProvider<T>.FabricTagBuilderadd(RegistryKey<T>... registryKeys) Add multiple elements to this tag.add(Identifier id) Add a single element to the tag.add(Identifier... ids) Add multiple elements to this tag.Add an element to the tag.final FabricTagProvider<T>.FabricTagBuilderAdd multiple elements to the tag.addOptional(RegistryKey<? extends T> registryKey) Add an optionalRegistryKeyto the tag.Add an optionalIdentifierto the tag.addOptionalTag(TagKey<T> tag) Add another optional tag to this tag.Add another optional tag to this tag.Add another tag to this tag.forceAddTag(TagKey<T> tag) Add another tag to this tag, ignoring any warning.setReplace(boolean replace) Set the value of the `replace` flag in a Tag.Methods inherited from class net.minecraft.data.tag.TagProvider.ProvidedTagBuilder
add
-
Method Details
-
setReplace
Set the value of the `replace` flag in a Tag.When set to true the tag will replace any existing tag entries.
- Returns:
- the
FabricTagProvider<T>.FabricTagBuilderinstance
-
add
Add an element to the tag.- Returns:
- the
FabricTagProvider<T>.FabricTagBuilderinstance
-
add
Add multiple elements to the tag.- Returns:
- the
FabricTagProvider<T>.FabricTagBuilderinstance
-
add
Add an element to the tag.- Overrides:
addin classTagProvider.ProvidedTagBuilder<T>- Returns:
- the
FabricTagProvider<T>.FabricTagBuilderinstance - See Also:
-
add
Add a single element to the tag.- Returns:
- the
FabricTagProvider<T>.FabricTagBuilderinstance
-
addOptional
Add an optionalIdentifierto the tag.- Overrides:
addOptionalin classTagProvider.ProvidedTagBuilder<T>- Returns:
- the
FabricTagProvider<T>.FabricTagBuilderinstance
-
addOptional
Add an optionalRegistryKeyto the tag.- Returns:
- the
FabricTagProvider<T>.FabricTagBuilderinstance
-
addTag
Add another tag to this tag.Note: any vanilla tags can be added to the builder, but other tags can only be added if it has a builder registered in the same provider.
Use
forceAddTag(TagKey)to force add any tag.- Overrides:
addTagin classTagProvider.ProvidedTagBuilder<T>- Returns:
- the
FabricTagProvider<T>.FabricTagBuilderinstance - See Also:
-
addOptionalTag
Add another optional tag to this tag.- Overrides:
addOptionalTagin classTagProvider.ProvidedTagBuilder<T>- Returns:
- the
FabricTagProvider<T>.FabricTagBuilderinstance
-
addOptionalTag
Add another optional tag to this tag.- Returns:
- the
FabricTagProvider<T>.FabricTagBuilderinstance
-
forceAddTag
Add another tag to this tag, ignoring any warning.Note: only use this method if you sure that the tag will be always available at runtime. If not, use
addOptionalTag(Identifier)instead.- Returns:
- the
FabricTagProvider<T>.FabricTagBuilderinstance
-
add
Add multiple elements to this tag.- Returns:
- the
FabricTagProvider<T>.FabricTagBuilderinstance
-
add
Add multiple elements to this tag.- Overrides:
addin classTagProvider.ProvidedTagBuilder<T>- Returns:
- the
FabricTagProvider<T>.FabricTagBuilderinstance
-