Record Class FishingHookPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.criterion.FishingHookPredicate
- All Implemented Interfaces:
EntitySubPredicate
public record FishingHookPredicate(Optional<Boolean> inOpenWater)
extends Record
implements EntitySubPredicate
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FishingHookPredicatestatic final com.mojang.serialization.MapCodec<FishingHookPredicate> The field for theinOpenWaterrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionFishingHookPredicate(Optional<Boolean> inOpenWater) Creates an instance of aFishingHookPredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<FishingHookPredicate> codec()final 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 requirement) booleanmatches(Entity entity, ServerLevel level, @Nullable Vec3 position) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
inOpenWater
-
ANY
-
CODEC
-
-
Constructor Details
-
FishingHookPredicate
-
-
Method Details
-
inOpenWater
-
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). -
inOpenWater
-