I am trying to create a golem with a behavior similar to a farmer, everything is working, except that sometimes it gets "stuck". It basically selects one farmland/crop block to go, but stays 1/2 blocks away from it for a few seconds/minutes and if I try to move it it returns to that position. After sometime It selects another block and start working again.
I tried increasing the goal_radius, which seemed to help, but it still happens from time to time. Then I tried removing and adding the component at certain intervals, which "fixed" it except that now it stops farming for sometime.
My question is if there's a way to prevent it from getting "stuck", and if that's not possible I would like to detect when it is "stuck" to remove the component when it happens.