register Villager Offers
static void registerVillagerOffers(VillagerProfession profession, int level, Consumer<List<TradeOffers.Factory>> factories)
Content copied to clipboard
Registers trade offer factories for use by villagers.
Below is an example, of registering a trade off factory to be added a blacksmith with a profession level of 3:
TradeOfferHelper.registerVillagerOffers(VillagerProfession.BLACKSMITH, 3, factories -> {
factories.add(new CustomTradeFactory(...);
});
Parameters
profession
the villager profession to assign the trades to
level
the profession level the villager must be to offer the trades
factories
a consumer to provide the factories
Sources
jvm source
Link copied to clipboard