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/TargetedEnchantmentEffectintermediary net/minecraft/class_9710official daknamed enchantedintermediary comp_2700official anamed affectedintermediary comp_2701official bnamed effectintermediary comp_2702official cnamed requirementsintermediary comp_2703official d
-
Field Summary
FieldsModifier 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 Summary
ConstructorsConstructorDescriptionTargetedEnchantmentEffect(EnchantmentEffectTarget enchantmentEffectTarget, EnchantmentEffectTarget enchantmentEffectTarget2, T t, Optional<LootCondition> optional) -
Method Summary
Modifier and TypeMethodDescriptionaffected()Returns the value of theaffectedrecord component.static <S> com.mojang.serialization.Codec<TargetedEnchantmentEffect<S>> createEquipmentDropsCodec(com.mojang.serialization.Codec<S> effectCodec, LootContextType lootContextType) static <S> com.mojang.serialization.Codec<TargetedEnchantmentEffect<S>> createPostAttackCodec(com.mojang.serialization.Codec<S> effectCodec, LootContextType 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
-
enchanted
The field for theenchantedrecord component. -
affected
The field for theaffectedrecord component. -
effect
The field for theeffectrecord component. -
requirements
The field for therequirementsrecord component.
-
-
Constructor Details
-
TargetedEnchantmentEffect
public TargetedEnchantmentEffect(EnchantmentEffectTarget enchantmentEffectTarget, EnchantmentEffectTarget enchantmentEffectTarget2, T t, Optional<LootCondition> optional)
-
-
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 createPostAttackCodecLnet/minecraft/enchantment/effect/TargetedEnchantmentEffect;createPostAttackCodec(Lcom/mojang/serialization/Codec;Lnet/minecraft/loot/context/LootContextType;)Lcom/mojang/serialization/Codec;intermediary method_60203Lnet/minecraft/class_9710;method_60203(Lcom/mojang/serialization/Codec;Lnet/minecraft/class_176;)Lcom/mojang/serialization/Codec;official aLdak;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 createEquipmentDropsCodecLnet/minecraft/enchantment/effect/TargetedEnchantmentEffect;createEquipmentDropsCodec(Lcom/mojang/serialization/Codec;Lnet/minecraft/loot/context/LootContextType;)Lcom/mojang/serialization/Codec;intermediary method_60208Lnet/minecraft/class_9710;method_60208(Lcom/mojang/serialization/Codec;Lnet/minecraft/class_176;)Lcom/mojang/serialization/Codec;official bLdak;b(Lcom/mojang/serialization/Codec;Leul;)Lcom/mojang/serialization/Codec;
-
test
- Mappings:
Namespace Name Mixin selector named testLnet/minecraft/enchantment/effect/TargetedEnchantmentEffect;test(Lnet/minecraft/loot/context/LootContext;)Zintermediary method_60207Lnet/minecraft/class_9710;method_60207(Lnet/minecraft/class_47;)Zofficial aLdak;a(Lerr;)Z
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
enchanted
Returns the value of theenchantedrecord component.- Returns:
- the value of the
enchantedrecord component
-
affected
Returns the value of theaffectedrecord component.- Returns:
- the value of the
affectedrecord component
-
effect
Returns the value of theeffectrecord component.- Returns:
- the value of the
effectrecord component
-
requirements
Returns the value of therequirementsrecord component.- Returns:
- the value of the
requirementsrecord component
-