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 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 Summary
Modifier and TypeFieldDescriptionprivate final EnchantmentEffectTarget
The field for theaffected
record component.private final T
The field for theeffect
record component.private final EnchantmentEffectTarget
The field for theenchanted
record component.private final Optional
<LootCondition> The field for therequirements
record component. -
Constructor Summary
ConstructorDescriptionTargetedEnchantmentEffect
(EnchantmentEffectTarget enchantmentEffectTarget, EnchantmentEffectTarget enchantmentEffectTarget2, T t, Optional<LootCondition> optional) -
Method Summary
Modifier and TypeMethodDescriptionaffected()
Returns the value of theaffected
record 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 theeffect
record component.Returns the value of theenchanted
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of therequirements
record component.boolean
test
(LootContext lootContext) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
enchanted
The field for theenchanted
record component. -
affected
The field for theaffected
record component. -
effect
The field for theeffect
record component. -
requirements
The field for therequirements
record 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 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
- 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
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 theenchanted
record component.- Returns:
- the value of the
enchanted
record component
-
affected
Returns the value of theaffected
record component.- Returns:
- the value of the
affected
record component
-
effect
Returns the value of theeffect
record component.- Returns:
- the value of the
effect
record component
-
requirements
Returns the value of therequirements
record component.- Returns:
- the value of the
requirements
record component
-