Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-74407

Villager inventories can get into a state where villagers cannot do anything useful

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: Minecraft 1.8, Minecraft 1.8.1-pre4, Minecraft 1.12.2, Minecraft 18w21a, Minecraft 1.13.2, Minecraft 19w08b, Minecraft 19w09a, Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 4, Minecraft 1.14 Pre-Release 5, Minecraft 1.14, Minecraft 1.14.1, Minecraft 1.14.2 Pre-Release 1, Minecraft 1.14.2 Pre-Release 2, Minecraft 1.14.2
    • Confirmation Status:
      Confirmed
    • Category:
      (Unassigned)

      Description

      While the corruption in MC-48735 is now fixed, it is still possible for villager inventories to get into states where the villagers cannot breed on their own. It's also possible, if unlikely, for farmers to be unable to plant.

      • Non-farmers can pick up seeds but can never get rid of them.
      • Villagers can never empty a slot of wheat, because they'll only throw half of what they have as bread.
      • Villagers cannot craft bread for their own use, only to throw.
      • Non-farmers won't even consider wheat when deciding if they have enough food to throw.
      • A villager can easily have enough food to be able to breed several times, but will think he doesn't because it's spread over several inventory slots (e.g. 11 carrots in each slot).

      Due to these issues, if a village is set up with wheat farms it's fairly easy for non-Farmer villagers to get into a state where they cannot pick up any food and therefore cannot breed without players constantly trading. Since wheat plants on average drop more seeds than are needed for replanting, it's easy enough for farmers to get into a similar situation. Farmers being unable to plant is less likely, but still possible if he can manage to get all slots filled with wheat (and/or with bread in a well-defended village at the population cap).

      Ideally, non-farmers would throw their seeds to farmers who have space for them, and all villagers would combine inventory slots and would throw out something they have multiple stacks of in favor of something they don't have (e.g. toss out one of 5 stacks of seeds to pick up carrots) (even more interesting would be to stick the extra stuff in a chest, and for a villager needing stuff to get it out of the chest, but that's getting off topic).

      As for wheat, all villagers with the ability to craft bread (currently all of them) should do so for their own use instead of only for sharing, and all (not just farmers) should count wheat when checking for "do I have enough food?". If any villagers wind up without the ability to craft bread, they should give any wheat they have to someone who does and who has the inventory space.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hkniberg [Mojang] Henrik Kniberg
                Reporter:
                anomie x Anomie X
              • Votes:
                23 Vote for this issue
                Watchers:
                14 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  CHK: