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>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> com.mojang.serialization.Codec<? 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 toForgeRegistries.HOLDER_SET_TYPES
.Methods inherited from class net.minecraftforge.registries.holdersets.CompositeHolderSet
addInvalidationListener, contains, get, getComponents, getList, getRandomElement, getSet, isValidInRegistry, iterator, size, stream, unwrap
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
OrHolderSet
-
-
Method Details
-
codec
public static <T> com.mojang.serialization.Codec<? 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 toForgeRegistries.HOLDER_SET_TYPES
.- Returns:
- HolderSetType registered to
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
-