Record Class LightningBoltPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.criterion.LightningBoltPredicate
- All Implemented Interfaces:
EntitySubPredicate
public record LightningBoltPredicate(MinMaxBounds.Ints blocksSetOnFire, Optional<EntityPredicate> entityStruck)
extends Record
implements EntitySubPredicate
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MinMaxBounds.IntsThe field for theblocksSetOnFirerecord component.static final com.mojang.serialization.MapCodec<LightningBoltPredicate> private final Optional<EntityPredicate> The field for theentityStruckrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionLightningBoltPredicate(MinMaxBounds.Ints blocksSetOnFire, Optional<EntityPredicate> entityStruck) Creates an instance of aLightningBoltPredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic LightningBoltPredicateblockSetOnFire(MinMaxBounds.Ints count) Returns the value of theblocksSetOnFirerecord component.com.mojang.serialization.MapCodec<LightningBoltPredicate> codec()Returns the value of theentityStruckrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanmatches(Entity entity, ServerLevel level, @Nullable Vec3 position) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
blocksSetOnFire
The field for theblocksSetOnFirerecord component. -
entityStruck
The field for theentityStruckrecord component. -
CODEC
-
-
Constructor Details
-
LightningBoltPredicate
public LightningBoltPredicate(MinMaxBounds.Ints blocksSetOnFire, Optional<EntityPredicate> entityStruck) Creates an instance of aLightningBoltPredicaterecord class.- Parameters:
blocksSetOnFire- the value for theblocksSetOnFirerecord componententityStruck- the value for theentityStruckrecord component
-
-
Method Details
-
blockSetOnFire
-
codec
- Specified by:
codecin interfaceEntitySubPredicate
-
matches
- Specified by:
matchesin interfaceEntitySubPredicate
-
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). -
blocksSetOnFire
Returns the value of theblocksSetOnFirerecord component.- Returns:
- the value of the
blocksSetOnFirerecord component
-
entityStruck
Returns the value of theentityStruckrecord component.- Returns:
- the value of the
entityStruckrecord component
-