Package org.spongepowered.api.tag
Interface Tag<T>
-
- All Superinterfaces:
DefaultedRegistryValue
,Keyed
,ResourceKeyed
public interface Tag<T> extends DefaultedRegistryValue, ResourceKeyed
Aresource keyed
collection ofTaggable
values (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
blocks
are made of, for example,BlockTypeTags.ACACIA_LOGS
- To define a common behavior that the
engine
should 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 boolean
contains(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.
-
-