mojira.dev
MC-74407

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

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.

Linked issues

Attachments

Comments 17

How about that villagers have different slots for different stuff (ie: farmer villagers would have 3 slots for wheat and only those 3 slots)

James... Dedicated slots is a good idea, but as there is only 8, it may limit other posibilities in the future. Better for villagers to have a little more inventory management smarts, which is what this bug is really about.

Basically villagers need to merge slots, and limit the maximum amount of seeds they pick up. Also only farmers should actually be able to pick up seeds and wheat, which I thought (from the previous corrupt inventory bug) is what happened.

Farmers being able to craft bread for their own use, and then throw excess bread would also make a lot more sense than throwing wheat that turns into bread as part of the throw. It would however mean that farmers given lots of wheat to fill inventory slots, will instead fill one slot, then have the other slots filled with bread. It would mean more wheat would be needed to 'initialise' the farmer, and they would have enough food they they would not be interested in harvesting more wheat. Thus break some of the current wheat farmer, or bonemeal to wheat auto-farms they currently exist.

One thing. Farmers buying wheat (which essentially disappears rather then being used) to me makes no sense, when they have a full inventory of wheat. But it does help game play.

Villagers can and do merge slots. Whether this is only done on load or not is another bug report.

If Farmers that had a full inventory of wheat could not buy wheat you would open a can of worms of issues. Because then people would expect wheat you sell to go to their inventory, then it would be reclaimable, then everyone would have infinite emeralds.

Slot management is sorely needed. Sharing by 12's/3's would also be good rather than half of whatever the villager has on them.

I think all the proposed solutions are good.

Villagers should have some dedicated slots (not all the slots, as arguments had been clearly presented against that.)

Passing items between villagers might be a good idea.

Also, having some sort of community inventory to move things they don't need anymore too might be nice.

Overflow dumping may also be needed.

is this still an issue in 1.8.8/15w31b?

7 more comments

Still in 1.14.1 Release

Still in 1.14.2 Pre-Release 1 and 1.14.2 Pre-Release 2

quote Anomie X:  "all villagers with the ability to craft bread (currently all of them) should do so for their own use instead of only for sharing,"

 

yes I agree that own use + also sharing is OK, but must still be able to share to others also, otherwise will break many bread farms that players have created that depend on the farmer villager sharing the bread. So a NO for crafting for own use only. 

 

(I think this is what Anomie was already saying but not 100% sure?)

This bug was not fixed in 1.14.3 pre-1, or it was broken again in the official release of 1.14.3. I noticed my non-farmer villagers picking up seeds. I've also witnessed farmers tossing seeds at other villagers.

I think with the torchflower seeds and the pitcher plant seeds, this issue is again there. These seeds aren't turned into compost like the other seeds

Anomie X

migrated

Confirmed

(Unassigned)

inventory, villager

Minecraft 1.8, Minecraft 1.8.1-pre4, Minecraft 1.12.2, Minecraft 18w21a, Minecraft 1.13.2, ..., 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

Minecraft 1.14.3 Pre-Release 1

Retrieved