类 NotHolderSet<T>
java.lang.Object
net.minecraftforge.registries.holdersets.NotHolderSet<T>
- 所有已实现的接口:
Iterable<Holder<T>>
,HolderSet<T>
,IForgeHolderSet<T>
,ICustomHolderSet<T>
Holderset that represents all elements of a registry not present in another holderset. forge:exclusion is preferable when the number of allowed elements is small relative to the size of the registry. Json format:
{ "type": "forge:not", "value": "not_this_holderset" // string, list, or object }
-
嵌套类概要
从接口继承的嵌套类/接口 net.minecraft.core.HolderSet
HolderSet.Direct<T>, HolderSet.ListBacked<T>, HolderSet.Named<T>
从接口继承的嵌套类/接口 net.minecraftforge.common.extensions.IForgeHolderSet
IForgeHolderSet.SerializationType
-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
addInvalidationListener
(Runnable runnable) Adds a callback to run when this holderset's contents invalidate (i.e. because tags were rebound).boolean
canSerializeIn
(HolderOwner<T> holderOwner) static <T> com.mojang.serialization.MapCodec
<? extends ICustomHolderSet<T>> codec
(ResourceKey<? extends Registry<T>> registryKey, com.mojang.serialization.Codec<Holder<T>> holderCodec, boolean forceList) boolean
get
(int i) getList()
getRandomElement
(RandomSource random) private void
boolean
isBound()
iterator()
int
size()
stream()
toString()
type()
返回 HolderSetType registered to引用无效
ForgeRegistries.HOLDER_SET_TYPES
unwrap()
value()
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从接口继承的方法 net.minecraftforge.registries.holdersets.ICustomHolderSet
serializationType
从接口继承的方法 java.lang.Iterable
forEach, spliterator
-
字段详细资料
-
owners
-
registryLookup
-
value
-
list
-
-
构造器详细资料
-
NotHolderSet
-
-
方法详细资料
-
codec
public static <T> com.mojang.serialization.MapCodec<? extends ICustomHolderSet<T>> codec(ResourceKey<? extends Registry<T>> registryKey, com.mojang.serialization.Codec<Holder<T>> holderCodec, boolean forceList) -
registryLookup
-
value
-
type
从接口复制的说明:ICustomHolderSet
返回 HolderSetType registered to引用无效
ForgeRegistries.HOLDER_SET_TYPES
- 指定者:
type
在接口中ICustomHolderSet<T>
- 返回:
- HolderSetType registered to
引用无效
ForgeRegistries.HOLDER_SET_TYPES
-
addInvalidationListener
从接口复制的说明:IForgeHolderSet
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.
- 指定者:
addInvalidationListener
在接口中IForgeHolderSet<T>
- 参数:
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.
-
iterator
-
stream
-
size
public int size() -
unwrap
-
getRandomElement
- 指定者:
getRandomElement
在接口中HolderSet<T>
-
get
-
contains
-
canSerializeIn
- 指定者:
canSerializeIn
在接口中HolderSet<T>
-
unwrapKey
-
toString
-
getList
-
invalidate
private void invalidate() -
isBound
public boolean isBound()
-