Class OrHolderSet<T>
java.lang.Object
net.minecraftforge.registries.holdersets.CompositeHolderSet<T>
net.minecraftforge.registries.holdersets.OrHolderSet<T>
- All Implemented Interfaces:
Iterable<Holder<T>>
,HolderSet<T>
,IForgeHolderSet<T>
,ICustomHolderSet<T>
Holderset that represents a union of other holdersets. Json format:
{ "type": "forge:or", "values": [ // list of sub-holdersets (strings, lists, or objects) ] }
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.core.HolderSet
HolderSet.Direct<T>, HolderSet.ListBacked<T>, HolderSet.Named<T>
Nested classes/interfaces inherited from interface net.minecraftforge.common.extensions.IForgeHolderSet
IForgeHolderSet.SerializationType
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> com.mojang.serialization.MapCodec
<? extends ICustomHolderSet<T>> codec
(ResourceKey<? extends Registry<T>> registryKey, com.mojang.serialization.Codec<Holder<T>> holderCodec, boolean forceList) Returns immutable Set of Holders given this composite holderset's component holdersets.toString()
type()
Returns HolderSetType registered toinvalid reference
ForgeRegistries.HOLDER_SET_TYPES
Methods inherited from class net.minecraftforge.registries.holdersets.CompositeHolderSet
addInvalidationListener, canSerializeIn, contains, get, getComponents, getList, getRandomElement, getSet, homogenize, isHomogenous, iterator, size, stream, unwrap, unwrapKey
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraftforge.registries.holdersets.ICustomHolderSet
serializationType
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
OrHolderSet
-
-
Method Details
-
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) -
type
Description copied from interface:ICustomHolderSet
Returns HolderSetType registered toinvalid reference
ForgeRegistries.HOLDER_SET_TYPES
- Returns:
- HolderSetType registered to
invalid reference
ForgeRegistries.HOLDER_SET_TYPES
-
createSet
Description copied from class:CompositeHolderSet
Returns immutable Set of Holders given this composite holderset's component holdersets.- Specified by:
createSet
in classCompositeHolderSet<T>
- Returns:
- immutable Set of Holders given this composite holderset's component holdersets
-
toString
-