Package net.minecraft.component.type
Class ItemEnchantmentsComponent
java.lang.Object
net.minecraft.component.type.ItemEnchantmentsComponent
- All Implemented Interfaces:
TooltipAppender
- Mappings:
Namespace Name official cxg
intermediary net/minecraft/class_9304
named net/minecraft/component/type/ItemEnchantmentsComponent
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<ItemEnchantmentsComponent> static final ItemEnchantmentsComponent
private static final com.mojang.serialization.Codec
<Integer> (package private) final Object2IntLinkedOpenHashMap
<RegistryEntry<Enchantment>> private static final com.mojang.serialization.Codec
<Object2IntLinkedOpenHashMap<RegistryEntry<Enchantment>>> private static final com.mojang.serialization.Codec
<ItemEnchantmentsComponent> static final PacketCodec
<RegistryByteBuf, ItemEnchantmentsComponent> (package private) final boolean
-
Constructor Summary
ConstructorsConstructorDescriptionItemEnchantmentsComponent
(Object2IntLinkedOpenHashMap<RegistryEntry<Enchantment>> enchantments, boolean showInTooltip) -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendTooltip
(Consumer<Text> textConsumer, TooltipContext context) boolean
int
getLevel
(Enchantment enchantment) int
getSize()
int
hashCode()
boolean
isEmpty()
toString()
-
Field Details
-
DEFAULT
- Mappings:
Namespace Name Mixin selector official a
Lcxg;a:Lcxg;
intermediary field_49385
Lnet/minecraft/class_9304;field_49385:Lnet/minecraft/class_9304;
named DEFAULT
Lnet/minecraft/component/type/ItemEnchantmentsComponent;DEFAULT:Lnet/minecraft/component/type/ItemEnchantmentsComponent;
-
ENCHANTMENT_LEVEL_CODEC
- Mappings:
Namespace Name Mixin selector official d
Lcxg;d:Lcom/mojang/serialization/Codec;
intermediary field_49388
Lnet/minecraft/class_9304;field_49388:Lcom/mojang/serialization/Codec;
named ENCHANTMENT_LEVEL_CODEC
Lnet/minecraft/component/type/ItemEnchantmentsComponent;ENCHANTMENT_LEVEL_CODEC:Lcom/mojang/serialization/Codec;
-
field_49753
private static final com.mojang.serialization.Codec<Object2IntLinkedOpenHashMap<RegistryEntry<Enchantment>>> field_49753- Mappings:
Namespace Name Mixin selector official e
Lcxg;e:Lcom/mojang/serialization/Codec;
intermediary field_49753
Lnet/minecraft/class_9304;field_49753:Lcom/mojang/serialization/Codec;
named field_49753
Lnet/minecraft/component/type/ItemEnchantmentsComponent;field_49753:Lcom/mojang/serialization/Codec;
-
field_49754
- Mappings:
Namespace Name Mixin selector official f
Lcxg;f:Lcom/mojang/serialization/Codec;
intermediary field_49754
Lnet/minecraft/class_9304;field_49754:Lcom/mojang/serialization/Codec;
named field_49754
Lnet/minecraft/component/type/ItemEnchantmentsComponent;field_49754:Lcom/mojang/serialization/Codec;
-
CODEC
- Mappings:
Namespace Name Mixin selector official b
Lcxg;b:Lcom/mojang/serialization/Codec;
intermediary field_49386
Lnet/minecraft/class_9304;field_49386:Lcom/mojang/serialization/Codec;
named CODEC
Lnet/minecraft/component/type/ItemEnchantmentsComponent;CODEC:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector official c
Lcxg;c:Lyg;
intermediary field_49387
Lnet/minecraft/class_9304;field_49387:Lnet/minecraft/class_9139;
named PACKET_CODEC
Lnet/minecraft/component/type/ItemEnchantmentsComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
-
enchantments
- Mappings:
Namespace Name Mixin selector official g
Lcxg;g:Lit/unimi/dsi/fastutil/objects/Object2IntLinkedOpenHashMap;
intermediary field_49389
Lnet/minecraft/class_9304;field_49389:Lit/unimi/dsi/fastutil/objects/Object2IntLinkedOpenHashMap;
named enchantments
Lnet/minecraft/component/type/ItemEnchantmentsComponent;enchantments:Lit/unimi/dsi/fastutil/objects/Object2IntLinkedOpenHashMap;
-
showInTooltip
final boolean showInTooltip- Mappings:
Namespace Name Mixin selector official h
Lcxg;h:Z
intermediary field_49390
Lnet/minecraft/class_9304;field_49390:Z
named showInTooltip
Lnet/minecraft/component/type/ItemEnchantmentsComponent;showInTooltip:Z
-
-
Constructor Details
-
ItemEnchantmentsComponent
ItemEnchantmentsComponent(Object2IntLinkedOpenHashMap<RegistryEntry<Enchantment>> enchantments, boolean showInTooltip) - Mappings:
Namespace Name Mixin selector official <init>
Lcxg;<init>(Lit/unimi/dsi/fastutil/objects/Object2IntLinkedOpenHashMap;Z)V
intermediary <init>
Lnet/minecraft/class_9304;<init>(Lit/unimi/dsi/fastutil/objects/Object2IntLinkedOpenHashMap;Z)V
named <init>
Lnet/minecraft/component/type/ItemEnchantmentsComponent;<init>(Lit/unimi/dsi/fastutil/objects/Object2IntLinkedOpenHashMap;Z)V
-
-
Method Details
-
getLevel
- Mappings:
Namespace Name Mixin selector official a
Lcxg;a(Lcwz;)I
intermediary method_57536
Lnet/minecraft/class_9304;method_57536(Lnet/minecraft/class_1887;)I
named getLevel
Lnet/minecraft/component/type/ItemEnchantmentsComponent;getLevel(Lnet/minecraft/enchantment/Enchantment;)I
-
appendTooltip
- Specified by:
appendTooltip
in interfaceTooltipAppender
- Mappings:
Namespace Name Mixin selector official a
Lcus;a(Ljava/util/function/Consumer;Lcti;)V
intermediary method_57409
Lnet/minecraft/class_9299;method_57409(Ljava/util/function/Consumer;Lnet/minecraft/class_1836;)V
named appendTooltip
Lnet/minecraft/item/TooltipAppender;appendTooltip(Ljava/util/function/Consumer;Lnet/minecraft/client/item/TooltipContext;)V
-
getEnchantments
- Mappings:
Namespace Name Mixin selector official a
Lcxg;a()Ljava/util/Set;
intermediary method_57534
Lnet/minecraft/class_9304;method_57534()Ljava/util/Set;
named getEnchantments
Lnet/minecraft/component/type/ItemEnchantmentsComponent;getEnchantments()Ljava/util/Set;
-
getEnchantmentsMap
- Mappings:
Namespace Name Mixin selector official b
Lcxg;b()Ljava/util/Set;
intermediary method_57539
Lnet/minecraft/class_9304;method_57539()Ljava/util/Set;
named getEnchantmentsMap
Lnet/minecraft/component/type/ItemEnchantmentsComponent;getEnchantmentsMap()Ljava/util/Set;
-
getSize
public int getSize()- Mappings:
Namespace Name Mixin selector official c
Lcxg;c()I
intermediary method_57541
Lnet/minecraft/class_9304;method_57541()I
named getSize
Lnet/minecraft/component/type/ItemEnchantmentsComponent;getSize()I
-
isEmpty
public boolean isEmpty()- Mappings:
Namespace Name Mixin selector official d
Lcxg;d()Z
intermediary method_57543
Lnet/minecraft/class_9304;method_57543()Z
named isEmpty
Lnet/minecraft/component/type/ItemEnchantmentsComponent;isEmpty()Z
-
equals
-
hashCode
public int hashCode() -
toString
-