本文整理汇总了Java中net.minecraft.entity.passive.EntityVillager.EmeraldForItems类的典型用法代码示例。如果您正苦于以下问题:Java EmeraldForItems类的具体用法?Java EmeraldForItems怎么用?Java EmeraldForItems使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EmeraldForItems类属于net.minecraft.entity.passive.EntityVillager包,在下文中一共展示了EmeraldForItems类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getBuyingStack
import net.minecraft.entity.passive.EntityVillager.EmeraldForItems; //导入依赖的package包/类
@Override
public ItemStack getBuyingStack(ITradeList t)
{
EmeraldForItems trade = (EmeraldForItems)t;
ItemStack stack = new ItemStack(trade.buyingItem, 1, 0);
return stack;
}
示例2: buildDruidTrades
import net.minecraft.entity.passive.EntityVillager.EmeraldForItems; //导入依赖的package包/类
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)) }
};
}
示例3: buildSageTrades
import net.minecraft.entity.passive.EntityVillager.EmeraldForItems; //导入依赖的package包/类
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)),
}
};
}
示例4: registerUselessVillager
import net.minecraft.entity.passive.EntityVillager.EmeraldForItems; //导入依赖的package包/类
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)));
}