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/EnchantmentEffectEntryintermediary net/minecraft/class_9698official daanamed effectintermediary comp_2680official anamed requirementsintermediary comp_2681official b
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TThe field for theeffectrecord component.private final Optional<LootCondition> The field for therequirementsrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> com.mojang.serialization.Codec<EnchantmentEffectEntry<T>> createCodec(com.mojang.serialization.Codec<T> effectCodec, LootContextType lootContextType) static com.mojang.serialization.Codec<LootCondition> createRequirementsCodec(LootContextType 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
-
effect
The field for theeffectrecord component. -
requirements
The field for therequirementsrecord component.
-
-
Constructor Details
-
EnchantmentEffectEntry
-
-
Method Details
-
createRequirementsCodec
public static com.mojang.serialization.Codec<LootCondition> createRequirementsCodec(LootContextType lootContextType) - Mappings:
Namespace Name Mixin selector named createRequirementsCodecLnet/minecraft/enchantment/effect/EnchantmentEffectEntry;createRequirementsCodec(Lnet/minecraft/loot/context/LootContextType;)Lcom/mojang/serialization/Codec;intermediary method_60007Lnet/minecraft/class_9698;method_60007(Lnet/minecraft/class_176;)Lcom/mojang/serialization/Codec;official aLdaa;a(Leul;)Lcom/mojang/serialization/Codec;
-
createCodec
public static <T> com.mojang.serialization.Codec<EnchantmentEffectEntry<T>> createCodec(com.mojang.serialization.Codec<T> effectCodec, LootContextType lootContextType) - Mappings:
Namespace Name Mixin selector named createCodecLnet/minecraft/enchantment/effect/EnchantmentEffectEntry;createCodec(Lcom/mojang/serialization/Codec;Lnet/minecraft/loot/context/LootContextType;)Lcom/mojang/serialization/Codec;intermediary method_60004Lnet/minecraft/class_9698;method_60004(Lcom/mojang/serialization/Codec;Lnet/minecraft/class_176;)Lcom/mojang/serialization/Codec;official aLdaa;a(Lcom/mojang/serialization/Codec;Leul;)Lcom/mojang/serialization/Codec;
-
test
- Mappings:
Namespace Name Mixin selector named testLnet/minecraft/enchantment/effect/EnchantmentEffectEntry;test(Lnet/minecraft/loot/context/LootContext;)Zintermediary method_60006Lnet/minecraft/class_9698;method_60006(Lnet/minecraft/class_47;)Zofficial aLdaa;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). -
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
-