Record Class MobEffectsPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.MobEffectsPredicate
public record MobEffectsPredicate(Map<Holder<MobEffect>,MobEffectsPredicate.MobEffectInstancePredicate> effectMap)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic final record -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<MobEffectsPredicate> private final Map<Holder<MobEffect>, MobEffectsPredicate.MobEffectInstancePredicate> The field for theeffectMaprecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMobEffectsPredicate(Map<Holder<MobEffect>, MobEffectsPredicate.MobEffectInstancePredicate> effectMap) Creates an instance of aMobEffectsPredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theeffectMaprecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanmatches(Map<Holder<MobEffect>, MobEffectInstance> p_56562_) booleanbooleanmatches(LivingEntity p_56558_) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
effectMap
The field for theeffectMaprecord component. -
CODEC
-
-
Constructor Details
-
MobEffectsPredicate
public MobEffectsPredicate(Map<Holder<MobEffect>, MobEffectsPredicate.MobEffectInstancePredicate> effectMap) Creates an instance of aMobEffectsPredicaterecord class.- Parameters:
effectMap- the value for theeffectMaprecord component
-
-
Method Details
-
matches
-
matches
-
matches
-
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). -
effectMap
Returns the value of theeffectMaprecord component.- Returns:
- the value of the
effectMaprecord component
-