Class HolderSet.Named<T>
java.lang.Object
net.minecraft.core.HolderSet.ListBacked<T>
net.minecraft.core.HolderSet.Named<T>
- All Implemented Interfaces:
Iterable<Holder<T>>, HolderSet<T>, IHolderSetExtension<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface HolderSet
HolderSet.Direct<T>, HolderSet.ListBacked<T>, HolderSet.Named<T>Nested classes/interfaces inherited from interface IHolderSetExtension
IHolderSetExtension.SerializationType -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInvalidationListener(Runnable runnable) Neo: add an invalidation listener to be notified when the bound tag contents change(package private) voidbooleancanSerializeIn(HolderOwner<T> context) booleancontents()booleanisBound()booleanNeo: Returns whether this holderset can be immediately resolved to the contents it contains.key()toString()unwrap()Methods inherited from class HolderSet.ListBacked
get, getRandomElement, iterator, size, spliterator, streamMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface IHolderSetExtension
serializationType
-
Field Details
-
owner
-
key
-
contents
-
invalidationCallbacks
-
-
Constructor Details
-
Named
Named(HolderOwner<T> owner, TagKey<T> key)
-
-
Method Details
-
bind
-
key
-
contents
-
isBound
public boolean isBound() -
unwrap
-
unwrapKey
-
contains
-
toString
-
canSerializeIn
- Specified by:
canSerializeInin interfaceHolderSet<T>- Overrides:
canSerializeInin classHolderSet.ListBacked<T>
-
addInvalidationListener
Neo: add an invalidation listener to be notified when the bound tag contents change- Parameters:
runnable- Runnable to invoke when this component holderset's contents are no longer valid. This runnable should only clear caches and allow them to be lazily reevaluated later, as not all tag holdersets may have been rebound when this is called. This runnable should also invalidate all of the caller's listeners.
-
isImmediatelyResolvable
public boolean isImmediatelyResolvable()Neo: Returns whether this holderset can be immediately resolved to the contents it contains.- Returns:
- whether this holderset can be immediately resolved to the contents it contains
-