Topic category: Help with Minecraft modding (Java Edition)
Let's say I want to make a mod where whenever you sell stuff to the villagers, they can use it to expand their villages. I would want them to check for how many beds and work sites are present as well as how much of the materials are present in their inventories. For example. I would want villagers in the morning to check and see how many farms there are compared to the number of villagers in the village. Lets assume that 1 farm can sustain 4 villagers. I would want the villagers to check the village to see how many villagers are present and compare that with how many farm worksites there are. If there were 40 villagers but 2 farm worksite,s they would be able to spawn 8 more farms. After this I would also want them to check to see how many emeralds and building materials are in their inventories. If a farm used a bed. a door, a torch and 125 wooden planks and costs 9 emeralds to build if all these materials are present in their inventory, then they would build a house at the edge of the village, where there would be no wooden plants or pathblocks I would also want them to upgrade their houses too. If the mason were to have 125 stone bricks, a door, a bed, a chest, and 18 emeralds they would build an upgraded version of their house. In the evening I would want them to checks for available beds. If there were less then 10 available beds I would want them to build another house if the materials and emeralds are present. I would want them to check the inventories of chests in their houses and add that to their inventories. Lastly I would want there to be rewards for players who develop the villages. For every villager, a player would get 1 emerald. For every fisherman villager the player could get 1 raw salmon, for every poultry farmer the player could get 1 egg or raw chicken. Maybe expand the reputation whenever you killed a hostile mob in their village or when you build houses for them or repair their buildings. Maybe have a special villager spawn when certain population milestones happen. for example if you have a village of 100 or less an elderman would spawn. After 100 were reached, the village the elderman would become a mayor, then when 1000 was reached the mayor becomes an edler , at 3000 they would become a Ritter, at 5000 a baron, at 10000 a count, and at 25000 a duke, and 50000 an archduke, and 100000 would be a Grand Duke. would there be any ways of achieving this? Basically I want trading with villagers to be more meaningful. when you sell materials to them they should actually do something with those materials. it would also be great to create a banker who when you leave emeralds with them will give interest to you and who can also lend to you and if you do not pay them back will send Iron Golems after you to collect your debt