The bug
When baby sheep follow adult sheep it eats grass while walking.
Code analysis here by @unknown
How to reproduce
Summon baby sheep
Summon adult sheep near baby sheep
→ ❌ Baby sheep will start following adult sheep and sometimes will eat grass while walking
Attachments
Comments 6
Based on Mojang's mappings, the class FollowParentGoal
controls the AI for baby animals to follow the nearest adult of the same type. This class needs to call Goal::setFlags
with the value Goal.Flag.MOVE
to prevent other goals that set this flag from executing.
Confirmed for 1.16 rc-1