As far as I can tell this is new and not a duplicate of MC-152057, although very similar to MC-154244.
I have been playing on this server, which I host, for some time and have built a large artificial village with about 50 villagers. This was built not long after the 1.14 update and I have had no problems up until a few days ago. Seemingly out of nowhere, about half of the iron golems in the village became aggressive. Even though I tried a number of things that are supposed to raise my reputation with the village none of them have worked.
Here's a list of the things I have tried:
Giving myself the Hero of the Village effect through /effect give @s minecraft:hero_of_the_village
Giving myself Bad Omen through {{/effect give @s minecraft:bad_omen }}then completing the raid. I did this once by myself and once with{{ /kill}}
Getting Bad Omen II naturally by killing naturally spawning pillager patrols and completing the raid myself
Curing a zombie villager within the village
Building a new iron golem within the village
Buying the last trade slot of master rank villagers 30+ times
Giving the villagers multiple stacks of bread
Dying to the iron golems several times
Waiting 20 in game days
After none of these things worked I also attempted to kill all of the iron golems with {{/kill @e[type=minecraft:iron_golem] }}After this, every iron golem in the village turned aggressive. I also attempted to bring all iron golems out of range of the village with {{/tp @e[type=iron_golem, distance=..100] @s }}New golems spawned and they were still aggressive.
Villagers' trades are overpriced even while Hero of the Village is active by up to 3000% (1 emerald up to 30 for a stone pickaxe).
Duplicate of MC-153921