EnchantmentItems
Shared item operations. Hosts retain inventory transactions, acquisition policy and effect dispatch.
Constructors
Link copied to clipboard
public void EnchantmentItems(Function<String, EnchantmentItems.Resolved> resolver, Function<ItemStack, EnchantmentItemProfile> classifier)
Functions
Link copied to clipboard
Reuses registered authored-item classifiers without applying anvil-specific acquisition vetoes.
Link copied to clipboard
Reads caller-owned metadata without consulting providers or accessing an inventory.
Link copied to clipboard
Link copied to clipboard
Produces a reviewable clone.
Link copied to clipboard
Administrator-authored items supersede acquisition limits and compatibility rules.
Link copied to clipboard
public EnchantmentItems.Preview previewAuthoredCustom(ItemStack source, Map<String, Integer> proposedCustom)
Hosts with extended native storage author custom entries without rewriting native metadata.
Link copied to clipboard
public EnchantmentItems.Preview previewCustom(ItemStack source, Map<String, Integer> proposedCustom)
Updates the complete custom set while leaving the host's native enchantment data untouched.
Link copied to clipboard
Redraws known/inactive entries without changing their identities or levels.
Rebuilds host lore around the validated shared section, retaining its position.
public ItemStack refreshPresentation(ItemStack source, UnaryOperator<List<String>> rebuildHostLore, ToIntFunction<List<String>> enchantmentPosition)
Rebuilds host lore and places the shared enchantment section at the supplied host-line index.