The bug
Llamas, unlike horses, can be kept feeding hay bales even if in love mode.
How to reproduce
Spawn in a single llama
Tame said llama
/gamemode survival/give @p hay_block 64Give llama a hay bale to bring it to love mode
While in love mode, keep feeding the hay blocks. This has no effect on llama, but removes items from players inventory.
Repeat with a horse and golden carrots. Horse while in love mode will refuse taking more golden carrots from the player until it successfully breeds, or time outs from the love mode.
Suggested fix attached. The problem is that llamas and AbstractHorse behaviour with food and mating is different and llama's code is missing one statement (see highlighted added case in the files). Replicating horse code makes both behaviours equivalent therefore consistent.