Record Class FireworkExplosionPredicate.FireworkPredicate
java.lang.Object
java.lang.Record
net.minecraft.core.component.predicates.FireworkExplosionPredicate.FireworkPredicate
- All Implemented Interfaces:
Predicate<FireworkExplosion>
- Enclosing class:
FireworkExplosionPredicate
public static record FireworkExplosionPredicate.FireworkPredicate(Optional<FireworkExplosion.Shape> shape, Optional<Boolean> twinkle, Optional<Boolean> trail)
extends Record
implements Predicate<FireworkExplosion>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<FireworkExplosionPredicate.FireworkPredicate> private final Optional<FireworkExplosion.Shape> The field for theshaperecord component.The field for thetrailrecord component.The field for thetwinklerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionFireworkPredicate(Optional<FireworkExplosion.Shape> shape, Optional<Boolean> twinkle, Optional<Boolean> trail) Creates an instance of aFireworkPredicaterecord class. -
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.shape()Returns the value of theshaperecord component.booleantest(FireworkExplosion fireworkExplosion) 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
-
shape
The field for theshaperecord component. -
twinkle
-
trail
-
CODEC
public static final com.mojang.serialization.Codec<FireworkExplosionPredicate.FireworkPredicate> CODEC
-
-
Constructor Details
-
FireworkPredicate
public FireworkPredicate(Optional<FireworkExplosion.Shape> shape, Optional<Boolean> twinkle, Optional<Boolean> trail) Creates an instance of aFireworkPredicaterecord class.- Parameters:
shape- the value for theshaperecord componenttwinkle- the value for thetwinklerecord componenttrail- the value for thetrailrecord component
-
-
Method Details
-
test
- Specified by:
testin interfacePredicate<FireworkExplosion>
-
toString
-
hashCode
-
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). -
shape
Returns the value of theshaperecord component.- Returns:
- the value of the
shaperecord component
-
twinkle
-
trail
-