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 daa
named effect
intermediary comp_2680
official a
named requirements
intermediary comp_2681
official b
-
Field Summary
Modifier and TypeFieldDescriptionprivate final T
The field for theeffect
record component.private final Optional
<LootCondition> The field for therequirements
record component. -
Constructor Summary
-
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 theeffect
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 context) final String
toString()
Returns a string representation of this record class.
-
Field Details
-
effect
The field for theeffect
record component. -
requirements
The field for therequirements
record component.
-
-
Constructor Details
-
EnchantmentEffectEntry
-
-
Method Details
-
createRequirementsCodec
public static com.mojang.serialization.Codec<LootCondition> createRequirementsCodec(LootContextType lootContextType) - Mappings:
Namespace Name Mixin selector named createRequirementsCodec
Lnet/minecraft/enchantment/effect/EnchantmentEffectEntry;createRequirementsCodec(Lnet/minecraft/loot/context/LootContextType;)Lcom/mojang/serialization/Codec;
intermediary method_60007
Lnet/minecraft/class_9698;method_60007(Lnet/minecraft/class_176;)Lcom/mojang/serialization/Codec;
official a
Ldaa;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 createCodec
Lnet/minecraft/enchantment/effect/EnchantmentEffectEntry;createCodec(Lcom/mojang/serialization/Codec;Lnet/minecraft/loot/context/LootContextType;)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
Ldaa;a(Lcom/mojang/serialization/Codec;Leul;)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
Ldaa;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 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
-