https://github.com/Insane96/MobsPropertiesRandomness/blob/1.20.1/changelog.md
set_component item function
{
"property": "equipment",
"slot": "offhand",
"items": [
{
"item": "minecraft:iron_ingot",
"functions": [
{
"function": "set_component",
"components": {
"minecraft:food": {
"nutrition": {"#range": {"min": 2, "max": 6}},
"saturation": {"#range": 0.5}
},
"minecraft:tool": {
"rules": [
{
"blocks": "#mineable/pickaxe",
"speed": 6,
"correct_for_drops": true
}
]
},
"minecraft:max_damage": 453,
"minecraft:damage": 0
}
},
{
"function": "set_drop_chance",
"drop_chance": 2
}
]
}
]
}
Ported to 1.21.1
Mod support will be added back in the future. Let's see how this goes first.
I've also updated the Example Data Pack which was broken in 1.20.1 too.
The only difference between 1.20.1 and 1.21.1 are attribute modifier operations.
https://github.com/Insane96/MobsPropertiesRandomness/blob/1.20.1/changelog.md
set_component item function
{
"property": "equipment",
"slot": "offhand",
"items": [
{
"item": "minecraft:iron_ingot",
"functions": [
{
"function": "set_component",
"components": {
"minecraft:food": {
"nutrition": {"#range": {"min": 2, "max": 6}},
"saturation": {"#range": 0.5}
},
"minecraft:tool": {
"rules": [
{
"blocks": "#mineable/pickaxe",
"speed": 6,
"correct_for_drops": true
}
]
},
"minecraft:max_damage": 453,
"minecraft:damage": 0
}
},
{
"function": "set_drop_chance",
"drop_chance": 2
}
]
}
]
}
Ported to 1.21.1
Mod support will be added back in the future. Let's see how this goes first.
I've also updated the Example Data Pack which was broken in 1.20.1 too.
The only difference between 1.20.1 and 1.21.1 are attribute modifier operations.
set_component item function
{
"property": "equipment",
"slot": "offhand",
"items": [
{
"item": "minecraft:iron_ingot",
"functions": [
{
"function": "set_component",
"components": {
"minecraft:food": {
"nutrition": {"#range": {"min": 2, "max": 6}},
"saturation": {"#range": 0.5}
},
"minecraft:tool": {
"rules": [
{
"blocks": "#mineable/pickaxe",
"speed": 6,
"correct_for_drops": true
}
]
},
"minecraft:max_damage": 453,
"minecraft:damage": 0
}
},
{
"function": "set_drop_chance",
"drop_chance": 2
}
]
}
]
}
Ported to 1.21.1
Mod support will be added back in the future. Let's see how this goes first.
I've also updated the Example Data Pack which was broken in 1.20.1 too.
The only difference between 1.20.1 and 1.21.1 are attribute modifier operations.

Randomize mobs properties. Add Potion Effects, Equipment, on hit effects and more!