类 HolderSet.Named<T>
java.lang.Object
net.minecraft.core.HolderSet.ListBacked<T>
net.minecraft.core.HolderSet.Named<T>
- 所有已实现的接口:
Iterable<Holder<T>>
,HolderSet<T>
,IHolderSetExtension<T>
-
嵌套类概要
从接口继承的嵌套类/接口 net.minecraft.core.HolderSet
HolderSet.Direct<T>, HolderSet.ListBacked<T>, HolderSet.Named<T>
从接口继承的嵌套类/接口 net.neoforged.neoforge.common.extensions.IHolderSetExtension
IHolderSetExtension.SerializationType
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
addInvalidationListener
(Runnable runnable) Adds a callback to run when this holderset's contents invalidate (i.e. because tags were rebound).(专用程序包) void
boolean
canSerializeIn
(HolderOwner<T> p_256542_) boolean
contents()
boolean
isBound()
key()
toString()
unwrap()
从类继承的方法 net.minecraft.core.HolderSet.ListBacked
get, getRandomElement, iterator, size, spliterator, stream
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从接口继承的方法 net.neoforged.neoforge.common.extensions.IHolderSetExtension
serializationType
-
字段详细资料
-
owner
-
key
-
contents
-
invalidationCallbacks
-
-
构造器详细资料
-
Named
Named(HolderOwner<T> p_256118_, TagKey<T> p_256597_)
-
-
方法详细资料
-
bind
-
key
-
contents
- 指定者:
contents
在类中HolderSet.ListBacked<T>
-
isBound
public boolean isBound() -
unwrap
-
unwrapKey
-
contains
-
toString
-
canSerializeIn
- 指定者:
canSerializeIn
在接口中HolderSet<T>
- 覆盖:
canSerializeIn
在类中HolderSet.ListBacked<T>
-
addInvalidationListener
从接口复制的说明:IHolderSetExtension
Adds a callback to run when this holderset's contents invalidate (i.e. because tags were rebound).
The intended usage and use case is with composite holdersets that need to cache sets/list based on other holdersets, which may be mutable (because they are tag-based or themselves composite holdersets). Composite holdersets should use this to add callbacks to each of their component holdersets when constructed.
- 参数:
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.
-