use of net.minecraft.village.TradeOfferList in project Biome-Makeover by Lemonszz.
the class MushroomVillagerEntity method fillRecipes.
protected void fillRecipes() {
TradeOffers.Factory[] tradesCommon = TRADES.get(1);
TradeOffers.Factory[] tradesRare = TRADES.get(2);
if (tradesCommon != null && tradesRare != null) {
TradeOfferList traderOfferList = this.getOffers();
this.fillRecipesFromPool(traderOfferList, tradesCommon, 5);
int i = this.random.nextInt(tradesRare.length);
TradeOffers.Factory factory = tradesRare[i];
TradeOffer tradeOffer = factory.create(this, this.random);
if (tradeOffer != null) {
traderOfferList.add(tradeOffer);
}
}
}
Aggregations