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

Farmers' inventory gets corrupted by wheat and they become unable to plant crops

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Minecraft 14w21b
    • None
    • Windows 7 x86 - Java 32 bit 7r51
    • Unconfirmed
    • Creative

      This is the same problem as MC-48735 that was reported to have been fixed in 14w21b, however, the same bug still exists.

      A simple way to replicate the problem:

      Create three villages - each with farmland extending 35 blocks from center.

      Make the village center building two levels - one on the ground and one below ground. Put some doors on the top level and some on the second level (the one below ground). It should be 1 block below the top level and have a set of stairs so the villagers can go up and down. Mine has a building 5 doors x 3 doors on the top and two sets of 15 doors each on the underground level. Use glass so that the doors get access to sunlight.

      On the top of the roof create a set of cells 2 blocks high and one block wide so that you can populate each cell with one villager - this lets you select which ones to keep. It should resemble a checkerboard pattern so that the villagers cannot jump down to the ground. Fill each cell with a single villager until you get 2 farmers and one random one. Kill off the rest so you are only left with those 3.

      Give one set of farmers 128 carrots, one set 128 potatoes, and the other set 128 seeds. Split them up so that each farmer gets 64 units. It is important to segregate the crops so that each village only plants one crop.

      After this destroy the cells and let the villagers in each village do their own thing (you might have to push them off the roof - LOL).

      You should eventually have something resembling the images - at first all three villages will plant their crops in circles matching the village radius (the wheat farm will never look as good as the others since the farmers get corrupted quickly), but, given enough time the village that had the wheat will harvest all the wheat and will not plant anything in return and the population will stop growing. By giving birth to new farmers the wheat village grows for a short time when the world is started but eventually the seeds get picked up by the corrupt farmers and they won't replant - thus with enough time the farms are totally wiped out and you are left with totally blank farmland around the wheat village. The other two villages will harvest, plant, and keep growing in population and maintain their perfect crop circles.

      At the completion of my testing the village with the wheat had far less villagers than the village with carrots or potatoes - clearly something is wrong with how the farmers handle the wheat, bread, and seeds. If not enough farmers are born to replace the corrupted ones then the village with the wheat stops reproducing and eventually could get wiped out by a zombie siege.

      I believe what happens here is because the farmers with wheat have to juggle three items (bread, wheat, and seeds) the inventory gets corrupted so they cannot plant any longer. Perhaps seeds should be given a priority over bread and wheat. When villagers are born they have nothing in their inventory and nothing filling their inventory slots - as they farm or receive food from farmers the slots fill up and fill with inventory. Eventually some of the slots empty but don't free up - so a farmer with 8 empty slots of "potato" isn't able to get carrots or other items, and, a farmer with 8 empty slots of "wheat" cannot pick up seeds - thus he will harvest but not replant.

      For some reason this only affects wheat - if farmers only have potatoes and/or carrots it doesn't jam them up and make them totally useless.

      Again - just like the bug I reported before, but, unfortunately hasn't been fixed.

      Update: I added some of the analysis from NBT Explorer on the farmers in the dead village - all farmers have 8 slots each that are mostly empty - but all slots are labeled as wheat or bread. I think the problem is that since wheat and bread cannot be planted the inventory doesn't free up the slot the same way it would with seeds. After all - seeds, potatoes, and carrots can be planted.

      I think the solution is having the AI empty the slot when bread = 0. Otherwise all the farmers end up getting 6 or more slots in their inventory where bread = 0 and this prevents them from picking up seeds to replant.

        1. 2014-05-26_00.00.03.png
          2014-05-26_00.00.03.png
          1.59 MB
        2. 2014-05-26_00.31.13.png
          2014-05-26_00.31.13.png
          1.34 MB
        3. 2014-05-26_13.01.33.png
          2014-05-26_13.01.33.png
          1.78 MB
        4. 2014-05-26_15.36.14.png
          2014-05-26_15.36.14.png
          1.17 MB
        5. 2014-05-28_06.18.12.png
          2014-05-28_06.18.12.png
          2.05 MB
        6. Jammed.jpg
          Jammed.jpg
          489 kB

            Unassigned Unassigned
            hardcorerobot Patrick Callahan
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: