Class KnownTag<T>
java.lang.Object
com.blamejared.crafttweaker.api.tag.type.KnownTag<T>
- Type Parameters:
T- The type of element this tag holds.
- All Implemented Interfaces:
CommandStringDisplayable,MCTag,Comparable<MCTag>,Iterable<T>
A known tag is a tag whose element is known and has been registered as Taggable.
Known tags let you use the actual element to interact with the tag instead of using the registry key of the element
-
Constructor Summary
ConstructorsConstructorDescriptionKnownTag(net.minecraft.resources.ResourceLocation id, KnownTagManager<T> manager) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidbooleanelements()booleannet.minecraft.tags.Tag<net.minecraft.core.Holder<T>>Gets the internalTagof this tag.inthashCode()net.minecraft.resources.ResourceLocationid()Gets the id of this tag.iterator()manager()Gets theITagManagerfor this tag.final voidtoString()withAmount(int amount) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
KnownTag
public KnownTag(@Nonnull net.minecraft.resources.ResourceLocation id, @Nonnull KnownTagManager<T> manager)
-
-
Method Details
-
getInternal
Description copied from interface:MCTagGets the internalTagof this tag.This should only be used if the values of the tag is needed, other usecases should use
MCTag.getTagKey()instead.- Specified by:
getInternalin interfaceMCTag- Returns:
- The internal
Tagof this tag.
-
add
-
remove
-
elements
-
contains
-
id
public net.minecraft.resources.ResourceLocation id()Description copied from interface:MCTagGets the id of this tag. -
manager
Description copied from interface:MCTagGets theITagManagerfor this tag.- Specified by:
managerin interfaceMCTag- Returns:
- The
ITagManagerfor this tag.
-
toString
-
iterator
-
equals
-
hashCode
public int hashCode() -
withAmount
-
asTagWithAmount
-