-
Bug
-
Resolution: Fixed
-
Minecraft 17w49b, Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w02a, Minecraft 18w03b, Minecraft 18w05a, Minecraft 18w06a, Minecraft 18w07c, Minecraft 18w08b, Minecraft 18w09a, Minecraft 18w10b, Minecraft 18w10d, Minecraft 18w11a, Minecraft 18w14a
-
Confirmed
The bug
Villagers are not breeding in test where houses are at same level as villagers. Created 20 houses around two villagers, made them willing by trading and stacks of bread, but they do not breed any villagers after a long test period. Villagers do not seem to be recognizing houses in generated villages at night as well. They do trade food. Observed a villager running away from a village with doors at night being chased by two zombies.
Workaround
For the time being, a possible (but probably annoying) work-around would be to ensure the villagers are 4 blocks below and 16 blocks in the negative X and Z directions from a door in order to create a village at the proper location.
Code analysis
By Skylinerw
Villages are created successfully, but are immediately destroyed because the center of the village is much further than the valid door. Using MCP 1.12 for names, and having modded a decompiled 18w05a to ensure it works, this appears to be a one line fix.
In 1.12.2, net.minecraft.village.VillageCollection.addDoorsAround(BlockPos central) creates immutable BlockPos objects for the positions around the villager's location where it should search for doors.
Now in 1.13, it uses net.minecraft.util.math.BlockPos.getAllInBoxMutable(int, int, int, int, int, int), which for all intents and purposes does the same thing except that it uses a single mutable BlockPos whose coordinates are changed when the next item is requested from the iterator. The loop finds the door correctly, but stores the mutable position in a list of doors to be added later to the village (call to VillageCollection.addToNewDoorsList(BlockPos)). Instead an immutable copy of the position should be passed to addToNewDoorsList since otherwise the found door positions change once the next positions are requested from the iterator resulting in all doors "found" at the last search position and therefore being removed from the village since there is (most of the times) no door.
Mappings
MCP name | 18w06a name | 18w06a MCP equivalent name |
---|---|---|
VillageCollection.addDoorsAround(BlockPos) |
afr.b(ec) |
see MCP name |
VillageCollection.addToNewDoorsList(BlockPos) |
afr.a(bfj, ec) |
VillageCollection.addToNewDoorsList(IBlockState, BlockPos) |
- is duplicated by
-
MC-123108 Villagers don't want to breed
- Resolved
-
MC-123171 Villagers not breeding or collecting dropped crops.
- Resolved
-
MC-123348 Villager AI is broken
- Resolved
-
MC-124066 Villagers not breeding 18w01a
- Resolved
-
MC-124290 Villagers Not Hiding In Houses
- Resolved
-
MC-124392 Villager AI broken
- Resolved
-
MC-124464 Village creation broken
- Resolved
-
MC-125792 Villager mating seems to be broken
- Resolved
-
MC-126247 Villagers Don't Breed
- Resolved
-
MC-126477 Viilagers have broken behavior
- Resolved
-
MC-126750 Villager's don't get 'willing' to breed
- Resolved
-
MC-126840 18w10b villagers will not breed/see door
- Resolved
-
MC-126849 Villagers / Iron Golem
- Resolved
-
MC-127349 Villagers not breeding in the new snapshots
- Resolved
-
MC-127353 Villagers Dont Like Houses
- Resolved
-
MC-127484 18w11a Villagers don'r breed. Golems do not spawn
- Resolved
-
MC-127512 Villagers do not go home at night
- Resolved
-
MC-127549 Villagers are not breeding
- Resolved
-
MC-127761 Villagers are not returning to houses at night
- Resolved
-
MC-127801 Villagers don't seem to be breeding
- Resolved
-
MC-127950 Villager AI is broken. They leave the village, wander around at night.
- Resolved
-
MC-127956 Village judgment
- Resolved
-
MC-128015 New villages are not being created correctly
- Resolved
-
MC-128055 Aldeoes nao se reproduzem
- Resolved
-
MC-128061 villager
- Resolved
-
MC-128222 Villagers showing erratic behaviour / moving away from village
- Resolved
-
MC-128611 No Villager Breeding
- Resolved
- relates to
-
MC-12675 Villagers stay outside at night
- Resolved
-
MC-122308 Zombies can no longer break wooden doors
- Resolved
-
MC-122369 Village center is offset
- Resolved
-
MC-122538 Iron Golems no longer spawn
- Resolved
-
MC-131029 Villager door detection range has changed
- Resolved
-
MCPE-23379 Villagers don't breed but all conditions are met
- Resolved