Record Class OnKilledCriterion.Conditions

java.lang.Object
java.lang.Record
net.minecraft.advancement.criterion.OnKilledCriterion.Conditions
Record Components:
player -
entity -
killingBlow -
All Implemented Interfaces:
AbstractCriterion.Conditions, CriterionConditions
Enclosing class:
OnKilledCriterion

public static record OnKilledCriterion.Conditions(Optional<LootContextPredicate> player, Optional<LootContextPredicate> entity, Optional<DamageSourcePredicate> killingBlow) extends Record implements AbstractCriterion.Conditions
Mappings:
Namespace Name
official cd$a
intermediary net/minecraft/class_2080$class_2083
named net/minecraft/advancement/criterion/OnKilledCriterion$Conditions
official b
intermediary comp_2029
named player
official c
intermediary comp_2068
named entity
official d
intermediary comp_2069
named killingBlow
  • Field Details

    • player

      private final Optional<LootContextPredicate> player
      The field for the player record component.
    • entity

      private final Optional<LootContextPredicate> entity
      The field for the entity record component.
    • killingBlow

      private final Optional<DamageSourcePredicate> killingBlow
      The field for the killingBlow record component.
    • CODEC

      public static final com.mojang.serialization.Codec<OnKilledCriterion.Conditions> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Lcd$a;a:Lcom/mojang/serialization/Codec;
      intermediary field_47304 Lnet/minecraft/class_2080$class_2083;field_47304:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/advancement/criterion/OnKilledCriterion$Conditions;CODEC:Lcom/mojang/serialization/Codec;
  • Constructor Details

    • Conditions

      public Conditions(Optional<LootContextPredicate> playerPredicate, Optional<LootContextPredicate> entity, Optional<DamageSourcePredicate> killingBlow)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcd$a;<init>(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V
      intermediary <init> Lnet/minecraft/class_2080$class_2083;<init>(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V
      named <init> Lnet/minecraft/advancement/criterion/OnKilledCriterion$Conditions;<init>(Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V
  • Method Details

    • createPlayerKilledEntity

      public static AdvancementCriterion<OnKilledCriterion.Conditions> createPlayerKilledEntity(Optional<EntityPredicate> entity)
      Mappings:
      Namespace Name Mixin selector
      official a Lcd$a;a(Ljava/util/Optional;)Lan;
      intermediary method_35248 Lnet/minecraft/class_2080$class_2083;method_35248(Ljava/util/Optional;)Lnet/minecraft/class_175;
      named createPlayerKilledEntity Lnet/minecraft/advancement/criterion/OnKilledCriterion$Conditions;createPlayerKilledEntity(Ljava/util/Optional;)Lnet/minecraft/advancement/AdvancementCriterion;
    • createPlayerKilledEntity

      public static AdvancementCriterion<OnKilledCriterion.Conditions> createPlayerKilledEntity(EntityPredicate.Builder killedEntityPredicateBuilder)
      Mappings:
      Namespace Name Mixin selector
      official a Lcd$a;a(Lbp$a;)Lan;
      intermediary method_8997 Lnet/minecraft/class_2080$class_2083;method_8997(Lnet/minecraft/class_2048$class_2049;)Lnet/minecraft/class_175;
      named createPlayerKilledEntity Lnet/minecraft/advancement/criterion/OnKilledCriterion$Conditions;createPlayerKilledEntity(Lnet/minecraft/predicate/entity/EntityPredicate$Builder;)Lnet/minecraft/advancement/AdvancementCriterion;
    • createPlayerKilledEntity

      public static AdvancementCriterion<OnKilledCriterion.Conditions> createPlayerKilledEntity()
      Mappings:
      Namespace Name Mixin selector
      official b Lcd$a;b()Lan;
      intermediary method_8999 Lnet/minecraft/class_2080$class_2083;method_8999()Lnet/minecraft/class_175;
      named createPlayerKilledEntity Lnet/minecraft/advancement/criterion/OnKilledCriterion$Conditions;createPlayerKilledEntity()Lnet/minecraft/advancement/AdvancementCriterion;
    • createPlayerKilledEntity

      public static AdvancementCriterion<OnKilledCriterion.Conditions> createPlayerKilledEntity(Optional<EntityPredicate> entity, Optional<DamageSourcePredicate> killingBlow)
      Mappings:
      Namespace Name Mixin selector
      official a Lcd$a;a(Ljava/util/Optional;Ljava/util/Optional;)Lan;
      intermediary method_35250 Lnet/minecraft/class_2080$class_2083;method_35250(Ljava/util/Optional;Ljava/util/Optional;)Lnet/minecraft/class_175;
      named createPlayerKilledEntity Lnet/minecraft/advancement/criterion/OnKilledCriterion$Conditions;createPlayerKilledEntity(Ljava/util/Optional;Ljava/util/Optional;)Lnet/minecraft/advancement/AdvancementCriterion;
    • createPlayerKilledEntity

      public static AdvancementCriterion<OnKilledCriterion.Conditions> createPlayerKilledEntity(EntityPredicate.Builder killedEntityPredicateBuilder, Optional<DamageSourcePredicate> killingBlow)
      Mappings:
      Namespace Name Mixin selector
      official a Lcd$a;a(Lbp$a;Ljava/util/Optional;)Lan;
      intermediary method_35247 Lnet/minecraft/class_2080$class_2083;method_35247(Lnet/minecraft/class_2048$class_2049;Ljava/util/Optional;)Lnet/minecraft/class_175;
      named createPlayerKilledEntity Lnet/minecraft/advancement/criterion/OnKilledCriterion$Conditions;createPlayerKilledEntity(Lnet/minecraft/predicate/entity/EntityPredicate$Builder;Ljava/util/Optional;)Lnet/minecraft/advancement/AdvancementCriterion;
    • createPlayerKilledEntity

      public static AdvancementCriterion<OnKilledCriterion.Conditions> createPlayerKilledEntity(Optional<EntityPredicate> entity, DamageSourcePredicate.Builder damageSourcePredicateBuilder)
      Mappings:
      Namespace Name Mixin selector
      official a Lcd$a;a(Ljava/util/Optional;Lbf$a;)Lan;
      intermediary method_35249 Lnet/minecraft/class_2080$class_2083;method_35249(Ljava/util/Optional;Lnet/minecraft/class_2022$class_2023;)Lnet/minecraft/class_175;
      named createPlayerKilledEntity Lnet/minecraft/advancement/criterion/OnKilledCriterion$Conditions;createPlayerKilledEntity(Ljava/util/Optional;Lnet/minecraft/predicate/entity/DamageSourcePredicate$Builder;)Lnet/minecraft/advancement/AdvancementCriterion;
    • createPlayerKilledEntity

      public static AdvancementCriterion<OnKilledCriterion.Conditions> createPlayerKilledEntity(EntityPredicate.Builder killedEntityPredicateBuilder, DamageSourcePredicate.Builder killingBlowBuilder)
      Mappings:
      Namespace Name Mixin selector
      official a Lcd$a;a(Lbp$a;Lbf$a;)Lan;
      intermediary method_9001 Lnet/minecraft/class_2080$class_2083;method_9001(Lnet/minecraft/class_2048$class_2049;Lnet/minecraft/class_2022$class_2023;)Lnet/minecraft/class_175;
      named createPlayerKilledEntity Lnet/minecraft/advancement/criterion/OnKilledCriterion$Conditions;createPlayerKilledEntity(Lnet/minecraft/predicate/entity/EntityPredicate$Builder;Lnet/minecraft/predicate/entity/DamageSourcePredicate$Builder;)Lnet/minecraft/advancement/AdvancementCriterion;
    • createKillMobNearSculkCatalyst

      public static AdvancementCriterion<OnKilledCriterion.Conditions> createKillMobNearSculkCatalyst()
      Mappings:
      Namespace Name Mixin selector
      official c Lcd$a;c()Lan;
      intermediary method_42671 Lnet/minecraft/class_2080$class_2083;method_42671()Lnet/minecraft/class_175;
      named createKillMobNearSculkCatalyst Lnet/minecraft/advancement/criterion/OnKilledCriterion$Conditions;createKillMobNearSculkCatalyst()Lnet/minecraft/advancement/AdvancementCriterion;
    • createEntityKilledPlayer

      public static AdvancementCriterion<OnKilledCriterion.Conditions> createEntityKilledPlayer(Optional<EntityPredicate> entity)
      Mappings:
      Namespace Name Mixin selector
      official b Lcd$a;b(Ljava/util/Optional;)Lan;
      intermediary method_35254 Lnet/minecraft/class_2080$class_2083;method_35254(Ljava/util/Optional;)Lnet/minecraft/class_175;
      named createEntityKilledPlayer Lnet/minecraft/advancement/criterion/OnKilledCriterion$Conditions;createEntityKilledPlayer(Ljava/util/Optional;)Lnet/minecraft/advancement/AdvancementCriterion;
    • createEntityKilledPlayer

      public static AdvancementCriterion<OnKilledCriterion.Conditions> createEntityKilledPlayer(EntityPredicate.Builder killerEntityPredicateBuilder)
      Mappings:
      Namespace Name Mixin selector
      official b Lcd$a;b(Lbp$a;)Lan;
      intermediary method_35251 Lnet/minecraft/class_2080$class_2083;method_35251(Lnet/minecraft/class_2048$class_2049;)Lnet/minecraft/class_175;
      named createEntityKilledPlayer Lnet/minecraft/advancement/criterion/OnKilledCriterion$Conditions;createEntityKilledPlayer(Lnet/minecraft/predicate/entity/EntityPredicate$Builder;)Lnet/minecraft/advancement/AdvancementCriterion;
    • createEntityKilledPlayer

      public static AdvancementCriterion<OnKilledCriterion.Conditions> createEntityKilledPlayer()
      Mappings:
      Namespace Name Mixin selector
      official d Lcd$a;d()Lan;
      intermediary method_8998 Lnet/minecraft/class_2080$class_2083;method_8998()Lnet/minecraft/class_175;
      named createEntityKilledPlayer Lnet/minecraft/advancement/criterion/OnKilledCriterion$Conditions;createEntityKilledPlayer()Lnet/minecraft/advancement/AdvancementCriterion;
    • createEntityKilledPlayer

      public static AdvancementCriterion<OnKilledCriterion.Conditions> createEntityKilledPlayer(Optional<EntityPredicate> entity, Optional<DamageSourcePredicate> killingBlow)
      Mappings:
      Namespace Name Mixin selector
      official b Lcd$a;b(Ljava/util/Optional;Ljava/util/Optional;)Lan;
      intermediary method_35256 Lnet/minecraft/class_2080$class_2083;method_35256(Ljava/util/Optional;Ljava/util/Optional;)Lnet/minecraft/class_175;
      named createEntityKilledPlayer Lnet/minecraft/advancement/criterion/OnKilledCriterion$Conditions;createEntityKilledPlayer(Ljava/util/Optional;Ljava/util/Optional;)Lnet/minecraft/advancement/AdvancementCriterion;
    • createEntityKilledPlayer

      public static AdvancementCriterion<OnKilledCriterion.Conditions> createEntityKilledPlayer(EntityPredicate.Builder killerEntityPredicateBuilder, Optional<DamageSourcePredicate> killingBlow)
      Mappings:
      Namespace Name Mixin selector
      official b Lcd$a;b(Lbp$a;Ljava/util/Optional;)Lan;
      intermediary method_35253 Lnet/minecraft/class_2080$class_2083;method_35253(Lnet/minecraft/class_2048$class_2049;Ljava/util/Optional;)Lnet/minecraft/class_175;
      named createEntityKilledPlayer Lnet/minecraft/advancement/criterion/OnKilledCriterion$Conditions;createEntityKilledPlayer(Lnet/minecraft/predicate/entity/EntityPredicate$Builder;Ljava/util/Optional;)Lnet/minecraft/advancement/AdvancementCriterion;
    • createEntityKilledPlayer

      public static AdvancementCriterion<OnKilledCriterion.Conditions> createEntityKilledPlayer(Optional<EntityPredicate> entity, DamageSourcePredicate.Builder damageSourcePredicateBuilder)
      Mappings:
      Namespace Name Mixin selector
      official b Lcd$a;b(Ljava/util/Optional;Lbf$a;)Lan;
      intermediary method_35255 Lnet/minecraft/class_2080$class_2083;method_35255(Ljava/util/Optional;Lnet/minecraft/class_2022$class_2023;)Lnet/minecraft/class_175;
      named createEntityKilledPlayer Lnet/minecraft/advancement/criterion/OnKilledCriterion$Conditions;createEntityKilledPlayer(Ljava/util/Optional;Lnet/minecraft/predicate/entity/DamageSourcePredicate$Builder;)Lnet/minecraft/advancement/AdvancementCriterion;
    • createEntityKilledPlayer

      public static AdvancementCriterion<OnKilledCriterion.Conditions> createEntityKilledPlayer(EntityPredicate.Builder killerEntityPredicateBuilder, DamageSourcePredicate.Builder damageSourcePredicateBuilder)
      Mappings:
      Namespace Name Mixin selector
      official b Lcd$a;b(Lbp$a;Lbf$a;)Lan;
      intermediary method_35252 Lnet/minecraft/class_2080$class_2083;method_35252(Lnet/minecraft/class_2048$class_2049;Lnet/minecraft/class_2022$class_2023;)Lnet/minecraft/class_175;
      named createEntityKilledPlayer Lnet/minecraft/advancement/criterion/OnKilledCriterion$Conditions;createEntityKilledPlayer(Lnet/minecraft/predicate/entity/EntityPredicate$Builder;Lnet/minecraft/predicate/entity/DamageSourcePredicate$Builder;)Lnet/minecraft/advancement/AdvancementCriterion;
    • test

      public boolean test(ServerPlayerEntity player, LootContext entity, DamageSource killingBlow)
      Mappings:
      Namespace Name Mixin selector
      official a Lcd$a;a(Lane;Legw;Lbkt;)Z
      intermediary method_9000 Lnet/minecraft/class_2080$class_2083;method_9000(Lnet/minecraft/class_3222;Lnet/minecraft/class_47;Lnet/minecraft/class_1282;)Z
      named test Lnet/minecraft/advancement/criterion/OnKilledCriterion$Conditions;test(Lnet/minecraft/server/network/ServerPlayerEntity;Lnet/minecraft/loot/context/LootContext;Lnet/minecraft/entity/damage/DamageSource;)Z
    • validate

      public void validate(LootContextPredicateValidator validator)
      Specified by:
      validate in interface AbstractCriterion.Conditions
      Specified by:
      validate in interface CriterionConditions
      Mappings:
      Namespace Name Mixin selector
      official a Laq;a(Lbc;)V
      intermediary method_54938 Lnet/minecraft/class_184;method_54938(Lnet/minecraft/class_8944;)V
      named validate Lnet/minecraft/advancement/criterion/CriterionConditions;validate(Lnet/minecraft/predicate/entity/LootContextPredicateValidator;)V
    • 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.
    • player

      public Optional<LootContextPredicate> player()
      Specified by:
      player in interface AbstractCriterion.Conditions
      Mappings:
      Namespace Name Mixin selector
      official a Lcv$a;a()Ljava/util/Optional;
      intermediary comp_2029 Lnet/minecraft/class_4558$class_8788;comp_2029()Ljava/util/Optional;
      named player Lnet/minecraft/advancement/criterion/AbstractCriterion$Conditions;player()Ljava/util/Optional;
    • entity

      public Optional<LootContextPredicate> entity()
      Returns the value of the entity record component.
      Returns:
      the value of the entity record component
    • killingBlow

      public Optional<DamageSourcePredicate> killingBlow()
      Returns the value of the killingBlow record component.
      Returns:
      the value of the killingBlow record component