Class ItemEnchantmentsComponent

java.lang.Object
net.minecraft.component.type.ItemEnchantmentsComponent
All Implemented Interfaces:
TooltipAppender

public class ItemEnchantmentsComponent extends Object implements TooltipAppender
Mappings:
Namespace Name
named net/minecraft/component/type/ItemEnchantmentsComponent
intermediary net/minecraft/class_9304
official czs
  • Field Details

    • DEFAULT

      public static final ItemEnchantmentsComponent DEFAULT
      Mappings:
      Namespace Name Mixin selector
      named DEFAULT Lnet/minecraft/component/type/ItemEnchantmentsComponent;DEFAULT:Lnet/minecraft/component/type/ItemEnchantmentsComponent;
      intermediary field_49385 Lnet/minecraft/class_9304;field_49385:Lnet/minecraft/class_9304;
      official a Lczs;a:Lczs;
    • ENCHANTMENT_LEVEL_CODEC

      private static final com.mojang.serialization.Codec<Integer> ENCHANTMENT_LEVEL_CODEC
      Mappings:
      Namespace Name Mixin selector
      named ENCHANTMENT_LEVEL_CODEC Lnet/minecraft/component/type/ItemEnchantmentsComponent;ENCHANTMENT_LEVEL_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49388 Lnet/minecraft/class_9304;field_49388:Lcom/mojang/serialization/Codec;
      official d Lczs;d:Lcom/mojang/serialization/Codec;
    • INLINE_CODEC

      private static final com.mojang.serialization.Codec<Object2IntOpenHashMap<RegistryEntry<Enchantment>>> INLINE_CODEC
      Mappings:
      Namespace Name Mixin selector
      named INLINE_CODEC Lnet/minecraft/component/type/ItemEnchantmentsComponent;INLINE_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49753 Lnet/minecraft/class_9304;field_49753:Lcom/mojang/serialization/Codec;
      official e Lczs;e:Lcom/mojang/serialization/Codec;
    • BASE_CODEC

      private static final com.mojang.serialization.Codec<ItemEnchantmentsComponent> BASE_CODEC
      Mappings:
      Namespace Name Mixin selector
      named BASE_CODEC Lnet/minecraft/component/type/ItemEnchantmentsComponent;BASE_CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49754 Lnet/minecraft/class_9304;field_49754:Lcom/mojang/serialization/Codec;
      official f Lczs;f:Lcom/mojang/serialization/Codec;
    • CODEC

      public static final com.mojang.serialization.Codec<ItemEnchantmentsComponent> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/component/type/ItemEnchantmentsComponent;CODEC:Lcom/mojang/serialization/Codec;
      intermediary field_49386 Lnet/minecraft/class_9304;field_49386:Lcom/mojang/serialization/Codec;
      official b Lczs;b:Lcom/mojang/serialization/Codec;
    • PACKET_CODEC

      public static final PacketCodec<RegistryByteBuf,ItemEnchantmentsComponent> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/component/type/ItemEnchantmentsComponent;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_49387 Lnet/minecraft/class_9304;field_49387:Lnet/minecraft/class_9139;
      official c Lczs;c:Lys;
    • enchantments

      Mappings:
      Namespace Name Mixin selector
      named enchantments Lnet/minecraft/component/type/ItemEnchantmentsComponent;enchantments:Lit/unimi/dsi/fastutil/objects/Object2IntOpenHashMap;
      intermediary field_49389 Lnet/minecraft/class_9304;field_49389:Lit/unimi/dsi/fastutil/objects/Object2IntOpenHashMap;
      official g Lczs;g:Lit/unimi/dsi/fastutil/objects/Object2IntOpenHashMap;
    • showInTooltip

      final boolean showInTooltip
      Mappings:
      Namespace Name Mixin selector
      named showInTooltip Lnet/minecraft/component/type/ItemEnchantmentsComponent;showInTooltip:Z
      intermediary field_49390 Lnet/minecraft/class_9304;field_49390:Z
      official h Lczs;h:Z
  • Constructor Details

    • ItemEnchantmentsComponent

      ItemEnchantmentsComponent(Object2IntOpenHashMap<RegistryEntry<Enchantment>> enchantments, boolean showInTooltip)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/component/type/ItemEnchantmentsComponent;<init>(Lit/unimi/dsi/fastutil/objects/Object2IntOpenHashMap;Z)V
      intermediary <init> Lnet/minecraft/class_9304;<init>(Lit/unimi/dsi/fastutil/objects/Object2IntOpenHashMap;Z)V
      official <init> Lczs;<init>(Lit/unimi/dsi/fastutil/objects/Object2IntOpenHashMap;Z)V
  • Method Details

    • getLevel

      public int getLevel(RegistryEntry<Enchantment> enchantment)
      Mappings:
      Namespace Name Mixin selector
      named getLevel Lnet/minecraft/component/type/ItemEnchantmentsComponent;getLevel(Lnet/minecraft/registry/entry/RegistryEntry;)I
      intermediary method_57536 Lnet/minecraft/class_9304;method_57536(Lnet/minecraft/class_6880;)I
      official a Lczs;a(Ljj;)I
    • appendTooltip

      public void appendTooltip(Item.TooltipContext context, Consumer<Text> tooltip, TooltipType type)
      Specified by:
      appendTooltip in interface TooltipAppender
      Mappings:
      Namespace Name Mixin selector
      named appendTooltip Lnet/minecraft/item/TooltipAppender;appendTooltip(Lnet/minecraft/item/Item$TooltipContext;Ljava/util/function/Consumer;Lnet/minecraft/client/item/TooltipType;)V
      intermediary method_57409 Lnet/minecraft/class_9299;method_57409(Lnet/minecraft/class_1792$class_9635;Ljava/util/function/Consumer;Lnet/minecraft/class_1836;)V
      official a Lcxi;a(Lcty$b;Ljava/util/function/Consumer;Lcvw;)V
    • getTooltipOrderList

      private static <T> RegistryEntryList<T> getTooltipOrderList(@Nullable RegistryWrapper.WrapperLookup registryLookup, RegistryKey<Registry<T>> registryRef, TagKey<T> tooltipOrderTag)
      Mappings:
      Namespace Name Mixin selector
      named getTooltipOrderList Lnet/minecraft/component/type/ItemEnchantmentsComponent;getTooltipOrderList(Lnet/minecraft/registry/RegistryWrapper$WrapperLookup;Lnet/minecraft/registry/RegistryKey;Lnet/minecraft/registry/tag/TagKey;)Lnet/minecraft/registry/entry/RegistryEntryList;
      intermediary method_59716 Lnet/minecraft/class_9304;method_59716(Lnet/minecraft/class_7225$class_7874;Lnet/minecraft/class_5321;Lnet/minecraft/class_6862;)Lnet/minecraft/class_6885;
      official a Lczs;a(Ljl$a;Lakj;Lawm;)Ljn;
    • withShowInTooltip

      public ItemEnchantmentsComponent withShowInTooltip(boolean showInTooltip)
      Mappings:
      Namespace Name Mixin selector
      named withShowInTooltip Lnet/minecraft/component/type/ItemEnchantmentsComponent;withShowInTooltip(Z)Lnet/minecraft/component/type/ItemEnchantmentsComponent;
      intermediary method_58449 Lnet/minecraft/class_9304;method_58449(Z)Lnet/minecraft/class_9304;
      official a Lczs;a(Z)Lczs;
    • getEnchantments

      public Set<RegistryEntry<Enchantment>> getEnchantments()
      Mappings:
      Namespace Name Mixin selector
      named getEnchantments Lnet/minecraft/component/type/ItemEnchantmentsComponent;getEnchantments()Ljava/util/Set;
      intermediary method_57534 Lnet/minecraft/class_9304;method_57534()Ljava/util/Set;
      official a Lczs;a()Ljava/util/Set;
    • getEnchantmentsMap

      public Set<Object2IntMap.Entry<RegistryEntry<Enchantment>>> getEnchantmentsMap()
      Mappings:
      Namespace Name Mixin selector
      named getEnchantmentsMap Lnet/minecraft/component/type/ItemEnchantmentsComponent;getEnchantmentsMap()Ljava/util/Set;
      intermediary method_57539 Lnet/minecraft/class_9304;method_57539()Ljava/util/Set;
      official b Lczs;b()Ljava/util/Set;
    • getSize

      public int getSize()
      Mappings:
      Namespace Name Mixin selector
      named getSize Lnet/minecraft/component/type/ItemEnchantmentsComponent;getSize()I
      intermediary method_57541 Lnet/minecraft/class_9304;method_57541()I
      official c Lczs;c()I
    • isEmpty

      public boolean isEmpty()
      Mappings:
      Namespace Name Mixin selector
      named isEmpty Lnet/minecraft/component/type/ItemEnchantmentsComponent;isEmpty()Z
      intermediary method_57543 Lnet/minecraft/class_9304;method_57543()Z
      official d Lczs;d()Z
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
      Mappings:
      Namespace Name Mixin selector
      named equals Lnet/minecraft/component/type/ItemEnchantmentsComponent;equals(Ljava/lang/Object;)Z
      intermediary equals Lnet/minecraft/class_9304;equals(Ljava/lang/Object;)Z
      official equals Lczs;equals(Ljava/lang/Object;)Z
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object