This has been happening for a long time with my villagers from my in construction Iron Farm, in my villager breeder they breed fine but when I try to breed them in the iron farm (in a capsule) they pick up the food and keep it. The last time they bred it was weeks ago and only has one child. I have 20 beds and 6 villagers. they are in capsules 2 in each.
(Only have a texture pack)
Reproduction:
Make a capsule like this https://www.youtube.com/watch?v=Fn7b7wN_NOc (6.16-7.36)
destroy the walls for 2 villagers to form a 2x2x1 capsule
Place villagers and food and then immediately place the glass on top of them
Expected Results: They should breed
Observed Results:They do nothing
Comments 11
I have a similar issue but my villagers literally just doesn't pick up food. They just don't. So they don't breed at all
My main villagers put the villagers in a composter and they breed so well, I put these villagers in a 2 wide 1 length 2 high
edit: Yeah so the thing is I believe that is a villager can't move it won't breed, I removed the top blocks and the villagers managed to breed
Updated the summary to be more precise. The only way I could reproduce this was to have villagers in a 2-high area with water at their feet. It does not have to be a 1x2x1 cell as I reproduced in a 2x2x1 cell as well. The key is the water and the ceiling.
It looks like what happens is that when villagers are unable to bob upward because of the ceiling their "float" behavior runs constantly and other behaviors cannot run. If you remove the ceiling so they can bob up and out of the water for brief moments, then they try to breed. Most of the breeding attempts fail, probably because both villagers have to be out of the water at just the right moment or else "float" takes precedence over breeding.
I think this is probably working as intended.
In 1.19.71 this only occurs with villagers standing in a 1x2x1 cell with partial blocks like a lower slab or a trapdoor above the their heads. That may be a a result of pathfinding changes that allow pathing behaviors to time out when the goal is not reached due to solid block blockage (the fix to MCPE-49607) and the change that made pathing into partial blocks valid. So if behavior.float is trying to push the villager into the slab or trapdoor above because pathfinding sees that as valid, but it can't because the collision prevents moving into it from the bottom, then the behavior gets stuck just like with trying to walk out of fence gates in MCPE-46805.
How many villagers you have in your iron farm? Villagers only breed when populations is low and have available food and beds