Package net.minecraft.enchantment.effect
Record Class TargetedEnchantmentEffectType<T>
java.lang.Object
java.lang.Record
net.minecraft.enchantment.effect.TargetedEnchantmentEffectType<T>
- Record Components:
enchanted
-affected
-effect
-requirements
-
public record TargetedEnchantmentEffectType<T>(EnchantmentEffectTarget enchanted, EnchantmentEffectTarget affected, T effect, Optional<LootCondition> requirements)
extends Record
- Mappings:
Namespace Name named net/minecraft/enchantment/effect/TargetedEnchantmentEffectType
intermediary net/minecraft/class_9710
official czu
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
ConstructorDescriptionTargetedEnchantmentEffectType
(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
<TargetedEnchantmentEffectType<S>> createEquipmentDropsCodec
(com.mojang.serialization.Codec<S> effectCodec, LootContextType lootContextType) static <S> com.mojang.serialization.Codec
<TargetedEnchantmentEffectType<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
-
TargetedEnchantmentEffectType
public TargetedEnchantmentEffectType(EnchantmentEffectTarget enchantmentEffectTarget, EnchantmentEffectTarget enchantmentEffectTarget2, T t, Optional<LootCondition> optional)
-
-
Method Details
-
createPostAttackCodec
public static <S> com.mojang.serialization.Codec<TargetedEnchantmentEffectType<S>> createPostAttackCodec(com.mojang.serialization.Codec<S> effectCodec, LootContextType lootContextType) - Mappings:
Namespace Name Mixin selector named createPostAttackCodec
Lnet/minecraft/enchantment/effect/TargetedEnchantmentEffectType;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
Lczu;a(Lcom/mojang/serialization/Codec;Letq;)Lcom/mojang/serialization/Codec;
-
createEquipmentDropsCodec
public static <S> com.mojang.serialization.Codec<TargetedEnchantmentEffectType<S>> createEquipmentDropsCodec(com.mojang.serialization.Codec<S> effectCodec, LootContextType lootContextType) - Mappings:
Namespace Name Mixin selector named createEquipmentDropsCodec
Lnet/minecraft/enchantment/effect/TargetedEnchantmentEffectType;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
Lczu;b(Lcom/mojang/serialization/Codec;Letq;)Lcom/mojang/serialization/Codec;
-
test
- Mappings:
Namespace Name Mixin selector named test
Lnet/minecraft/enchantment/effect/TargetedEnchantmentEffectType;test(Lnet/minecraft/loot/context/LootContext;)Z
intermediary method_60207
Lnet/minecraft/class_9710;method_60207(Lnet/minecraft/class_47;)Z
official a
Lczu;a(Leqw;)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
-