Class AndHolderSet<T>
java.lang.Object
net.minecraftforge.registries.holdersets.CompositeHolderSet<T>
net.minecraftforge.registries.holdersets.AndHolderSet<T>
- All Implemented Interfaces:
Iterable<Holder<T>>
,HolderSet<T>
,IForgeHolderSet<T>
,ICustomHolderSet<T>
Holderset that represents an intersection of other holdersets. Json format:
{ "type": "forge:and", "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, canSerializeIn, contains, get, getComponents, getList, getRandomElement, getSet, 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 java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
AndHolderSet
-
-
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
-