net.minecraft.component.type

public class ItemEnchantmentsComponent

implements TooltipAppender

net.minecraft.world.item.enchantment.ItemEnchantments
net.minecraft.class_9304
net.minecraft.component.type.ItemEnchantmentsComponent

Field summary

Modifier and TypeField
public static final ItemEnchantmentsComponent
EMPTY
field_49385
DEFAULT
private static final com.mojang.serialization.Codec<Integer>
LEVEL_CODEC
field_49388
ENCHANTMENT_LEVEL_CODEC
public static final com.mojang.serialization.Codec<ItemEnchantmentsComponent>
CODEC
field_49386
CODEC
public static final PacketCodec<RegistryByteBuf, ItemEnchantmentsComponent>
STREAM_CODEC
field_49387
PACKET_CODEC
private final it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<RegistryEntry<Enchantment>>
enchantments
field_49389
enchantments

Constructor summary

ModifierConstructor
private (it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap<RegistryEntry<Enchantment>> enchantments)

Method summary

Modifier and TypeMethod
public int
getLevel(Holder<Enchantment> enchantment)
method_57536(class_6880<class_1887> arg0)
getLevel(RegistryEntry<Enchantment> enchantment)
public void
addToTooltip(Item$TooltipContext context, Consumer<Component> consumer, TooltipFlag flag, DataComponentGetter components)
method_57409(class_1792$class_9635 arg0, Consumer<class_2561> arg1, class_1836 arg2, class_9473 arg3)
appendTooltip(Item$TooltipContext arg0, Consumer<Text> arg1, TooltipType arg2, ComponentsAccess arg3)
private static <T> RegistryEntryList<T>
getTagOrEmpty(HolderLookup$Provider registries, ResourceKey<Registry<T>> registry, TagKey<T> tag)
method_59716(class_7225$class_7874 arg0, class_5321<class_2378<T>> arg1, class_6862<T> arg2)
getTooltipOrderList(RegistryView$WrapperLookup registries, RegistryKey<Registry<T>> registryRef, TagKey<T> tooltipOrderTag)
public Set<RegistryEntry<Enchantment>>
keySet()
method_57534()
getEnchantments()
public Set<it.unimi.dsi.fastutil.objects.Object2IntMap$Entry<RegistryEntry<Enchantment>>>
entrySet()
method_57539()
getEnchantmentEntries()
public int
size()
method_57541()
getSize()
public boolean
isEmpty()
method_57543()
isEmpty()
private static it.unimi.dsi.fastutil.objects.Object2IntOpenHashMap
lambda$static$2(ItemEnchantments arg0)
method_57540(class_9304 arg0)
method_57540(ItemEnchantmentsComponent component)
private static Map
lambda$static$1(ItemEnchantments arg0)
method_67223(class_9304 arg0)
method_67223(ItemEnchantmentsComponent arg0)
private static ItemEnchantmentsComponent
lambda$static$0(Map arg0)
method_67222(Map arg0)
method_67222(Map arg0)