Package org.spongepowered.api.tag
Interface Tag<T>
-
- All Superinterfaces:
DefaultedRegistryValue,Keyed,ResourceKeyed
public interface Tag<T> extends DefaultedRegistryValue, ResourceKeyed
Aresource keyedcollection ofTaggablevalues (of typeT).While any number of tags may exist and the values each tag contains is arbitrary, vanilla Minecraft generally uses pre-defined tags for one of the following reasons:
- To define a common material that
blocksare made of, for example,BlockTypeTags.ACACIA_LOGS - To define a common behavior that the
engineshould apply to a block, such as specifying a block as a log that can burn viaBlockTypeTags.LOGS_THAT_BURN
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontains(T value)Gets whether this tag contains the supplied value.Collection<T>values()Gets all values that are associated with this tag.-
Methods inherited from interface org.spongepowered.api.registry.DefaultedRegistryValue
asDefaultedReference, findKey, key
-
Methods inherited from interface org.spongepowered.api.ResourceKeyed
key
-
-
-
-
Method Detail
-
values
Collection<T> values()
Gets all values that are associated with this tag.- Returns:
- All tag values
-
contains
boolean contains(T value)
Gets whether this tag contains the supplied value.- Parameters:
value- Value to check- Returns:
- Whether the value is contained in this tag.
-
-