Package net.minecraft.enchantment.effect
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 - ddj- 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 SummaryFieldsModifier and TypeFieldDescriptionprivate final EnchantmentEffectTargetThe field for theaffectedrecord component.private final TThe field for theeffectrecord component.private final EnchantmentEffectTargetThe field for theenchantedrecord component.private final Optional<LootCondition> The field for therequirementsrecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionTargetedEnchantmentEffect(EnchantmentEffectTarget enchantmentEffectTarget, EnchantmentEffectTarget enchantmentEffectTarget2, T t, Optional<LootCondition> optional) 
- 
Method SummaryModifier and TypeMethodDescriptionaffected()Returns the value of theaffectedrecord component.static <S> com.mojang.serialization.Codec<TargetedEnchantmentEffect<S>> createEquipmentDropsCodec(com.mojang.serialization.Codec<S> effectCodec, ContextType lootContextType) static <S> com.mojang.serialization.Codec<TargetedEnchantmentEffect<S>> createPostAttackCodec(com.mojang.serialization.Codec<S> effectCodec, ContextType lootContextType) effect()Returns the value of theeffectrecord component.Returns the value of theenchantedrecord component.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 therequirementsrecord component.booleantest(LootContext lootContext) final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
enchantedThe field for theenchantedrecord component.
- 
affectedThe field for theaffectedrecord component.
- 
effectThe field for theeffectrecord component.
- 
requirementsThe field for therequirementsrecord component.
 
- 
- 
Constructor Details- 
TargetedEnchantmentEffectpublic TargetedEnchantmentEffect(EnchantmentEffectTarget enchantmentEffectTarget, EnchantmentEffectTarget enchantmentEffectTarget2, T t, Optional<LootCondition> optional) 
 
- 
- 
Method Details- 
createPostAttackCodecpublic static <S> com.mojang.serialization.Codec<TargetedEnchantmentEffect<S>> createPostAttackCodec(com.mojang.serialization.Codec<S> effectCodec, ContextType lootContextType) - Mappings:
- Namespace - Name - Mixin selector - named - createPostAttackCodec- Lnet/minecraft/enchantment/effect/TargetedEnchantmentEffect;createPostAttackCodec(Lcom/mojang/serialization/Codec;Lnet/minecraft/util/context/ContextType;)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- Lddj;a(Lcom/mojang/serialization/Codec;Lbaj;)Lcom/mojang/serialization/Codec;
 
- 
createEquipmentDropsCodecpublic static <S> com.mojang.serialization.Codec<TargetedEnchantmentEffect<S>> createEquipmentDropsCodec(com.mojang.serialization.Codec<S> effectCodec, ContextType lootContextType) - Mappings:
- Namespace - Name - Mixin selector - named - createEquipmentDropsCodec- Lnet/minecraft/enchantment/effect/TargetedEnchantmentEffect;createEquipmentDropsCodec(Lcom/mojang/serialization/Codec;Lnet/minecraft/util/context/ContextType;)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- Lddj;b(Lcom/mojang/serialization/Codec;Lbaj;)Lcom/mojang/serialization/Codec;
 
- 
test- 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- Lddj;a(Levs;)Z
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
enchantedReturns the value of theenchantedrecord component.- Returns:
- the value of the enchantedrecord component
 
- 
affectedReturns the value of theaffectedrecord component.- Returns:
- the value of the affectedrecord component
 
- 
effectReturns the value of theeffectrecord component.- Returns:
- the value of the effectrecord component
 
- 
requirementsReturns the value of therequirementsrecord component.- Returns:
- the value of the requirementsrecord component
 
 
-