Record Class LightningBoltPredicate

java.lang.Object
java.lang.Record
net.minecraft.predicate.entity.LightningBoltPredicate
Record Components:
blocksSetOnFire -
entityStruck -
All Implemented Interfaces:
TypeSpecificPredicate

public record LightningBoltPredicate(NumberRange.IntRange blocksSetOnFire, Optional<EntityPredicate> entityStruck) extends Record implements TypeSpecificPredicate
Mappings:
Namespace Name
official cg
intermediary net/minecraft/class_6404
named net/minecraft/predicate/entity/LightningBoltPredicate
official c
intermediary comp_1792
named blocksSetOnFire
official d
intermediary comp_1793
named entityStruck
  • Field Details

    • blocksSetOnFire

      private final NumberRange.IntRange blocksSetOnFire
      The field for the blocksSetOnFire record component.
    • entityStruck

      private final Optional<EntityPredicate> entityStruck
      The field for the entityStruck record component.
    • CODEC

      public static final com.mojang.serialization.MapCodec<LightningBoltPredicate> CODEC
      Mappings:
      Namespace Name Mixin selector
      official b Lcg;b:Lcom/mojang/serialization/MapCodec;
      intermediary field_45759 Lnet/minecraft/class_6404;field_45759:Lcom/mojang/serialization/MapCodec;
      named CODEC Lnet/minecraft/predicate/entity/LightningBoltPredicate;CODEC:Lcom/mojang/serialization/MapCodec;
  • Constructor Details

    • LightningBoltPredicate

      public LightningBoltPredicate(NumberRange.IntRange blocksSetOnFire, Optional<EntityPredicate> optional)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcg;<init>(Lck$d;Ljava/util/Optional;)V
      intermediary <init> Lnet/minecraft/class_6404;<init>(Lnet/minecraft/class_2096$class_2100;Ljava/util/Optional;)V
      named <init> Lnet/minecraft/predicate/entity/LightningBoltPredicate;<init>(Lnet/minecraft/predicate/NumberRange$IntRange;Ljava/util/Optional;)V
  • Method Details

    • of

      public static LightningBoltPredicate of(NumberRange.IntRange blocksSetOnFire)
      Mappings:
      Namespace Name Mixin selector
      official a Lcg;a(Lck$d;)Lcg;
      intermediary method_37237 Lnet/minecraft/class_6404;method_37237(Lnet/minecraft/class_2096$class_2100;)Lnet/minecraft/class_6404;
      named of Lnet/minecraft/predicate/entity/LightningBoltPredicate;of(Lnet/minecraft/predicate/NumberRange$IntRange;)Lnet/minecraft/predicate/entity/LightningBoltPredicate;
    • type

      Specified by:
      type in interface TypeSpecificPredicate
      Mappings:
      Namespace Name Mixin selector
      official a Lbq;a()Lbq$a;
      intermediary comp_1776 Lnet/minecraft/class_7376;comp_1776()Lnet/minecraft/class_7376$class_8745;
      named type Lnet/minecraft/predicate/entity/TypeSpecificPredicate;type()Lnet/minecraft/predicate/entity/TypeSpecificPredicate$Type;
    • test

      public boolean test(Entity entity, ServerWorld world, @Nullable @Nullable Vec3d pos)
      Specified by:
      test in interface TypeSpecificPredicate
      Mappings:
      Namespace Name Mixin selector
      official a Lbq;a(Lblv;Land;Lelt;)Z
      intermediary method_22497 Lnet/minecraft/class_7376;method_22497(Lnet/minecraft/class_1297;Lnet/minecraft/class_3218;Lnet/minecraft/class_243;)Z
      named test Lnet/minecraft/predicate/entity/TypeSpecificPredicate;test(Lnet/minecraft/entity/Entity;Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/util/math/Vec3d;)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.
    • blocksSetOnFire

      public NumberRange.IntRange blocksSetOnFire()
      Returns the value of the blocksSetOnFire record component.
      Returns:
      the value of the blocksSetOnFire record component
    • entityStruck

      public Optional<EntityPredicate> entityStruck()
      Returns the value of the entityStruck record component.
      Returns:
      the value of the entityStruck record component