Farmers Baking Bread #19


  • New
  • Enhancment
Open
Assigned to _ForgeUser8897699
  • Xanadar created this issue Oct 1, 2012

    If you right click on a farmer with a piece of bread, it would toggle him to create bread if he has wheat in a nearby chest and a crafting table to make it with. Much like how librarians make books. This would make it possible for a farmer to farm the crops, store the wheat and make the bread.

    Could also look at other foods for him to cook, requiring an "oven". Such as fish and meats, also potatoes soon, or you could leave that to the butcher to cook after collecting meats.

  • Xanadar added the tags New Enhancment Oct 1, 2012
  • _ForgeUser8897699 posted a comment Oct 2, 2012

    Nice idea. I wish I could have an official API to control those villagers (to be able to fish, for example).

    I'll brainstorm on how to make this and keep you informed in the next days. There's some possible issues about resource conflicts.

    Thank you for the suggestion.

  • Xanadar posted a comment Oct 3, 2012

    Thanks! I know you are busy in a good way, but looking for suggestions and such so I will keep them coming as I think of them!

    Also, you could call the farmer a "baker" I suppose, for the bread or a "cook", much like how you have the farmer as a lumberjack if he is given an axe and saplings!

  • _ForgeUser8897699 posted a comment Oct 10, 2012

    I've checked my plugin. There's an uniformisation to make in order to ease the development of such "behavior". Blacksmiths have a similar beahvior, taking ores from chests to melt them in furnaces and put them back into nearby chests.

    By now, there's the following processes:

    • Check nearby chest -> Gather resources from chest.
    • Check nearby blocks -> Use stored resources to modify block state -> Collect new resources.
    • Check nearby furnaces -> Get result as resources -> Smelt stored resources.
    • Check nearby entites -> Alter entites parameters (stored resources as payload).

    But those processes are somewhat replicated/specialized for each profession. If I code an "engine", it would be possible to fully customize the behavior of each profession/sub-profession using a simple XML file (for example). This would implies less code, and thus, less potential bugs/maintenance effort/testing effort.

    I wish i've had time to do this !


To post a comment, please login or register a new account.