Making piglins drop arrows on death if they are holding a crossbow
Would this work?
"type": "minecraft:entity", "pools": [ { "bonus_rolls": 0, "entries": [ { "type": "minecraft:item", "functions": [ { "count": { "type": "minecraft:uniform", "max": 2, "min": 0 }, "function": "minecraft:set_count" }, { "count": { "type": "minecraft:uniform", "max": 1, "min": 0 }, "enchantment": "minecraft:looting", "function": "minecraft:enchanted_count_increase" } ], "name": "minecraft:arrow", "conditions": [ { "condition": "minecraft:entity_properties", "entity": "this", "predicate": { "equipment": { "mainhand": { "items": "minecraft:crossbow" } } } } ] } ], "rolls": 1 } ], "random_sequence": "minecraft:entities/pigin" }```