Record Class MobEffectsPredicate.MobEffectInstancePredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.MobEffectsPredicate.MobEffectInstancePredicate
- Enclosing class:
- MobEffectsPredicate
public static record MobEffectsPredicate.MobEffectInstancePredicate(MinMaxBounds.Ints amplifier, MinMaxBounds.Ints duration, Optional<Boolean> ambient, Optional<Boolean> visible)
extends Record
- 
Field SummaryFieldsModifier and TypeFieldDescriptionThe field for theambientrecord component.private final MinMaxBounds.IntsThe field for theamplifierrecord component.static final com.mojang.serialization.Codec<MobEffectsPredicate.MobEffectInstancePredicate>private final MinMaxBounds.IntsThe field for thedurationrecord component.The field for thevisiblerecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionMobEffectInstancePredicate(MinMaxBounds.Ints amplifier, MinMaxBounds.Ints duration, Optional<Boolean> ambient, Optional<Boolean> visible) Creates an instance of aMobEffectInstancePredicaterecord class.
- 
Method SummaryModifier and TypeMethodDescriptionambient()Returns the value of theambientrecord component.Returns the value of theamplifierrecord component.duration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanmatches(MobEffectInstance p_56578_) final StringtoString()Returns a string representation of this record class.visible()Returns the value of thevisiblerecord component.
- 
Field Details- 
amplifierThe field for theamplifierrecord component.
- 
durationThe field for thedurationrecord component.
- 
ambientThe field for theambientrecord component.
- 
visibleThe field for thevisiblerecord component.
- 
CODECpublic static final com.mojang.serialization.Codec<MobEffectsPredicate.MobEffectInstancePredicate> CODEC
 
- 
- 
Constructor Details- 
MobEffectInstancePredicatepublic MobEffectInstancePredicate()
- 
MobEffectInstancePredicatepublic MobEffectInstancePredicate(MinMaxBounds.Ints amplifier, MinMaxBounds.Ints duration, Optional<Boolean> ambient, Optional<Boolean> visible) Creates an instance of aMobEffectInstancePredicaterecord class.- Parameters:
- amplifier- the value for the- amplifierrecord component
- duration- the value for the- durationrecord component
- ambient- the value for the- ambientrecord component
- visible- the value for the- visiblerecord component
 
 
- 
- 
Method Details- 
matches
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
amplifierReturns the value of theamplifierrecord component.- Returns:
- the value of the amplifierrecord component
 
- 
durationReturns the value of thedurationrecord component.- Returns:
- the value of the durationrecord component
 
- 
ambientReturns the value of theambientrecord component.- Returns:
- the value of the ambientrecord component
 
- 
visibleReturns the value of thevisiblerecord component.- Returns:
- the value of the visiblerecord component
 
 
-