Class CustomTagProviders.CustomFabricTagBuilder
java.lang.Object
net.minecraft.data.tags.TagsProvider.TagAppender<T>
io.github.vampirestudios.vampirelib.api.datagen.CustomTagProviders.CustomFabricTagBuilder
- Enclosing class:
- CustomTagProviders<T>
public final class CustomTagProviders.CustomFabricTagBuilder
extends net.minecraft.data.tags.TagsProvider.TagAppender<T>
-
Field Summary
Fields inherited from class net.minecraft.data.tags.TagsProvider.TagAppender
builder -
Constructor Summary
ConstructorsConstructorDescriptionCustomFabricTagBuilder(net.minecraft.data.tags.TagsProvider.TagAppender<T> parent) -
Method Summary
Modifier and TypeMethodDescriptionAdd a single element to the tag.add(net.minecraft.resources.ResourceLocation id) Add a single element to the tag.add(net.minecraft.resources.ResourceLocation... ids) Add multiple elements to this tag.Add a single element to the tag.Add multiple elements to this tag.addOptional(@NotNull net.minecraft.resources.ResourceLocation id) Add an optionalResourceLocationto the tag.addOptionalTag(net.minecraft.resources.ResourceLocation id) Add another optional tag to this tag.Add another tag to this tag.Add another tag to this tag.forceAddTag(net.minecraft.tags.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.tags.TagsProvider.TagAppender
add
-
Constructor Details
-
CustomFabricTagBuilder
-
-
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.
- Parameters:
replace- replace- Returns:
- the
CustomTagProviders<T>.CustomFabricTagBuilderinstance
-
add
Add a single element to the tag.- Parameters:
element- element- Returns:
- the
CustomTagProviders<T>.CustomFabricTagBuilderinstance
-
add
public CustomTagProviders<T>.CustomFabricTagBuilder add(net.minecraft.resources.ResourceLocation id) Add a single element to the tag.- Parameters:
id- id- Returns:
- the
CustomTagProviders<T>.CustomFabricTagBuilderinstance
-
add
public CustomTagProviders<T>.CustomFabricTagBuilder add(net.minecraft.resources.ResourceKey<T> registryKey) Add a single element to the tag.- Overrides:
addin classnet.minecraft.data.tags.TagsProvider.TagAppender<T>- Parameters:
registryKey- registry key- Returns:
- the
CustomTagProviders<T>.CustomFabricTagBuilderinstance
-
addOptional
public CustomTagProviders<T>.CustomFabricTagBuilder addOptional(@NotNull @NotNull net.minecraft.resources.ResourceLocation id) Add an optionalResourceLocationto the tag.- Overrides:
addOptionalin classnet.minecraft.data.tags.TagsProvider.TagAppender<T>- Returns:
- the
CustomTagProviders<T>.CustomFabricTagBuilderinstance
-
addTag
public CustomTagProviders<T>.CustomFabricTagBuilder addTag(@NotNull @NotNull net.minecraft.tags.TagKey<T> tag) Add another tag to this tag.- Overrides:
addTagin classnet.minecraft.data.tags.TagsProvider.TagAppender<T>- Returns:
- the
CustomTagProviders<T>.CustomFabricTagBuilderinstance
-
addOptionalTag
public CustomTagProviders<T>.CustomFabricTagBuilder addOptionalTag(net.minecraft.resources.ResourceLocation id) Add another optional tag to this tag.- Overrides:
addOptionalTagin classnet.minecraft.data.tags.TagsProvider.TagAppender<T>- Returns:
- the
CustomTagProviders<T>.CustomFabricTagBuilderinstance
-
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(ResourceLocation)instead.- Parameters:
tag- tag- Returns:
- the
CustomTagProviders<T>.CustomFabricTagBuilderinstance
-
add
Add multiple elements to this tag.- Returns:
- the
CustomTagProviders<T>.CustomFabricTagBuilderinstance
-
add
public CustomTagProviders<T>.CustomFabricTagBuilder add(net.minecraft.resources.ResourceLocation... ids) Add multiple elements to this tag.- Parameters:
ids- idk- Returns:
- the
CustomTagProviders<T>.CustomFabricTagBuilderinstance
-
addTags
@SafeVarargs public final CustomTagProviders<T>.CustomFabricTagBuilder addTags(net.minecraft.tags.TagKey<T>... values) Add another tag to this tag.- Parameters:
values- values- Returns:
- the
FabricTagProvider.FabricTagBuilderinstance
-