Package net.minecraft.predicate.item
Record Class PotionContentsPredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.item.PotionContentsPredicate
- Record Components:
potions-
- All Implemented Interfaces:
ComponentSubPredicate<PotionContentsComponent>,ItemSubPredicate
public record PotionContentsPredicate(RegistryEntryList<Potion> potions)
extends Record
implements ComponentSubPredicate<PotionContentsComponent>
- Mappings:
Namespace Name official cgintermediary net/minecraft/class_9359named net/minecraft/predicate/item/PotionContentsPredicateofficial cintermediary comp_2461named potions
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.predicate.item.ItemSubPredicate
ItemSubPredicate.Type<T extends ItemSubPredicate> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PotionContentsPredicate> private final RegistryEntryList<Potion> The field for thepotionsrecord component.Fields inherited from interface net.minecraft.predicate.item.ItemSubPredicate
PREDICATES_MAP_CODEC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static ItemSubPredicatepotionContents(RegistryEntryList<Potion> potions) potions()Returns the value of thepotionsrecord component.booleantest(ItemStack itemStack, PotionContentsComponent potionContentsComponent) final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.predicate.item.ComponentSubPredicate
test
-
Field Details
-
potions
The field for thepotionsrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector official aLcg;a:Lcom/mojang/serialization/Codec;intermediary field_49802Lnet/minecraft/class_9359;field_49802:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/predicate/item/PotionContentsPredicate;CODEC:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
PotionContentsPredicate
-
-
Method Details
-
getComponentType
- Specified by:
getComponentTypein interfaceComponentSubPredicate<PotionContentsComponent>- Mappings:
Namespace Name Mixin selector official aLdf;a()Ljz;intermediary method_58163Lnet/minecraft/class_9365;method_58163()Lnet/minecraft/class_9331;named getComponentTypeLnet/minecraft/predicate/item/ComponentSubPredicate;getComponentType()Lnet/minecraft/component/DataComponentType;
-
test
- Specified by:
testin interfaceComponentSubPredicate<PotionContentsComponent>- Mappings:
Namespace Name Mixin selector official aLcg;a(Lcsz;Lcuy;)Zintermediary method_58177Lnet/minecraft/class_9359;method_58177(Lnet/minecraft/class_1799;Lnet/minecraft/class_1844;)Znamed testLnet/minecraft/predicate/item/PotionContentsPredicate;test(Lnet/minecraft/item/ItemStack;Lnet/minecraft/component/type/PotionContentsComponent;)Z
-
potionContents
- Mappings:
Namespace Name Mixin selector official aLcg;a(Lja;)Lci;intermediary method_58178Lnet/minecraft/class_9359;method_58178(Lnet/minecraft/class_6885;)Lnet/minecraft/class_9360;named potionContentsLnet/minecraft/predicate/item/PotionContentsPredicate;potionContents(Lnet/minecraft/registry/entry/RegistryEntryList;)Lnet/minecraft/predicate/item/ItemSubPredicate;
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
potions
Returns the value of thepotionsrecord component.- Returns:
- the value of the
potionsrecord component
-