Package net.minecraft.enchantment.effect
Record Class EnchantmentEffectEntry<T>
java.lang.Object
java.lang.Record
net.minecraft.enchantment.effect.EnchantmentEffectEntry<T>
- Record Components:
- effect-
- requirements-
public record EnchantmentEffectEntry<T>(T effect, Optional<LootCondition> requirements)
extends Record
- Mappings:
- Namespace - Name - named - net/minecraft/enchantment/effect/EnchantmentEffectEntry- intermediary - net/minecraft/class_9698- official - dcx- named - effect- intermediary - comp_2680- official - a- named - requirements- intermediary - comp_2681- official - b
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final TThe field for theeffectrecord component.private final Optional<LootCondition> The field for therequirementsrecord component.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic <T> com.mojang.serialization.Codec<EnchantmentEffectEntry<T>> createCodec(com.mojang.serialization.Codec<T> effectCodec, ContextType lootContextType) static com.mojang.serialization.Codec<LootCondition> createRequirementsCodec(ContextType lootContextType) effect()Returns the value of theeffectrecord 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 context) final StringtoString()Returns a string representation of this record class.
- 
Field Details- 
effectThe field for theeffectrecord component.
- 
requirementsThe field for therequirementsrecord component.
 
- 
- 
Constructor Details- 
EnchantmentEffectEntry
 
- 
- 
Method Details- 
createRequirementsCodecpublic static com.mojang.serialization.Codec<LootCondition> createRequirementsCodec(ContextType lootContextType) - Mappings:
- Namespace - Name - Mixin selector - named - createRequirementsCodec- Lnet/minecraft/enchantment/effect/EnchantmentEffectEntry;createRequirementsCodec(Lnet/minecraft/util/context/ContextType;)Lcom/mojang/serialization/Codec;- intermediary - method_60007- Lnet/minecraft/class_9698;method_60007(Lnet/minecraft/class_176;)Lcom/mojang/serialization/Codec;- official - a- Ldcx;a(Lbaj;)Lcom/mojang/serialization/Codec;
 
- 
createCodecpublic static <T> com.mojang.serialization.Codec<EnchantmentEffectEntry<T>> createCodec(com.mojang.serialization.Codec<T> effectCodec, ContextType lootContextType) - Mappings:
- Namespace - Name - Mixin selector - named - createCodec- Lnet/minecraft/enchantment/effect/EnchantmentEffectEntry;createCodec(Lcom/mojang/serialization/Codec;Lnet/minecraft/util/context/ContextType;)Lcom/mojang/serialization/Codec;- intermediary - method_60004- Lnet/minecraft/class_9698;method_60004(Lcom/mojang/serialization/Codec;Lnet/minecraft/class_176;)Lcom/mojang/serialization/Codec;- official - a- Ldcx;a(Lcom/mojang/serialization/Codec;Lbaj;)Lcom/mojang/serialization/Codec;
 
- 
test- Mappings:
- Namespace - Name - Mixin selector - named - test- Lnet/minecraft/enchantment/effect/EnchantmentEffectEntry;test(Lnet/minecraft/loot/context/LootContext;)Z- intermediary - method_60006- Lnet/minecraft/class_9698;method_60006(Lnet/minecraft/class_47;)Z- official - a- Ldcx;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).
- 
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
 
 
-