I've modified a 1.15 datapack to work for 1.16 by changing the commands to:
execute as @a[nbt={Inventory:[{Slot: 100b, id: "minecraft:chainmail_boots", Count: 1b}, {Slot: 101b, id: "minecraft:chainmail_leggings", Count: 1b}, {Slot: 102b, id: "minecraft:chainmail_chestplate", Count: 1b}, {Slot: 103b, id: "minecraft:chainmail_helmet", Count: 1b}]}] at @s if entity @e[type=minecraft:bee,limit=1,sort=nearest,nbt=!{AngerTime:0},distance=..1.8] run data remove entity @e[type=minecraft:bee,limit=1,sort=nearest,nbt=!{AngerTime:0}] AngryAt
execute as @a[nbt={Inventory:[{Slot: 100b, id: "minecraft:chainmail_boots", Count: 1b}, {Slot: 101b, id: "minecraft:chainmail_leggings", Count: 1b}, {Slot: 102b, id: "minecraft:chainmail_chestplate", Count: 1b}, {Slot: 103b, id: "minecraft:chainmail_helmet", Count: 1b}]}] at @s if entity @e[type=minecraft:bee,limit=1,sort=nearest,nbt=!{AngerTime:0},distance=..1.8] run data modify entity @e[type=minecraft:bee,limit=1,sort=nearest,nbt=!{AngerTime:0}] AngerTime set value 0
These commands are supposed to make bees forget that they are angry at you when you wear full chainmail armor (an apiary suit). While it does make them "forget", but the bees keep reverting back to their angry state only to be set again causing quirky behaviors of a bee becoming angry, then passive, then angry, over and over again.
Edit: This seems to have been resolved by Prerelease 6. The bees retain their data now. You can close this bug report now.
Linked issues
Comments 5
You can manually reproduce this without the need of the Data Pack by provoking a Bee in Survival (With snowballs from a certain distance is very easy) & then use this command
/data modify entity @e[type=minecraft:bee,limit=1,sort=nearest,nbt=!{AngerTime:0}] AngerTime set value 0
It will say that the values for this entity were successfully modified but the Bee will remain angry.
Can confirm this, I was playing on my survival world yesterday with Voodoo's Apiarist Suit Data Pack when this issue caught me off guard. All bees kept angry until they stung me. I thought the Data Pack wasn’t running correctly, most likely due to an incorrect load, but it kept happening until today I had to check the function and there wasn’t anything invalid with it. Looking at some issues that were introduced with the modifications to anger for neutral mobs like MC-187679