Record Class LightningBoltPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.LightningBoltPredicate
- All Implemented Interfaces:
- EntitySubPredicate
public record LightningBoltPredicate(MinMaxBounds.Ints blocksSetOnFire, Optional<EntityPredicate> entityStruck)
extends Record
implements EntitySubPredicate
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.advancements.critereon.EntitySubPredicateEntitySubPredicate.Type, EntitySubPredicate.Types
- 
Field SummaryFieldsModifier 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 SummaryConstructorsConstructorDescriptionLightningBoltPredicate(MinMaxBounds.Ints blocksSetOnFire, Optional<EntityPredicate> entityStruck) Creates an instance of aLightningBoltPredicaterecord class.
- 
Method SummaryModifier and TypeMethodDescriptionstatic LightningBoltPredicateblockSetOnFire(MinMaxBounds.Ints p_299013_) Returns the value of theblocksSetOnFirerecord component.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 p_299034_, ServerLevel p_299101_, Vec3 p_298929_) final StringtoString()Returns a string representation of this record class.type()
- 
Field Details- 
blocksSetOnFireThe field for theblocksSetOnFirerecord component.
- 
entityStruckThe field for theentityStruckrecord component.
- 
CODEC
 
- 
- 
Constructor Details- 
LightningBoltPredicatepublic LightningBoltPredicate(MinMaxBounds.Ints blocksSetOnFire, Optional<EntityPredicate> entityStruck) Creates an instance of aLightningBoltPredicaterecord class.- Parameters:
- blocksSetOnFire- the value for the- blocksSetOnFirerecord component
- entityStruck- the value for the- entityStruckrecord component
 
 
- 
- 
Method Details- 
blockSetOnFire
- 
type- Specified by:
- typein interface- EntitySubPredicate
 
- 
matches- Specified by:
- matchesin interface- EntitySubPredicate
 
- 
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).
- 
blocksSetOnFireReturns the value of theblocksSetOnFirerecord component.- Returns:
- the value of the blocksSetOnFirerecord component
 
- 
entityStruckReturns the value of theentityStruckrecord component.- Returns:
- the value of the entityStruckrecord component
 
 
-