Record Class ItemFireworkExplosionPredicate.FireworkPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.ItemFireworkExplosionPredicate.FireworkPredicate
- All Implemented Interfaces:
- Predicate<FireworkExplosion>
- Enclosing class:
- ItemFireworkExplosionPredicate
public static record ItemFireworkExplosionPredicate.FireworkPredicate(Optional<FireworkExplosion.Shape> shape, Optional<Boolean> twinkle, Optional<Boolean> trail)
extends Record
implements Predicate<FireworkExplosion>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ItemFireworkExplosionPredicate.FireworkPredicate> private final Optional<FireworkExplosion.Shape> The field for theshaperecord component.The field for thetrailrecord component.The field for thetwinklerecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionFireworkPredicate(Optional<FireworkExplosion.Shape> shape, Optional<Boolean> twinkle, Optional<Boolean> trail) Creates an instance of aFireworkPredicaterecord class.
- 
Method SummaryModifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.shape()Returns the value of theshaperecord component.booleantest(FireworkExplosion p_340895_) final StringtoString()Returns a string representation of this record class.trail()Returns the value of thetrailrecord component.twinkle()Returns the value of thetwinklerecord component.
- 
Field Details- 
shapeThe field for theshaperecord component.
- 
twinkleThe field for thetwinklerecord component.
- 
trailThe field for thetrailrecord component.
- 
CODECpublic static final com.mojang.serialization.Codec<ItemFireworkExplosionPredicate.FireworkPredicate> CODEC
 
- 
- 
Constructor Details- 
FireworkPredicatepublic FireworkPredicate(Optional<FireworkExplosion.Shape> shape, Optional<Boolean> twinkle, Optional<Boolean> trail) Creates an instance of aFireworkPredicaterecord class.- Parameters:
- shape- the value for the- shaperecord component
- twinkle- the value for the- twinklerecord component
- trail- the value for the- trailrecord component
 
 
- 
- 
Method Details- 
test- Specified by:
- testin interface- Predicate<FireworkExplosion>
 
- 
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).
- 
shapeReturns the value of theshaperecord component.- Returns:
- the value of the shaperecord component
 
- 
twinkleReturns the value of thetwinklerecord component.- Returns:
- the value of the twinklerecord component
 
- 
trailReturns the value of thetrailrecord component.- Returns:
- the value of the trailrecord component
 
 
-