Skip to content

Easy Villagers

Picture

Easy villagers

Easy Villagers is a mod that simplifies villager trading a lot and provides the ability to automatically trade with them.

Supported versions

Forge: 1.19.4, 1.20.x

Trader

Since trader doesn't allow automated villager trading, the integration will not break this approach, but instead, it allows you to observe information about offers and the level of villager inside the trading machine.

Peripheral methods

Function Returns Description
hasVillager() boolean Returns true if villager inside trader, false otherwise
inspect() table or nil Returns information about villager inside trader or nil if a villager is not present
Inspect example
{
   "type":"Villager",
   "name":"Villager",
   "category":"CREATURE",
   "id":448,
   "tags":{},
   "uuid":"1816f543-4fc5-47c6-bf37-8d27451df116",
   "offers":[
      {
         "inputs":[
            {
               "name":"Emerald",
               "maxStackSize":64,
               "tags":[
                  "c:emeralds",
                  "minecraft:beacon_payment_items"
               ],
               "technicalName":"minecraft:emerald",
               "count":1
            }
         ],
         "outputs":[
            {
               "name":"White Dye",
               "maxStackSize":64,
               "tags":[
                  "c:dyes",
                  "c:white_dyes"
               ],
               "technicalName":"minecraft:white_dye",
               "count":3
            }
         ]
      },
      {
         "inputs":[
            {
               "name":"Emerald",
               "maxStackSize":64,
               "tags":[
                  "c:emeralds",
                  "minecraft:beacon_payment_items"
               ],
               "technicalName":"minecraft:emerald",
               "count":5
            }
         ],
         "outputs":[
            {
               "name":"Nautilus Shell",
               "maxStackSize":64,
               "tags":{

               },
               "technicalName":"minecraft:nautilus_shell",
               "count":1
            }
         ]
      },
      {
         "inputs":[
            {
               "name":"Emerald",
               "maxStackSize":64,
               "tags":[
                  "c:emeralds",
                  "minecraft:beacon_payment_items"
               ],
               "technicalName":"minecraft:emerald",
               "count":1
            }
         ],
         "outputs":[
            {
               "name":"Wheat Seeds",
               "maxStackSize":64,
               "tags":{

               },
               "technicalName":"minecraft:wheat_seeds",
               "count":1
            }
         ]
      },
      {
         "inputs":[
            {
               "name":"Emerald",
               "maxStackSize":64,
               "tags":[
                  "c:emeralds",
                  "minecraft:beacon_payment_items"
               ],
               "technicalName":"minecraft:emerald",
               "count":1
            }
         ],
         "outputs":[
            {
               "name":"Purple Dye",
               "maxStackSize":64,
               "tags":[
                  "c:dyes",
                  "c:purple_dyes"
               ],
               "technicalName":"minecraft:purple_dye",
               "count":3
            }
         ]
      },
      {
         "inputs":[
            {
               "name":"Emerald",
               "maxStackSize":64,
               "tags":[
                  "c:emeralds",
                  "minecraft:beacon_payment_items"
               ],
               "technicalName":"minecraft:emerald",
               "count":1
            }
         ],
         "outputs":[
            {
               "name":"Light Blue Dye",
               "maxStackSize":64,
               "tags":[
                  "c:light_blue_dyes",
                  "c:dyes"
               ],
               "technicalName":"minecraft:light_blue_dye",
               "count":3
            }
         ]
      },
      {
         "inputs":[
            {
               "name":"Emerald",
               "maxStackSize":64,
               "tags":[
                  "c:emeralds",
                  "minecraft:beacon_payment_items"
               ],
               "technicalName":"minecraft:emerald",
               "count":3
            }
         ],
         "outputs":[
            {
               "name":"Podzol",
               "maxStackSize":64,
               "tags":[
                  "minecraft:dirt"
               ],
               "technicalName":"minecraft:podzol",
               "count":3
            }
         ]
      }
   ]
}

Auto trader

The auto trader provides the same methods are trader does, but also it allows you to access internal storage via inventory API and configure selected trade.

Peripheral methods

Function Returns Description
getSelectedOffer() number Returns index of selected offer
setSelectedOffer(index: number) Result Tries to change selected offer to new index