Record Class FishingHookPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.critereon.FishingHookPredicate
- All Implemented Interfaces:
- EntitySubPredicate
public record FishingHookPredicate(Optional<Boolean> inOpenWater)
extends Record
implements EntitySubPredicate
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.minecraft.advancements.critereon.EntitySubPredicateEntitySubPredicate.Type, EntitySubPredicate.Types
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final FishingHookPredicatestatic final com.mojang.serialization.MapCodec<FishingHookPredicate>The field for theinOpenWaterrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionFishingHookPredicate(Optional<Boolean> inOpenWater) Creates an instance of aFishingHookPredicaterecord 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.Returns the value of theinOpenWaterrecord component.static FishingHookPredicateinOpenWater(boolean p_39767_) booleanmatches(Entity p_219716_, ServerLevel p_219717_, Vec3 p_219718_) final StringtoString()Returns a string representation of this record class.type()
- 
Field Details- 
inOpenWaterThe field for theinOpenWaterrecord component.
- 
ANY
- 
CODEC
 
- 
- 
Constructor Details- 
FishingHookPredicateCreates an instance of aFishingHookPredicaterecord class.- Parameters:
- inOpenWater- the value for the- inOpenWaterrecord component
 
 
- 
- 
Method Details- 
inOpenWater
- 
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).
- 
inOpenWaterReturns the value of theinOpenWaterrecord component.- Returns:
- the value of the inOpenWaterrecord component
 
 
-