Mojira Archive
MC-272181

Enchantment attribute doesnt get applied when switching away from offhand.

What happens?:

When you have a enchanted Item equipped in off-hand and switch it with the main hand by pressing 'F'. The attribute that was applied through the enchantment will be removed even though the player still has the item in an active slot.

Enchantment json file that i used:

{
    "anvil_cost": 4,
    "description": "Reach",
    "effects": {
        "minecraft:attributes": [
            {
                "amount": {
                    "type": "minecraft:linear",
                    "base": 1,
                    "per_level_above_first": 1
                },
                "attribute": "minecraft:player.block_interaction_range",
                "name": "enchantment.reach",
                "operation": "add_value",
                "uuid": "69696969-0000-0000-0000-000000000001"
            }
        ]
    },
    "max_cost": {
        "base": 51,
        "per_level_above_first": 10
    },
    "max_level": 5,
    "min_cost": {
        "base": 11,
        "per_level_above_first": 10
    },
    "slots": ["mainhand","offhand"],
    "supported_items": "#minecraft:enchantable/mining",
    "primary_items": "#minecraft:enchantable/mining",
    "weight": 2
}

 

Duplicate

pdm_

2024-05-18, 06:45 PM

2024-05-18, 07:51 PM

2024-05-18, 07:46 PM

0

0

Unconfirmed

(Unassigned)

AttributeModifiers, Enchantments, item

24w20a

-