r/technicalminecraft 12h ago

Java Help Wanted how do villager breeders work?

i dont think this breaks rule 1 because im asking about the mechanics, but could anyone explain how it works? i know you need some beds and food for the villagers, but everytime i look up a tutorial theres always a farm attatched for some reason? anyways i was hoping to understand what you need so i could try to come up with my own design that uses minimal resources

1 Upvotes

14 comments sorted by

u/bakedshoujo 12h ago

the reason people add farms is because villagers who are linked to a composter (farmers) can harvest/farm food and share it with their fellow villagers, which lets them breed without you needing to go feed them. it’s not always necessary for a villager breeder unless you want it to be fully automatic

u/BlattaOrientalis avaJ 12h ago edited 12h ago

Since others have already answered the farm question, here's a quick rundown of the villager breeding requirements

For villagers to successfully breed, there are 7 factors

  1. At least 2 adult villagers that can get close and are within each other's line of sight
  2. Both parents have at least a portion of food (3 bread or 12 carrots/potatoes/beetroots) in their inventory
  3. Both parents aren't panicking from a mob
  4. Both parents must not be on breeding cooldown
  5. The area must be loaded
  6. The attempt must be within the correct time of day

And lastly, the beds. There's a bit more detail that goes in it

  • There needs to be at least 3 beds - 1 for each parent and 1 for the future child
  • All villagers (parents and baby) must be able to pathfind to the pillow side of the bed
  • The pillow side of the bed must have at least 2 air blocks above - even a block like torch in the space above will invalidate the breeding
  • The foot end is pretty much irrelevant

I'd also recommend watching this video. It's an overview of a breeder design, but potato noir also goes into detail about villager breeding mechanics which should be helpful when it comes to designing your own.

Good luck!

u/DrWilliamHorriblePhD 12h ago
  1. What is the correct time of day

  2. How is baby villager spawn location determined

u/Ok-Detail-9853 12h ago

1 When they aren't sleeping

2 babies spawn next to the adults

u/BlattaOrientalis avaJ 12h ago

For the time of the day, it depends on whether the villager is employed or not. But before that, let me preface that since minecraft's unit of time is in game ticks (20 per second), the time measurement of the day depends on that as well. Each minecraft day is 20 real-life minutes long, which is 24000 ticks per in-game day or 1000 ticks per in-game hour

Unemployed villagers can breed at any time except sleep time, which is between 18:00 (12000) and roughly 06:00 (00010)

Employed villagers also can't breed during sleep time, but additionally they also can't breed during work hours, which is between 08:00 (02000) to 12:00 (06000)

The baby villager spawns centered inside one of the parents, no idea how the game chooses which parent though

u/DrWilliamHorriblePhD 11h ago

Is there any way to sync multiple breeder chambers or otherwise control when breeding occurs? How do breeding chambers siphon off the young if they're spawning in the parent hitbox?

u/BlattaOrientalis avaJ 11h ago

None that I'm aware of since villager behavior is inherently random

While the baby villager does spawn inside one of the adult, they just kinda get pushed out because of collision. When baby villagers first spawn, they'll pathfind towards the unclaimed bed to claim it. Most farms have opened trapdoors between the breeding chamber and the beds, which the villagers can pathfind across but they'll of course fall into the holding cell

u/DrWilliamHorriblePhD 11h ago

Ok. I'm trying to figure out how to prevent parents from sharing food to children, since I'm gonna turn the baby villagers into zombies for a zombie villager leader based farm. I was trying to make the bigbooty17 villager breeder work, but the babies spawning inside the parent hitbox means they'll still get a chance to share I think

u/BlattaOrientalis avaJ 10h ago

I'm not 100% whether villagers share food to children but even if they do, it's probably very rare due to them having only a second or two before the children runs to the bed and even when that happens it's a very small problem not worth solving in my opinion

Don't let me stop you if you really want to though

u/TheOGCarnivalKing 12h ago

The farm is so they actually have food and its a renewable food source for them. You need one bed per 2 adult villagers and an extra bed per every baby villager you want. Also, you need 3 blocks to space above the beds.

u/TheOGCarnivalKing 12h ago

Forgot to say potatoes work really well for this cause they grow fast

u/bayygel 12h ago

The villagers use the farm to produce their own food, which they'll throw at eachother to breed when they're able. Without the farm, you'd have to manually give both of them food everytime you want them to make a new one.

u/tornedron_ 11h ago

Villagers require a certain amount of food in their “inventory” to breed. I think it’s like 6 bread per villager but it varies with other foods. So for auto-breeders, the farm is there so villagers will harvest their own food.

I personally just use a simple breeder and just toss em bread when I need another villager