Interface MCTag
- All Superinterfaces:
CommandStringDisplayable,Comparable<MCTag>
- All Known Implementing Classes:
KnownTag,UnknownTag
@ZenRegister(loaders={"crafttweaker","tags"})
public interface MCTag
extends CommandStringDisplayable, Comparable<MCTag>
- DocParam:
- this <tag:items:minecraft:wool>
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault voidAdds the given tags to this tag.default voidaddId(net.minecraft.resources.ResourceLocation... elements) Adds the elements that correspond to the givenResourceLocationto this tag.default voidclear()Removes all elements in this tag.default intdefault booleancontains(net.minecraft.resources.ResourceLocation id) Checks if this tag contains an element with the given iddefault booleanChecks if this tag equals the other tag.default booleanexists()Checks if this tag exists.default StringReturns the BEP to get this thingydefault <T extends Collection<net.minecraft.core.Holder<?>>>
TGets the internalCollectionof this tag.default <T extends net.minecraft.tags.TagKey<?>>
TGets theTagKeyof this tag.net.minecraft.resources.ResourceLocationid()Gets the id of this tag.default List<net.minecraft.resources.ResourceLocation>Gets the id's of the elements in this tag.ITagManager<?>manager()Gets theITagManagerfor this tag.default voidRemoves the given tags from this tag.default voidremoveId(net.minecraft.resources.ResourceLocation... elements) Removes the elements that correspond to the givenResourceLocationfrom this tag.
-
Field Details
-
COMPARATOR
-
-
Method Details
-
exists
default boolean exists()Checks if this tag exists.- Returns:
- true if this tag exists, false otherwise.
-
id
net.minecraft.resources.ResourceLocation id()Gets the id of this tag.- Returns:
- The id of this tag.
-
addId
default void addId(net.minecraft.resources.ResourceLocation... elements) Adds the elements that correspond to the givenResourceLocationto this tag.- Parameters:
elements- The registry key of the elements to add.- DocParam:
- elements <resource:minecraft:diamond>
-
add
Adds the given tags to this tag.- Parameters:
tags- The tags to add.- DocParam:
- tags <tag:items:minecraft:wool>
-
removeId
default void removeId(net.minecraft.resources.ResourceLocation... elements) Removes the elements that correspond to the givenResourceLocationfrom this tag.- Parameters:
elements- The registry key of the elements to remove.- DocParam:
- elements <resource:minecraft:diamond>
-
remove
Removes the given tags from this tag.- Parameters:
tags- The tags to remove.- DocParam:
- tags <tag:items:minecraft:wool>
-
clear
default void clear()Removes all elements in this tag. -
contains
default boolean contains(net.minecraft.resources.ResourceLocation id) Checks if this tag contains an element with the given id- Parameters:
id- The ID of the element to check.- Returns:
- true if it contains the element, false otherwise.
- DocParam:
- id <resource:minecraft:white_wool>
-
idElements
Gets the id's of the elements in this tag.- Returns:
- The id's elements in this tag.
-
manager
ITagManager<?> manager()Gets theITagManagerfor this tag.- Returns:
- The
ITagManagerfor this tag.
-
equals
Checks if this tag equals the other tag.- Parameters:
other- The tag to check against.- Returns:
- true if the tags are equal, false otherwise.
- DocParam:
- other <tag:items:minecraft:wool>
-
getInternal
Gets the internalCollectionof this tag.This should only be used if the values of the tag is needed, other usecases should use
getTagKey()instead.- Returns:
- The internal
Collectionof this tag.
-
getTagKey
default <T extends net.minecraft.tags.TagKey<?>> T getTagKey()Gets theTagKeyof this tag.- Returns:
- The
TagKeyof this tag.
-
compareTo
- Specified by:
compareToin interfaceComparable<MCTag>
-
getCommandString
Description copied from interface:CommandStringDisplayableReturns the BEP to get this thingy- Specified by:
getCommandStringin interfaceCommandStringDisplayable
-