Hello, im trying to make a recipe thad can add a Cusstome date to any armor but i cant find out how to to thad, as of now i can only register every single armor piecen manually
This is my current code
const ARMOR_PIECES = [
// Leather
'minecraft:leather_helmet',
'minecraft:leather_chestplate',
'minecraft:leather_leggings',
'minecraft:leather_boots',
// Chainmail
'minecraft:chainmail_helmet',
'minecraft:chainmail_chestplate',
'minecraft:chainmail_leggings',
'minecraft:chainmail_boots',
// Iron
'minecraft:iron_helmet',
'minecraft:iron_chestplate',
'minecraft:iron_leggings',
'minecraft:iron_boots',
// Gold
'minecraft:golden_helmet',
'minecraft:golden_chestplate',
'minecraft:golden_leggings',
'minecraft:golden_boots',
// Diamond
'minecraft:diamond_helmet',
'minecraft:diamond_chestplate',
'minecraft:diamond_leggings',
'minecraft:diamond_boots',
// Netherite
'minecraft:netherite_helmet',
'minecraft:netherite_chestplate',
'minecraft:netherite_leggings',
'minecraft:netherite_boots',
// Special
'minecraft:turtle_helmet',
]
ARMOR_PIECES.forEach(armorId => {
event.shapeless(
// Output: armor with Data Component tag (1.21.1 syntax, NOT withNBT)
`${armorId}[minecraft:custom_data={diamond_infused:1b}]`,
// Inputs: plain armor + diamond
[armorId, 'minecraft:diamond']
)
})