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

Functions not responsive to attacker entity enchant field

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Awaiting Response
    • None
    • 24w39a
    • None
    • Snapshot, (24w39a) - Minecraft Java Edition - MacOS
    • Unconfirmed
    • (Unassigned)

      I am trying to make a custom wolf armor enchantment that increases damage, which that part works fine. I've got the wolf dealing extra damage. But what does not working is the calling of the function:

      How to recreate: Create a custom enchantment that has wolf armor as the item enchanted, then tell it to run a function as a post-attack: (Might also not work outside of just wolf armor.)

      I've also tested and my function with the exact name space works in game I was able to run it using /function I have attached the datapack, ignore the .DSStore files, they are harmless.

      Here's my code:

      {
      "description":

      { "text": "Beastmaster", "color": "light_purple" }

      ,
      "exclusive_set": "#minecraft:treasure",
      "supported_items": "minecraft:wolf_armor",
      "primary_items": "minecraft:book",
      "weight": 5,
      "max_level": 3,
      "min_cost":

      { "base": 10, "per_level_above_first": 5 }

      ,
      "max_cost":

      { "base": 20, "per_level_above_first": 25 }

      ,
      "anvil_cost": 6,
      "slots": [
      "body"
      ],
      "effects": {
      "minecraft:attributes": [
      {
      "id": "attack_damage",
      "attribute": "minecraft:attack_damage",
      "amount":

      { "type": "minecraft:linear", "base": 2, "per_level_above_first": 1 }

      ,
      "operation": "add_value"
      }
      ],
      "minecraft:post_attack": [
      {
      "enchanted": "attacker",
      "affected": "victim",
      "effect":

      { "type": "minecraft:run_function", "function": "prismatic_enchantments:enchants/beastmaster_particles" }

      }
      ]
      }
      }

            Unassigned Unassigned
            JoeRainbow J. Micheal
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: