Java Code Examples for net.minecraft.village.MerchantRecipeList#add()
The following examples show how to use
net.minecraft.village.MerchantRecipeList#add() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VillagerHereticManager.java From ForbiddenMagic with Do What The F*ck You Want To Public License | 5 votes |
public void manipulateTradesForVillager(EntityVillager villager, MerchantRecipeList recipeList, Random random) { if(villager.getProfession() == Config.hereticID) { /*recipeList.add(new MerchantRecipe(new ItemStack(ConfigItems.itemResource, 20 + random.nextInt(3), 18), new ItemStack(Items.emerald))); recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald), new ItemStack(ConfigItems.itemResource, 1, 9))); recipeList.add(new MerchantRecipe(new ItemStack(ConfigItems.itemResource, 4 + random.nextInt(3), 3), new ItemStack(Items.emerald))); recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald), new ItemStack(ConfigItems.itemResource, 1, 0))); recipeList.add(new MerchantRecipe(new ItemStack(ConfigItems.itemResource, 4 + random.nextInt(3), 6), new ItemStack(Items.emerald))); recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald), new ItemStack(ConfigItems.itemResource, 1, 1))); recipeList.add(new MerchantRecipe(new ItemStack(ConfigItems.itemNuggetChicken, 24 + random.nextInt(8), 0), new ItemStack(Items.emerald))); recipeList.add(new MerchantRecipe(new ItemStack(Items.book, 4 + random.nextInt(3), 0), new ItemStack(ConfigItems.itemResource, 1, 9))); recipeList.add(new MerchantRecipe(new ItemStack(ConfigItems.itemNuggetBeef, 24 + random.nextInt(8), 0), new ItemStack(Items.emerald))); recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald), new ItemStack(ConfigItems.itemShard, 2 + random.nextInt(2), random.nextInt(6)))); recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald), new ItemStack(ConfigItems.itemManaBean, 1 + random.nextInt(2), 0))); recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 5 + random.nextInt(3)), new ItemStack(ConfigItems.itemBathSalts, 1, 0))); recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 5 + random.nextInt(3)), new ItemStack(ConfigItems.itemRingRunic, 1, 0))); recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 5 + random.nextInt(3)), new ItemStack(ConfigItems.itemAmuletVis, 1, 0))); recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 5 + random.nextInt(3)), new ItemStack(ConfigItems.itemBaubleBlanks, 1, 3 + random.nextInt(6)))); */ recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 1 + random.nextInt(2)), new ItemStack(ForbiddenItems.deadlyShards, 3 + random.nextInt(2), 6))); if(!Config.noLust) recipeList.add(new MerchantRecipe(new ItemStack(ForbiddenItems.deadlyShards, 2 + random.nextInt(4), 4), new ItemStack(Items.emerald))); recipeList.add(new MerchantRecipe(new ItemStack(ForbiddenItems.deadlyShards, 4 + random.nextInt(6), 0), new ItemStack(Items.emerald))); recipeList.add(new MerchantRecipe(new ItemStack(ForbiddenItems.gluttonyShard, 4 + random.nextInt(6), 0), new ItemStack(Items.emerald))); recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 1 + random.nextInt(3)), new ItemStack(Items.skull, 1, 0))); recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 4 + random.nextInt(4)), new ItemStack(Items.ghast_tear, 1))); recipeList.add(new MerchantRecipe(new ItemStack(Items.emerald, 1), new ItemStack(Items.glowstone_dust, 8 + random.nextInt(9)))); ItemStack wand = new ItemStack(ConfigItems.itemWandCasting, 1, 36); ((ItemWandCasting) wand.getItem()).setCap(wand, (WandCap) WandCap.caps.get("iron")); ((ItemWandCasting) wand.getItem()).setRod(wand, (WandRod) WandRod.rods.get("profane")); ((ItemWandCasting) wand.getItem()).storeAllVis(wand, new AspectList().add(Aspect.FIRE, 5000).add(Aspect.WATER, 5000).add(Aspect.EARTH, 5000).add(Aspect.AIR, 5000).add(Aspect.ORDER, 5000).add(Aspect.ENTROPY, 5000)); MerchantRecipe profane = new MerchantRecipe(new ItemStack(Items.emerald, 8 + random.nextInt(5)), new ItemStack(Items.stick), wand); profane.func_82783_a(-6); recipeList.add(profane); MerchantRecipe fire = new MerchantRecipe(new ItemStack(Items.emerald, 4 + random.nextInt(5)), new ItemStack(Items.diamond, 1), new ItemStack(ConfigItems.itemFocusFire, 1)); fire.func_82783_a(-6); recipeList.add(fire); } }
Example 2
Source File: VillagerTrades.java From BaseMetals with GNU Lesser General Public License v2.1 | 5 votes |
/** * Invoked when the merchant generates its trade menu * @param recipeList existing trade menu * @param random a psuedorandom number generator instance */ @Override public void modifyMerchantRecipeList(MerchantRecipeList recipeList, Random random) { int numTrades = -1; if(maxTrades > 0){ if(maxTradeVariation > 0){ numTrades = Math.max(1,maxTrades + random.nextInt(maxTradeVariation) - maxTradeVariation / 2); } else { numTrades = maxTrades; } } ItemStack in1 = input1.copy(); if(maxInputMarkup1 > 0) in1.stackSize = in1.stackSize + random.nextInt(maxInputMarkup1); ItemStack in2 = null; if(input2 != null && input2.getItem() != null){ in2 = input2.copy(); if(maxInputMarkup2 > 0) in2.stackSize = in2.stackSize + random.nextInt(maxInputMarkup2); } ItemStack out = output.copy(); if(maxOutputMarkup > 0) out.stackSize = out.stackSize + random.nextInt(maxOutputMarkup); if(numTrades > 0){ recipeList.add(new MerchantRecipe(in1,in2,out,0,numTrades)); }else{ recipeList.add(new MerchantRecipe(in1,in2,out)); } }
Example 3
Source File: TofuVillages.java From TofuCraftReload with MIT License | 5 votes |
@Override public void addMerchantRecipe(IMerchant merchant, MerchantRecipeList recipeList, Random random) { //Buy recipeList.add(new MerchantRecipe(new ItemStack(ItemLoader.soybeans, 18 + random.nextInt(4)), new ItemStack(Items.EMERALD))); recipeList.add(new MerchantRecipe(new ItemStack(ItemLoader.tofu_food, 14 + random.nextInt(4),1), new ItemStack(Items.EMERALD))); recipeList.add(new MerchantRecipe(new ItemStack(ItemLoader.material, 6 + random.nextInt(4),5), new ItemStack(Items.EMERALD))); recipeList.add(new MerchantRecipe(new ItemStack(ItemLoader.material, 14 + random.nextInt(4),3), new ItemStack(Items.EMERALD))); //Sell }
Example 4
Source File: TofuVillages.java From TofuCraftReload with MIT License | 5 votes |
@Override public void addMerchantRecipe(IMerchant merchant, MerchantRecipeList recipeList, Random random) { //Buy recipeList.add(new MerchantRecipe(new ItemStack(ItemLoader.material, 18 + random.nextInt(4),2), new ItemStack(Items.EMERALD))); //Sell recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD), new ItemStack(ItemLoader.tofu_food, 17 + random.nextInt(8),3))); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD), new ItemStack(ItemLoader.tofu_food, 10 + random.nextInt(4),4))); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD), new ItemStack(ItemLoader.tofu_food, 12 + random.nextInt(4),5))); }
Example 5
Source File: TofuVillages.java From TofuCraftReload with MIT License | 5 votes |
@Override public void addMerchantRecipe(IMerchant merchant, MerchantRecipeList recipeList, Random random) { //Sell recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD), new ItemStack(ItemLoader.tofu_material, 2 + random.nextInt(2)))); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD), new ItemStack(ItemLoader.tofu_material, 8 + random.nextInt(4),2))); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, 6 + random.nextInt(4)), new ItemStack(ItemLoader.tofustick))); }
Example 6
Source File: ShopkeeperTradesForSun.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static MerchantRecipeList trades(EntityPlayer player, ReputationLevel rep) { MerchantRecipeList recipeList = new MerchantRecipeList(); if (rep.equals(ReputationLevel.DRIFTER) || rep.equals(ReputationLevel.FRIEND) || rep.equals(ReputationLevel.ALLY) || rep.equals(ReputationLevel.HERO)) { recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(5)), level1Sword())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(10)), level2Sword())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(20)), level3Sword())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(30)), level4Sword())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(40)), level5Sword())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(3)), level1BlastProtection())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(6)), level2BlastProtection())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(9)), level3BlastProtection())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(15)), level4BlastProtection())); } if (rep.equals(ReputationLevel.FRIEND) || rep.equals(ReputationLevel.ALLY) || rep.equals(ReputationLevel.HERO)) { } if (rep.equals(ReputationLevel.ALLY) || rep.equals(ReputationLevel.HERO)) { recipeList.add(new MerchantRecipe(new ItemStack(Items.DIAMOND, 3), new ItemStack(Items.EMERALD, rep.adjustPrice(5)), new ItemStack(ItemBattleAxe.INSTANCE))); recipeList.add(new MerchantRecipe(new ItemStack(ItemToroLeather.INSTANCE, 5), new ItemStack(Items.EMERALD, 5), new ItemStack(ItemSamuraiArmor.helmetItem))); recipeList.add(new MerchantRecipe(new ItemStack(ItemToroLeather.INSTANCE, 7), new ItemStack(Items.EMERALD, 5), new ItemStack(ItemSamuraiArmor.leggingsItem))); recipeList.add(new MerchantRecipe(new ItemStack(ItemToroLeather.INSTANCE, 4), new ItemStack(Items.EMERALD, 5), new ItemStack(ItemSamuraiArmor.bootsItem))); recipeList.add(new MerchantRecipe(new ItemStack(ItemToroLeather.INSTANCE, 8), new ItemStack(Items.EMERALD, 5), new ItemStack(ItemSamuraiArmor.chestplateItem))); } if (rep.equals(ReputationLevel.HERO)) { } return recipeList; }
Example 7
Source File: ShopkeeperTradesForMoon.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static MerchantRecipeList trades(EntityPlayer player, ReputationLevel rep) { MerchantRecipeList recipeList = new MerchantRecipeList(); if (rep.equals(ReputationLevel.DRIFTER) || rep.equals(ReputationLevel.FRIEND) || rep.equals(ReputationLevel.ALLY) || rep.equals(ReputationLevel.HERO)) { recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(5)), level1Sword())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(10)), level2Sword())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(20)), level3Sword())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(30)), level4Sword())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(5)), level1Chestplate())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(10)), level2Chestplate())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(20)), level3Chestplate())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(30)), level4Chestplate())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(40)), level5Chestplate())); } if (rep.equals(ReputationLevel.FRIEND) || rep.equals(ReputationLevel.ALLY) || rep.equals(ReputationLevel.HERO)) { recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(5)), new ItemStack(Items.QUARTZ, 20), new ItemStack(ItemPickaxeOfGreed.INSTANCE))); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(5)), new ItemStack(Items.QUARTZ, 20), new ItemStack(ItemSwordOfPain.INSTANCE))); } if (rep.equals(ReputationLevel.ALLY) || rep.equals(ReputationLevel.HERO)) { recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(5)), new ItemStack(Blocks.OBSIDIAN, 3), new ItemStack(ItemObsidianSword.INSTANCE))); } if (rep.equals(ReputationLevel.HERO)) { } return recipeList; }
Example 8
Source File: ShopkeeperTradesForFire.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static MerchantRecipeList trades(EntityPlayer player, ReputationLevel rep) { MerchantRecipeList recipeList = new MerchantRecipeList(); if (rep.equals(ReputationLevel.DRIFTER) || rep.equals(ReputationLevel.FRIEND) || rep.equals(ReputationLevel.ALLY) || rep.equals(ReputationLevel.HERO)) { recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(5)), level1Sword())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(10)), level2Sword())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(20)), level3Sword())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(30)), level4Sword())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(40)), level5Sword())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(7)), level1Bow())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(15)), level2Bow())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(3)), level1FireProtection())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(6)), level2FireProtection())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(9)), level3FireProtection())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(15)), level4FireProtection())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(20)), level5FireProtection())); } if (rep.equals(ReputationLevel.FRIEND) || rep.equals(ReputationLevel.ALLY) || rep.equals(ReputationLevel.HERO)) { recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(4)), new ItemStack(Items.CHICKEN, 1), new ItemStack(ItemSpicyChicken.INSTANCE))); } if (rep.equals(ReputationLevel.ALLY) || rep.equals(ReputationLevel.HERO)) { recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(5)), new ItemStack(Blocks.MAGMA, 3), new ItemStack(ItemFireSword.INSTANCE))); } if (rep.equals(ReputationLevel.HERO)) { } return recipeList; }
Example 9
Source File: ShopkeeperTradesForWater.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static MerchantRecipeList trades(EntityPlayer player, ReputationLevel rep) { MerchantRecipeList recipeList = new MerchantRecipeList(); if (rep.equals(ReputationLevel.DRIFTER) || rep.equals(ReputationLevel.FRIEND) || rep.equals(ReputationLevel.ALLY) || rep.equals(ReputationLevel.HERO)) { recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(5)), level1Boots())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(10)), level2Boots())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(20)), level3Boots())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(30)), level4Boots())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(40)), level5Boots())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(5)), level1Helmet())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(10)), level2Helmet())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(20)), level3Helmet())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(30)), level4Helmet())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(40)), level5Helmet())); } if (rep.equals(ReputationLevel.FRIEND) || rep.equals(ReputationLevel.ALLY) || rep.equals(ReputationLevel.HERO)) { } if (rep.equals(ReputationLevel.ALLY) || rep.equals(ReputationLevel.HERO)) { recipeList.add(new MerchantRecipe(new ItemStack(Items.DIAMOND, 3), new ItemStack(Items.EMERALD, rep.adjustPrice(5)), new ItemStack(ItemBattleAxe.INSTANCE))); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(25)), loChangsRod())); } if (rep.equals(ReputationLevel.HERO)) { } return recipeList; }
Example 10
Source File: ShopkeeperTradesForEarth.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static MerchantRecipeList trades(EntityPlayer player, ReputationLevel rep) { MerchantRecipeList recipeList = new MerchantRecipeList(); if (rep.equals(ReputationLevel.DRIFTER) || rep.equals(ReputationLevel.FRIEND) || rep.equals(ReputationLevel.ALLY) || rep.equals(ReputationLevel.HERO)) { recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(5)), level1Pick())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(10)), level2Pick())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(20)), level3Pick())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(30)), level4Pick())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(40)), level5Pick())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(9)), silkTouch())); } if (rep.equals(ReputationLevel.FRIEND) || rep.equals(ReputationLevel.ALLY) || rep.equals(ReputationLevel.HERO)) { } if (rep.equals(ReputationLevel.ALLY) || rep.equals(ReputationLevel.HERO)) { recipeList.add(new MerchantRecipe(new ItemStack(Items.DIAMOND, 3), new ItemStack(Items.EMERALD, rep.adjustPrice(5)), new ItemStack(ItemBattleAxe.INSTANCE))); recipeList.add(new MerchantRecipe(new ItemStack(ItemToroLeather.INSTANCE, 5), new ItemStack(Items.EMERALD, 5), new ItemStack(ItemToroArmor.helmetItem))); recipeList.add(new MerchantRecipe(new ItemStack(ItemToroLeather.INSTANCE, 7), new ItemStack(Items.EMERALD, 5), new ItemStack(ItemToroArmor.leggingsItem))); recipeList.add(new MerchantRecipe(new ItemStack(ItemToroLeather.INSTANCE, 4), new ItemStack(Items.EMERALD, 5), new ItemStack(ItemToroArmor.bootsItem))); recipeList.add(new MerchantRecipe(new ItemStack(ItemToroLeather.INSTANCE, 8), new ItemStack(Items.EMERALD, 5), new ItemStack(ItemToroArmor.chestplateItem))); } if (rep.equals(ReputationLevel.HERO)) { } return recipeList; }
Example 11
Source File: CraftMerchant.java From Kettle with GNU General Public License v3.0 | 5 votes |
@Override public void setRecipes(List<MerchantRecipe> recipes) { MerchantRecipeList recipesList = merchant.getRecipes(null); recipesList.clear(); for (MerchantRecipe recipe : recipes) { recipesList.add(CraftMerchantRecipe.fromBukkit(recipe).toMinecraft()); } }
Example 12
Source File: ShopkeeperTradesForWind.java From ToroQuest with GNU General Public License v3.0 | 5 votes |
public static MerchantRecipeList trades(EntityPlayer player, ReputationLevel rep) { MerchantRecipeList recipeList = new MerchantRecipeList(); if (rep.equals(ReputationLevel.DRIFTER) || rep.equals(ReputationLevel.FRIEND) || rep.equals(ReputationLevel.ALLY) || rep.equals(ReputationLevel.HERO)) { recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(15)), level1Sword())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(30)), level2Sword())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(15)), level1Bow())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(30)), level2Bow())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(5)), level1Boots())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(10)), level2Boots())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(20)), level3Boots())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(30)), level4Boots())); recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, rep.adjustPrice(40)), level5Boots())); } if (rep.equals(ReputationLevel.FRIEND) || rep.equals(ReputationLevel.ALLY) || rep.equals(ReputationLevel.HERO)) { } if (rep.equals(ReputationLevel.ALLY) || rep.equals(ReputationLevel.HERO)) { recipeList.add(new MerchantRecipe(new ItemStack(Items.DIAMOND, 3), new ItemStack(Items.EMERALD, rep.adjustPrice(5)), new ItemStack(ItemBattleAxe.INSTANCE))); recipeList.add(new MerchantRecipe(new ItemStack(Items.DIAMOND, 5), new ItemStack(Items.EMERALD, 5), new ItemStack(ItemRoyalArmor.helmetItem))); recipeList.add(new MerchantRecipe(new ItemStack(Items.DIAMOND, 7), new ItemStack(Items.EMERALD, 5), new ItemStack(ItemRoyalArmor.leggingsItem))); recipeList.add(new MerchantRecipe(new ItemStack(Items.DIAMOND, 4), new ItemStack(Items.EMERALD, 5), new ItemStack(ItemRoyalArmor.bootsItem))); recipeList.add(new MerchantRecipe(new ItemStack(Items.DIAMOND, 8), new ItemStack(Items.EMERALD, 5), new ItemStack(ItemRoyalArmor.chestplateItem))); } if (rep.equals(ReputationLevel.HERO)) { /* * only the best here */ } return recipeList; }
Example 13
Source File: VillagerLoader.java From Sakura_mod with MIT License | 4 votes |
public void addMerchantRecipe(IMerchant merchant, MerchantRecipeList recipeList, Random random) { int i = price != null ? price.getPrice(random) : 1; recipeList.add(new MerchantRecipe(item.copy(),new ItemStack(ItemLoader.MATERIAL, i, 50))); }
Example 14
Source File: VillagerTofu1.java From TofuCraftReload with MIT License | 4 votes |
public void addMerchantRecipe(IMerchant merchant, MerchantRecipeList recipeList, Random random) { int i = price != null ? price.getPrice(random) : 1; recipeList.add(new MerchantRecipe(new ItemStack(Items.EMERALD, i, 0),item.copy())); }
Example 15
Source File: VillagerLoader.java From Sakura_mod with MIT License | 4 votes |
public void addMerchantRecipe(IMerchant merchant, MerchantRecipeList recipeList, Random random) { int i = price != null ? price.getPrice(random) : 1; recipeList.add(new MerchantRecipe(new ItemStack(ItemLoader.MATERIAL, i, 50),item.copy())); }
Example 16
Source File: TofuVillages.java From TofuCraftReload with MIT License | 4 votes |
@Override public void addMerchantRecipe(IMerchant merchant, MerchantRecipeList recipeList, Random random) { //Buy recipeList.add(new MerchantRecipe(new ItemStack(ItemLoader.rice, 16 + random.nextInt(8)), new ItemStack(Items.EMERALD))); }
Example 17
Source File: VillagerTofu1.java From TofuCraftReload with MIT License | 4 votes |
public void addMerchantRecipe(IMerchant merchant, MerchantRecipeList recipeList, Random random) { int i = price != null ? price.getPrice(random) : 1; recipeList.add(new MerchantRecipe(item.copy(),new ItemStack(Items.EMERALD, i, 0))); }
Example 18
Source File: EntityTofunian.java From TofuCraftReload with MIT License | 3 votes |
public void addEnchantTradeForSingleRuby(MerchantRecipeList list, ItemStack sell, int cost) { ItemStack stack1 = sell.copy(); ItemStack enchantStack = EnchantmentHelper.addRandomEnchantment(this.rand, new ItemStack(stack1.getItem(), 1, stack1.getMetadata()), 5 + this.rand.nextInt(15), false); list.add(new MerchantRecipe(new ItemStack(ItemLoader.zundaruby, cost), enchantStack)); }
Example 19
Source File: EntityTofunian.java From TofuCraftReload with MIT License | 3 votes |
public void addTradeRubyForItem(MerchantRecipeList list, ItemStack buy, int cost) { ItemStack stack1 = buy.copy(); stack1.setCount(cost); list.add(new MerchantRecipe(stack1, new ItemStack(ItemLoader.zundaruby, 1))); }
Example 20
Source File: EntityTofunian.java From TofuCraftReload with MIT License | 2 votes |
public void addTradeForSingleRuby(MerchantRecipeList list, ItemStack sell, int cost) { ItemStack stack1 = sell.copy(); list.add(new MerchantRecipe(new ItemStack(ItemLoader.zundaruby, cost), stack1)); }