Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-272181

Enchantment attribute doesnt get applied when switching away from offhand.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 24w20a
    • Windows 10; Adoption Open JDK 21.0.2.13
    • Unconfirmed
    • (Unassigned)

      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
      }

       

            Unassigned Unassigned
            pdm_ pdm_
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: