#[SOLVED] How to make item enchantable

5 messages · Page 1 of 1 (latest)

potent wadi
#

How would I make an item like a sword or pickaxe enchantable? Currently when I just make the item it is unable to be enchanted. I tried looking at earlier posts but couldnt find anything in-depth enough to answer.

This is my current code for registering an item:

JAWINIUM_PICKAXE = register(
                "jawinium_pickaxe",
                Item::new,
                new Item.Settings()
                        .pickaxe(JAWINIUM_TOOL_MATERIAL, 1.0f, -2.5f)
                        .enchantable(JAWINIUM_TOOL_MATERIAL.enchantmentValue())
        );
jaunty crest
#

it's controlled by item tags

#

you probably want the pickaxe and durability enchantable tags

potent wadi
potent wadi
#

It worked