Record Class TargetedEnchantmentEffect<T>

java.lang.Object
java.lang.Record
net.minecraft.enchantment.effect.TargetedEnchantmentEffect<T>
Record Components:
enchanted -
affected -
effect -
requirements -

public record TargetedEnchantmentEffect<T>(EnchantmentEffectTarget enchanted, EnchantmentEffectTarget affected, T effect, Optional<LootCondition> requirements) extends Record
Mappings:
Namespace Name
named net/minecraft/enchantment/effect/TargetedEnchantmentEffect
intermediary net/minecraft/class_9710
official dak
named enchanted
intermediary comp_2700
official a
named affected
intermediary comp_2701
official b
named effect
intermediary comp_2702
official c
named requirements
intermediary comp_2703
official d
  • Field Details

  • Constructor Details

  • Method Details

    • createPostAttackCodec

      public static <S> com.mojang.serialization.Codec<TargetedEnchantmentEffect<S>> createPostAttackCodec(com.mojang.serialization.Codec<S> effectCodec, LootContextType lootContextType)
      Mappings:
      Namespace Name Mixin selector
      named createPostAttackCodec Lnet/minecraft/enchantment/effect/TargetedEnchantmentEffect;createPostAttackCodec(Lcom/mojang/serialization/Codec;Lnet/minecraft/loot/context/LootContextType;)Lcom/mojang/serialization/Codec;
      intermediary method_60203 Lnet/minecraft/class_9710;method_60203(Lcom/mojang/serialization/Codec;Lnet/minecraft/class_176;)Lcom/mojang/serialization/Codec;
      official a Ldak;a(Lcom/mojang/serialization/Codec;Leul;)Lcom/mojang/serialization/Codec;
    • createEquipmentDropsCodec

      public static <S> com.mojang.serialization.Codec<TargetedEnchantmentEffect<S>> createEquipmentDropsCodec(com.mojang.serialization.Codec<S> effectCodec, LootContextType lootContextType)
      Mappings:
      Namespace Name Mixin selector
      named createEquipmentDropsCodec Lnet/minecraft/enchantment/effect/TargetedEnchantmentEffect;createEquipmentDropsCodec(Lcom/mojang/serialization/Codec;Lnet/minecraft/loot/context/LootContextType;)Lcom/mojang/serialization/Codec;
      intermediary method_60208 Lnet/minecraft/class_9710;method_60208(Lcom/mojang/serialization/Codec;Lnet/minecraft/class_176;)Lcom/mojang/serialization/Codec;
      official b Ldak;b(Lcom/mojang/serialization/Codec;Leul;)Lcom/mojang/serialization/Codec;
    • test

      public boolean test(LootContext lootContext)
      Mappings:
      Namespace Name Mixin selector
      named test Lnet/minecraft/enchantment/effect/TargetedEnchantmentEffect;test(Lnet/minecraft/loot/context/LootContext;)Z
      intermediary method_60207 Lnet/minecraft/class_9710;method_60207(Lnet/minecraft/class_47;)Z
      official a Ldak;a(Lerr;)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.
    • enchanted

      public EnchantmentEffectTarget enchanted()
      Returns the value of the enchanted record component.
      Returns:
      the value of the enchanted record component
    • affected

      public EnchantmentEffectTarget affected()
      Returns the value of the affected record component.
      Returns:
      the value of the affected record component
    • effect

      public T effect()
      Returns the value of the effect record component.
      Returns:
      the value of the effect record component
    • requirements

      public Optional<LootCondition> requirements()
      Returns the value of the requirements record component.
      Returns:
      the value of the requirements record component