Interface DataComponentPredicate
- All Superinterfaces:
Predicate<DataComponent.Holder>
- All Known Subinterfaces:
DataComponentPredicate.Registered
- All Known Implementing Classes:
DataComponentPredicate.ArmorTrim, DataComponentPredicate.AttributeModifiers, DataComponentPredicate.BundleContents, DataComponentPredicate.Container, DataComponentPredicate.CustomData, DataComponentPredicate.Damage, DataComponentPredicate.Enchantments, DataComponentPredicate.Exists, DataComponentPredicate.FireworkExplosion, DataComponentPredicate.Fireworks, DataComponentPredicate.JukeboxPlayable, DataComponentPredicate.Potions, DataComponentPredicate.StoredEnchantments, DataComponentPredicate.VillagerVariant, DataComponentPredicate.WritableBook, DataComponentPredicate.WrittenBook
public sealed interface DataComponentPredicate
extends Predicate<DataComponent.Holder>
permits DataComponentPredicate.Registered, DataComponentPredicate.Exists
A partial predicate for the data components held by an item or block entity.
Registered predicates inspect the value of a particular component, while DataComponentPredicate.Exists
only requires that a component be present.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordTests armor trim material and pattern in theDataComponents.TRIMcomponent.static final recordTests an attribute modifier.static final recordTests attribute modifiers in theDataComponents.ATTRIBUTE_MODIFIERScomponent.static final recordTests the items in theDataComponents.BUNDLE_CONTENTScomponent.static final recordTests the items in theDataComponents.CONTAINERcomponent.static final recordTests stored NBT data in theDataComponents.CUSTOM_DATAcomponentstatic final recordTests damage or remaining durability.static final recordTests enchantments.static final recordTests an object's enchantments in itsDataComponents.ENCHANTMENTScomponent.static final recordTests whether a data component is present, without inspecting its value.static final recordTests the firework explosion inDataComponents.FIREWORK_EXPLOSIONstatic final recordstatic final recordTests the firework explosions and flight duration in theDataComponents.FIREWORKScomponent.static final recordTests the jukebox song in theDataComponents.JUKEBOX_PLAYABLEcomponent.static final recordTests stored potion types in theDataComponents.POTION_CONTENTScomponent.static interfaceA component predicate whose codec is registered in the data component predicate type registry.static final recordTests an object's enchantments in itsDataComponents.STORED_ENCHANTMENTScomponent.static final recordTests the villager variant inDataComponents.VILLAGER_VARIANTstatic final recordTests the content of pages in theDataComponents.WRITABLE_BOOK_CONTENTcomponent.static final recordTests the content of pages in theDataComponents.WRITTEN_BOOK_CONTENTcomponent. -
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic DynamicRegistry<Codec<? extends DataComponentPredicate>>
-
Method Details
-
createDefaultRegistry
-