Download Default Enchantments — Minecraft Mods — MetaMods
Default Enchantments

Default Enchantments

Active

Downloads

0

Last update

4 years ago
Client
Weapons and armor
Magic

Default Enchantments

This mod allows automatically applying enchantments to items immediately after their creation or smelting. Everything is configured through a JSON configuration file, giving you complete control over which specific enchantments and which items will be affected.

Configuration Setup

In the mod's config folder, you'll find the "defaultEnchantments.json" file. Here's an example configuration that adds Knockback IV and Fire Aspect I enchantments to sticks and bone meal:

[
    {
        "items": [
            {
                "registryName": "minecraft:stick"
            },
            {
                "registryName": "minecraft:dye",
                "metadata": 15
            }
        ],
        "enchantments": [
            {
                "registryName": "minecraft:knockback",
                "strength": 4
            },
            {
                "registryName": "minecraft:fire_aspect",
                "strength": 1
            }
        ]
    }
]

Working with Item Classes

You can specify entire item classes so that enchantments apply to all objects of that type or its subclasses. For example, the following code will add Looting I enchantment to all pickaxes:

[
    {
        "items": [
            {
                "className": "net.minecraft.item.ItemPickaxe"
            }
        ],
        "enchantments": [
            {
                "registryName": "minecraft:looting",
                "strength": 10
            }
        ]
    }
]

Blacklist Functionality

You can create exceptions through a blacklist by specifying items without enchantments. In this example, all pickaxes except the wooden one will receive the Looting I enchantment:

[
    {
        "items": [
            {
                "className": "net.minecraft.item.ItemPickaxe"
            }
        ],
        "enchantments": [
            {
                "registryName": "minecraft:looting",
                "strength": 10
            }
        ]
    },
    {
        "items": [
            {
                "registryName": "minecraft:wooden_pickaxe"
            }
        ]
    }
]

Useful Tips

To find out the registryName and metadata of any item in the game, enable advanced tooltips (F3 + H) and hover over the item in the interface.

All available enchantments can be found on the Minecraft wiki. For modded enchantments, you may need to refer to the mod's source code or contact its authors.

Note: The mod may be incompatible with some crafting systems of other modifications.

Project members
bright_spark

bright_spark

Created: 24 May 2021

ID: 55138