<commit_before>package net.darkmorford.btweagles.villager;

import net.minecraft.entity.IMerchant;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.item.ItemStack;
import net.minecraft.village.MerchantRecipe;
import net.minecraft.village.MerchantRecipeList;

import java.util.Random;

public class VillagerTradeItemForItem implements EntityVillager.ITradeList
{
	private ItemStack buyingItemStack;
	private EntityVillager.PriceInfo buyingPriceInfo;
	private ItemStack sellingItemStack;
	private EntityVillager.PriceInfo sellingPriceInfo;

	public VillagerTradeItemForItem(ItemStack buyingItem, EntityVillager.PriceInfo buyingPrice, ItemStack sellingItem, EntityVillager.PriceInfo sellingPrice)
	{
		this.buyingItemStack = buyingItem;
		this.buyingPriceInfo = buyingPrice;
		this.sellingItemStack = sellingItem;
		this.sellingPriceInfo = sellingPrice;
	}

	@Override
	public void addMerchantRecipe(IMerchant merchant, MerchantRecipeList recipeList, Random random)
	{
		int buyingPrice = this.buyingPriceInfo.getPrice(random);
		int sellingPrice = this.sellingPriceInfo.getPrice(random);

		MerchantRecipe tradeRecipe = new MerchantRecipe(
				new ItemStack(buyingItemStack.getItem(), buyingPrice, buyingItemStack.getMetadata()),
				new ItemStack(sellingItemStack.getItem(), sellingPrice, sellingItemStack.getMetadata()));
		recipeList.add(tradeRecipe);
	}
}
<commit_msg>Support copying item NBT data.<commit_after>package net.darkmorford.btweagles.villager;

import net.minecraft.entity.IMerchant;
import net.minecraft.entity.passive.EntityVillager;
import net.minecraft.item.ItemStack;
import net.minecraft.village.MerchantRecipe;
import net.minecraft.village.MerchantRecipeList;

import java.util.Random;

public class VillagerTradeItemForItem implements EntityVillager.ITradeList
{
	private ItemStack buyingItemStack;
	private EntityVillager.PriceInfo buyingPriceInfo;
	private ItemStack sellingItemStack;
	private EntityVillager.PriceInfo sellingPriceInfo;

	public VillagerTradeItemForItem(ItemStack buyingItem, EntityVillager.PriceInfo buyingPrice, ItemStack sellingItem, EntityVillager.PriceInfo sellingPrice)
	{
		this.buyingItemStack = buyingItem;
		this.buyingPriceInfo = buyingPrice;
		this.sellingItemStack = sellingItem;
		this.sellingPriceInfo = sellingPrice;
	}

	@Override
	public void addMerchantRecipe(IMerchant merchant, MerchantRecipeList recipeList, Random random)
	{
		int buyingPrice = this.buyingPriceInfo.getPrice(random);
		int sellingPrice = this.sellingPriceInfo.getPrice(random);

		MerchantRecipe tradeRecipe = new MerchantRecipe(
				new ItemStack(buyingItemStack.getItem(), buyingPrice, buyingItemStack.getMetadata(), buyingItemStack.getTagCompound()),
				new ItemStack(sellingItemStack.getItem(), sellingPrice, sellingItemStack.getMetadata(), sellingItemStack.getTagCompound()));
		recipeList.add(tradeRecipe);
	}
}

{'fraction_non_alphanumeric': 0.0789839944328462, 'fraction_numerical': 0.0, 'mean_word_length': 7.261494252873563, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4826706', 'n_tokens_mistral': 883, 'n_tokens_neox': 841, 'n_words': 158}