Interface ITag<V>
- All Superinterfaces:
Iterable<V>
- All Known Implementing Classes:
ForgeRegistryTag
A tag is a collection of elements with an identifying
tag key
.
For Forge, these are bound on world load.
Tags will always be empty until they are bound.
A tag instance provided for a given TagKey
from a given ITagManager
will always return the same instance on future invocations.
This means that the same tag instance will be rebound across reloads assuming the same registry instance is in use.
It is safe to store instances of this class for long periods of time.-
Method Summary
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getKey
-
stream
-
isEmpty
boolean isEmpty() -
size
int size() -
contains
-
getRandomElement
-
isBound
boolean isBound()- Returns:
true
if this tag was loaded with a value (including empty), otherwise the tag is always empty and this returnsfalse
-