Skip to content

Villager Trades

satisfy edited this page Oct 9, 2026 · 1 revision

Villager trades (net.satisfy.foundation.trade)

Ready-made trade listings for selling items for emeralds and buying items for one emerald. Since Foundation 1.0.5.

Class Villager gives Player pays
SellItemFactory(item, price, count, experience) count × item price emeralds
SellItemFactory(item, price, count, maxUses, experience) as above, with your own max uses (default 12)
SellItemFactory(stack, price, count, maxUses, experience, multiplier) the stack with all its data
BuyForOneEmeraldFactory(item, price, maxUses, experience) 1 emerald price × item

item can be any item or block. The price multiplier defaults to 0.05.

Fabric

TradeOfferHelper.registerVillagerOffers(CHEESEMAKER, 1, factories -> factories.add(new SellItemFactory(ModItems.CHEESE.get(), 3, 1, 5)));

NeoForge

@SubscribeEvent
public static void onVillagerTrades(VillagerTradesEvent event) {
    if (event.getType() == CHEESEMAKER.get()) {
        event.getTrades().get(1).add(new BuyForOneEmeraldFactory(Items.MILK_BUCKET, 2, 12, 5));
    }
}

Clone this wiki locally