public static void init() { mechanicProfession = new VillagerProfession(Names.MOD_ID + ":mechanic", Textures.VILLAGER_MECHANIC, "minecraft:textures/entity/zombie_villager/zombie_villager.png"); VillagerCareer career = new VillagerCareer(mechanicProfession, Names.MOD_ID + ".mechanic"); career.addTrade(1, new ListItemForEmeralds(Itemss.PCB_BLUEPRINT, new PriceInfo(10, 19)), new ListItemForEmeralds(Itemss.NUKE_VIRUS, new PriceInfo(1, 5)), new ListItemForEmeralds(Itemss.STOP_WORM, new PriceInfo(1, 5)) ); for (int i = 0; i < ItemAssemblyProgram.PROGRAMS_AMOUNT; i++) { career.addTrade(1, new ListItemForEmeralds(new ItemStack(Itemss.ASSEMBLY_PROGRAM, 1, i), new PriceInfo(5, 11))); } }
private EntityVillager.ITradeList[][] buildDruidTrades() { return new EntityVillager.ITradeList[][] { { new EmeraldForItems(Items.COOKED_FISH, new PriceInfo(9, 12)), // GROUP 1 new EmeraldForItems(Items.APPLE, new PriceInfo(3, 6)), new EmeraldForItems(Items.BEETROOT, new PriceInfo(8, 12)) }, { new EmeraldForItems(Items.FEATHER, new PriceInfo(12, 13)), //GROUP 2 new EmeraldForItems(Items.WHEAT_SEEDS, new PriceInfo(50, 64)), new EmeraldForItems(Items.POISONOUS_POTATO, new PriceInfo(1, 3)) }, { new EmeraldForItems(Item.getItemFromBlock(Blocks.BROWN_MUSHROOM), new PriceInfo(8, 12)), //GROUP 3 new EmeraldForItems(Item.getItemFromBlock(Blocks.RED_MUSHROOM), new PriceInfo(8, 12)) }, { new EmeraldForItems(Items.BEEF, new PriceInfo(14, 17)), //GROUP 4 new EmeraldForItems(Items.RABBIT, new PriceInfo(14, 17)), new EmeraldForItems(Items.CHICKEN, new PriceInfo(14, 17)) }, { new EmeraldForItems(Items.WRITTEN_BOOK, new PriceInfo(1, 1)), //GROUP 5 new EmeraldForItems(Items.FISH, new PriceInfo(9, 12)), new EmeraldForItems(Items.SPIDER_EYE, new PriceInfo(3, 6)) }, { new ListItemForEmeraldsFixed(new ItemStack(Blocks.GRASS, 32), new PriceInfo(1, 2)), //GROUP 6 new ListItemForEmeraldsFixed(new ItemStack(Blocks.FARMLAND, 32), new PriceInfo(1, 2)), new ListItemForEmeraldsFixed(new ItemStack(Blocks.DIRT, 32, BlockDirt.DirtType.PODZOL.getMetadata()), new PriceInfo(1, 2)), new ListItemForEmeraldsFixed(new ItemStack(Blocks.GRASS_PATH, 32), new PriceInfo(1, 2)) }, { new ListItemForEmeraldsFixed(new ItemStack(Blocks.MYCELIUM, 1), new PriceInfo(12, 16)), //GROUP 7 new ListItemForEmeraldsFixed(new ItemStack(Blocks.WATERLILY, 32), new PriceInfo(1, 2)), new ListItemForEmeraldsFixed(new ItemStack(Blocks.SAND, 32, BlockSand.EnumType.RED_SAND.ordinal()), new PriceInfo(1, 3)), new ListItemForEmeraldsFixed(new ItemStack(Items.DYE, 16, EnumDyeColor.BLACK.getDyeDamage()), new PriceInfo(1, 3)) } }; }
private EntityVillager.ITradeList[][] buildSageTrades() { return new EntityVillager.ITradeList[][] { { new EmeraldForItems(Items.GUNPOWDER, new PriceInfo(5, 8)), //GROUP 1 new EmeraldForItems(Items.NETHER_WART, new PriceInfo(12, 16)) }, { new EmeraldForItems(Items.BONE, new PriceInfo(8, 16)), //GROUP 2 new EmeraldForItems(Items.MUTTON, new PriceInfo(4, 12)) }, { new EmeraldForItems(Items.BLAZE_ROD, new PriceInfo(8, 16)), //GROUP 3 new EmeraldForItems(Items.SLIME_BALL, new PriceInfo(8, 16)) }, { new EmeraldForItems(Items.GHAST_TEAR, new PriceInfo(1, 2)), //GROUP 4 new EmeraldForItems(Items.REDSTONE, new PriceInfo(4, 6)) }, { new EmeraldForItems(Items.GLOWSTONE_DUST, new PriceInfo(6, 8)), //GROUP 5 new EmeraldForItems(Items.DIAMOND, new PriceInfo(8, 12)), new EmeraldForItems(Items.ENDER_PEARL, new PriceInfo(12, 16)) }, { new ListItemForEmeraldsFixed(new ItemStack(Items.EXPERIENCE_BOTTLE, 8), new PriceInfo(1, 4)), //GROUP 6 new ListItemForEmeraldsFixed(new ItemStack(Blocks.CLAY, 16), new PriceInfo(1, 1)), }, { new ListItemForEmeraldsFixed(new ItemStack(Blocks.QUARTZ_BLOCK, 16), new PriceInfo(2, 4)), //GROUP 7 new ListItemForEmeraldsFixed(new ItemStack(Blocks.OBSIDIAN, 16), new PriceInfo(2, 4)), new ListItemForEmeraldsFixed(new ItemStack(Items.FISH, 4, ItemFishFood.FishType.PUFFERFISH.getMetadata()), new PriceInfo(1, 2)), } }; }
public static void registerUselessVillager() { final VillagerProfession prof = new VillagerProfession( "openblocks:radio", "openblocks:textures/models/king-ish.png", "minecraft:textures/entity/zombie_villager/zombie_villager.png"); // TODO: zombie texture? GameRegistry.findRegistry(VillagerProfession.class).register(prof); final VillagerCareer career = new VillagerCareer(prof, "audiophile") .addTrade(1, new EmeraldForItems(Item.getItemFromBlock(Blocks.NOTEBLOCK), new PriceInfo(5, 7))) .addTrade(2, new ListItemForEmeralds(Item.getItemFromBlock(Blocks.JUKEBOX), new PriceInfo(10, 15))); // extra for sound quality! for (ItemStack record : OreDictionary.getOres("record")) career.addTrade(3, new ListItemForEmeralds(record.getItem(), new PriceInfo(3, 6))); }
public ItemStacksAndPrices(List<ItemStack> stacks, List<PriceInfo> prices) { this.stacks = stacks; this.prices = prices; }
public List<PriceInfo> getPrices() { return this.prices; }
public ListItemForEmeraldsFixed(Item par1Item, EntityVillager.PriceInfo priceInfo) { // super(par1Item,priceInfo); this.itemToBuy = new ItemStack(par1Item); this.priceInfo = priceInfo; }
/** * * @param stack * @param priceInfo */ public ListItemForEmeraldsFixed(ItemStack stack, EntityVillager.PriceInfo priceInfo) { // super(stack,priceInfo); this.itemToBuy = stack; this.priceInfo = priceInfo; }