private boolean attemptTrade(List<EntityVillager> villagers, int tradeSet) {
ItemStack buy1 = recipeSlots.getStackInSlot(tradeSet * 3 + 0);
ItemStack buy2 = recipeSlots.getStackInSlot(tradeSet * 3 + 1);
ItemStack sell = recipeSlots.getStackInSlot(tradeSet * 3 + 2);
for (EntityVillager villager : villagers) {
MerchantRecipeList recipes = villager.getRecipes(null);
for (MerchantRecipe recipe : (List<MerchantRecipe>) recipes) {
if (recipe.isRecipeDisabled())
continue;
if (recipe.getItemToBuy() != null && !InvTools.isItemLessThanOrEqualTo(recipe.getItemToBuy(), buy1))
continue;