{
  "pools": [
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "minecraft:emerald",
          "functions": [
            {
              "function": "minecraft:set_components",
              "components": {
                "minecraft:enchantment_glint_override": true,
                "minecraft:custom_data": "{luckycoin:tag}",
                "minecraft:attribute_modifiers": [
                  {
                    "type": "luck",
                    "id": "-124487530175616-15060",
                    "amount": 1,
                    "operation": "add_value",
                    "slot": "hand"
                  }
                ],
                "minecraft:item_name": {
                  "text": "Lucky Coin",
                  "color": "green",
                  "italic": false
                },
                "minecraft:lore": [
                  {
                    "text": "You feel inclined to flip it",
                    "color": "yellow"
                  }
                ]
              }
            }
          ],
          "conditions": [
            {
              "condition": "minecraft:entity_properties",
              "entity": "attacking_player",
              "predicate": {
                "nbt": "{Inventory:[{components:{\"minecraft:custom_data\":{luck:\"tag\"}}}]}"
              }
            }
          ]
        }
      ]
    },
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:item",
          "name": "minecraft:stick",
          "functions": [
            {
              "function": "minecraft:set_custom_data",
              "tag": "{killtrader:tag,del:tag}"
            }
          ]
        }
      ],
      "conditions": [
        {
          "condition": "minecraft:killed_by_player"
        }
      ]
    },
    {
      "rolls": 1,
      "entries": [
        {
          "type": "minecraft:loot_table",
          "value": "survivalplus:trade_hat"
        }
      ],
      "conditions": [
        {
          "condition": "minecraft:random_chance",
          "chance": 0.16
        },
        {
          "condition": "minecraft:entity_properties",
          "entity": "this",
          "predicate": {
            "type": "minecraft:wandering_trader"
          }
        },
        {
          "condition": "minecraft:killed_by_player"
        }
      ]
    }
  ]
}