Record Class FishingHookPredicate

java.lang.Object
java.lang.Record
net.minecraft.predicate.entity.FishingHookPredicate
Record Components:
inOpenWater -
All Implemented Interfaces:
EntitySubPredicate

public record FishingHookPredicate(Optional<Boolean> inOpenWater) extends Record implements EntitySubPredicate
Mappings:
Namespace Name
named net/minecraft/predicate/entity/FishingHookPredicate
intermediary net/minecraft/class_4965
official ca
named inOpenWater
intermediary comp_1779
official d
  • Field Details

    • inOpenWater

      private final Optional<Boolean> inOpenWater
      The field for the inOpenWater record component.
    • ALL

      public static final FishingHookPredicate ALL
      Mappings:
      Namespace Name Mixin selector
      named ALL Lnet/minecraft/predicate/entity/FishingHookPredicate;ALL:Lnet/minecraft/predicate/entity/FishingHookPredicate;
      intermediary field_23137 Lnet/minecraft/class_4965;field_23137:Lnet/minecraft/class_4965;
      official b Lca;b:Lca;
    • CODEC

      public static final com.mojang.serialization.MapCodec<FishingHookPredicate> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/predicate/entity/FishingHookPredicate;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_45750 Lnet/minecraft/class_4965;field_45750:Lcom/mojang/serialization/MapCodec;
      official c Lca;c:Lcom/mojang/serialization/MapCodec;
  • Constructor Details

    • FishingHookPredicate

      public FishingHookPredicate(Optional<Boolean> optional)
  • Method Details

    • of

      public static FishingHookPredicate of(boolean inOpenWater)
      Mappings:
      Namespace Name Mixin selector
      named of Lnet/minecraft/predicate/entity/FishingHookPredicate;of(Z)Lnet/minecraft/predicate/entity/FishingHookPredicate;
      intermediary method_26095 Lnet/minecraft/class_4965;method_26095(Z)Lnet/minecraft/class_4965;
      official a Lca;a(Z)Lca;
    • getCodec

      public com.mojang.serialization.MapCodec<FishingHookPredicate> getCodec()
      Specified by:
      getCodec in interface EntitySubPredicate
      Mappings:
      Namespace Name Mixin selector
      named getCodec Lnet/minecraft/predicate/entity/EntitySubPredicate;getCodec()Lcom/mojang/serialization/MapCodec;
      intermediary method_58152 Lnet/minecraft/class_7376;method_58152()Lcom/mojang/serialization/MapCodec;
      official a Lbv;a()Lcom/mojang/serialization/MapCodec;
    • test

      public boolean test(Entity entity, ServerWorld world, @Nullable @Nullable Vec3d pos)
      Specified by:
      test in interface EntitySubPredicate
      Mappings:
      Namespace Name Mixin selector
      named test Lnet/minecraft/predicate/entity/EntitySubPredicate;test(Lnet/minecraft/entity/Entity;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/Vec3d;)Z
      intermediary method_22497 Lnet/minecraft/class_7376;method_22497(Lnet/minecraft/class_1297;Lnet/minecraft/class_3218;Lnet/minecraft/class_243;)Z
      official a Lbv;a(Lbsh;Laqm;Lewh;)Z
    • toString

      public final String toString()
      Returns 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • inOpenWater

      public Optional<Boolean> inOpenWater()
      Returns the value of the inOpenWater record component.
      Returns:
      the value of the inOpenWater record component