Java 类net.minecraft.entity.passive.EntityVillager.ListItemForEmeralds 实例源码

项目:pnc-repressurized    文件:VillagerHandler.java   
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)));
    }
}
项目:VillagerTrades    文件:TradeHandlers.java   
@Override
public ItemStack getSellingStack(ITradeList t)
{
    ListItemForEmeralds trade = (ListItemForEmeralds)t;
    ItemStack stack = trade.itemToBuy.copy();
    return stack;
}
项目:OpenBlocks    文件:RadioVillagerTrades.java   
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)));
}