Search in sources :

Example 21 with MerchantRecipe

use of net.minecraft.village.MerchantRecipe in project MineFactoryReloaded by powercrystals.

the class VillageTradeHandler method manipulateTradesForVillager.

@SuppressWarnings("unchecked")
@Override
public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) {
    recipeList.add(new MerchantRecipe(new ItemStack(Item.emerald, 1), new ItemStack(MineFactoryReloadedCore.safariNetSingleItem)));
    recipeList.add(new MerchantRecipe(new ItemStack(Item.emerald, 3), new ItemStack(MineFactoryReloadedCore.safariNetItem)));
    recipeList.add(new MerchantRecipe(new ItemStack(Item.emerald, 1), new ItemStack(MineFactoryReloadedCore.safariNetSingleItem), getHiddenNetStack()));
    recipeList.add(new MerchantRecipe(new ItemStack(Item.emerald, 1), new ItemStack(Block.sapling, 8, 0), new ItemStack(MineFactoryReloadedCore.rubberSaplingBlock, 8, 0)));
}
Also used : MerchantRecipe(net.minecraft.village.MerchantRecipe) ItemStack(net.minecraft.item.ItemStack)

Aggregations

MerchantRecipe (net.minecraft.village.MerchantRecipe)21 ItemStack (net.minecraft.item.ItemStack)14 EntityVillager (net.minecraft.entity.passive.EntityVillager)7 MerchantRecipeList (net.minecraft.village.MerchantRecipeList)7 TradeOffer (org.spongepowered.api.item.merchant.TradeOffer)7 PotionEffect (net.minecraft.potion.PotionEffect)3 Enchantment (net.minecraft.enchantment.Enchantment)2 EnchantmentData (net.minecraft.enchantment.EnchantmentData)2 BlockPos (net.minecraft.util.math.BlockPos)2 WorldServer (net.minecraft.world.WorldServer)2 FluidStack (net.minecraftforge.fluids.FluidStack)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 IPneumaticRecipeRegistry (me.desht.pneumaticcraft.api.recipe.IPneumaticRecipeRegistry)1 EntityPlayer (net.minecraft.entity.player.EntityPlayer)1 ItemEnchantedBook (net.minecraft.item.ItemEnchantedBook)1 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)1 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1 ItemStack (org.spongepowered.api.item.inventory.ItemStack)1 IPneumaticRecipeRegistry (pneumaticCraft.api.recipe.IPneumaticRecipeRegistry)1