net.minecraft.entity.passive.EntityVillager.PriceInfo Java Examples

The following examples show how to use net.minecraft.entity.passive.EntityVillager.PriceInfo. 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: VillagerTofu1.java    From TofuCraftReload with MIT License 5 votes vote down vote up
public static void registerVillager() {
	VillagerProfession prof = VillagerRegistry.FARMER;
	VillagerCareer career = new VillagerCareer(prof, "tofu_trader");
	career.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.material,8,0),new PriceInfo(3, 7)));
	career.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.material,4,2),new PriceInfo(4, 9)));
	career.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.foodset,4,6),new PriceInfo(6, 11)));
	career.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.material,4,30),new PriceInfo(3, 7)));
	career.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.material,4,31),new PriceInfo(3, 7)));
	career.addTrade(2, new SimpleBuy(new ItemStack(ItemLoader.material,4,8),new PriceInfo(4, 9)));
	career.addTrade(2, new SimpleBuy(new ItemStack(ItemLoader.sauce_bottle,1,4),new PriceInfo(2, 6)));
	career.addTrade(2, new SimpleBuy(new ItemStack(ItemLoader.sauce_bottle,1,0),new PriceInfo(2, 6)));
	career.addTrade(2, new SimpleBuy(new ItemStack(ItemLoader.defatting_potion,1),new PriceInfo(4, 6)));
	career.addTrade(3, new SimpleSell(new ItemStack(ItemLoader.material,8,4),new PriceInfo(2, 6)));
}
 
Example #2
Source File: VillagerTofu1.java    From TofuCraftReload with MIT License 4 votes vote down vote up
public SimpleBuy(ItemStack item, PriceInfo price){
	this.item = item;
	this.price = price;
}
 
Example #3
Source File: VillagerTofu1.java    From TofuCraftReload with MIT License 4 votes vote down vote up
public SimpleSell(ItemStack item, PriceInfo price){
	this.item = item;
	this.price = price;
}
 
Example #4
Source File: VillagerLoader.java    From Sakura_mod with MIT License 4 votes vote down vote up
@SubscribeEvent
public static void onVillagerProfessionRegistration(RegistryEvent.Register<VillagerRegistry.VillagerProfession> event) {
	event.getRegistry().registerAll(wa_villager);

    VillagerRegistry.VillagerCareer farmer = new VillagerRegistry.VillagerCareer(wa_villager, "wa_farmer");
    farmer.addTrade(1, new SimpleSell(new ItemStack(ItemLoader.CABBAGE,8),new PriceInfo(2, 4)));
    farmer.addTrade(1, new SimpleSell(new ItemStack(ItemLoader.EGGPLANT,8),new PriceInfo(2, 4)));
    farmer.addTrade(1, new SimpleSell(new ItemStack(ItemLoader.BUCKWHEAT,8),new PriceInfo(2, 4)));
    farmer.addTrade(1, new SimpleSell(new ItemStack(ItemLoader.RED_BEAN,8),new PriceInfo(2, 4)));
    farmer.addTrade(1, new SimpleSell(new ItemStack(ItemLoader.ONION,8),new PriceInfo(2, 4)));
    farmer.addTrade(1, new SimpleSell(new ItemStack(ItemLoader.TOMATO,8),new PriceInfo(2, 4)));
    farmer.addTrade(1, new SimpleSell(new ItemStack(ItemLoader.RAPESEED,8),new PriceInfo(2, 4)));
    farmer.addTrade(1, new SimpleSell(new ItemStack(ItemLoader.RICE_SEEDS,8),new PriceInfo(2, 4)));
    farmer.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.RED_BEAN,1),new PriceInfo(5, 7)));
    farmer.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.BUCKWHEAT,1),new PriceInfo(5, 7)));
    farmer.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.CABBAGE_SEEDS,1),new PriceInfo(5, 7)));
    farmer.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.EGGPLANT_SEEDS,1),new PriceInfo(5, 7)));
    farmer.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.ONION_SEEDS,1),new PriceInfo(5, 7)));
    farmer.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.RADISH_SEEDS,1),new PriceInfo(5, 7)));
    farmer.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.RAPESEED,1),new PriceInfo(5, 7)));
    farmer.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.RICE_SEEDS,1),new PriceInfo(4, 7)));
    farmer.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.TOMATO_SEEDS,1),new PriceInfo(5, 7)));
    farmer.addTrade(2, new SimpleBuy(new ItemStack(ItemLoader.MATERIAL,8,37),new PriceInfo(3, 5)));
	
	VillagerRegistry.VillagerCareer fisher = new VillagerRegistry.VillagerCareer(wa_villager, "wa_fisher");
	fisher.addTrade(1, new SimpleSell(new ItemStack(Items.FISH,16),new PriceInfo(1, 3)));
	fisher.addTrade(1, new SimpleBuy(new ItemStack(Items.FISH,8),new PriceInfo(2, 4)));
	fisher.addTrade(1, new SimpleSell(new ItemStack(ItemLoader.FOODSET,16,78),new PriceInfo(2, 4)));
	fisher.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.FOODSET,8,78),new PriceInfo(4, 6)));

	VillagerCareer trader = new VillagerCareer(wa_villager, "wa_trader");
	trader.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.MATERIAL,8,3),new PriceInfo(2, 7)));
	trader.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.MATERIAL,8,29),new PriceInfo(3, 6)));
	trader.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.MATERIAL,8,33),new PriceInfo(3, 7)));
	trader.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.MATERIAL,8,45),new PriceInfo(3, 5)));
	trader.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.MATERIAL,8,31),new PriceInfo(2, 5)));
	trader.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.FOODSET,8,63),new PriceInfo(4, 7)));
	trader.addTrade(1, new SimpleBuy(new ItemStack(ItemLoader.FOODSET,8,81),new PriceInfo(3, 5)));
	
	trader.addTrade(3, new SimpleBuy(new ItemStack(ItemLoader.SAKURA_DIAMOND,1),new PriceInfo(12, 23)));
	trader.addTrade(3, new SimpleSell(new ItemStack(ItemLoader.SAKURA_DIAMOND,1),new PriceInfo(8, 10)));
	
	VillagerRegistry.VillagerCareer wine_trader = new VillagerRegistry.VillagerCareer(wa_villager, "wine_trader");
	wine_trader.addTrade(1, new SimpleBuy(new ItemStack(DrinksLoader.bottle_alcoholic,1,0),new PriceInfo(20, 30)));
	wine_trader.addTrade(1, new SimpleSell(new ItemStack(DrinksLoader.bottle_alcoholic,1,0),new PriceInfo(10, 20)));
	wine_trader.addTrade(1, new SimpleBuy(new ItemStack(DrinksLoader.bottle_alcoholic,1,1),new PriceInfo(20, 30)));
	wine_trader.addTrade(1, new SimpleSell(new ItemStack(DrinksLoader.bottle_alcoholic,1,1),new PriceInfo(10, 20)));
	wine_trader.addTrade(1, new SimpleBuy(new ItemStack(DrinksLoader.bottle_alcoholic,1,4),new PriceInfo(20, 30)));
	wine_trader.addTrade(1, new SimpleSell(new ItemStack(DrinksLoader.bottle_alcoholic,1,4),new PriceInfo(10, 20)));
	wine_trader.addTrade(1, new SimpleBuy(new ItemStack(DrinksLoader.bottle_alcoholic,1,5),new PriceInfo(20, 30)));
	wine_trader.addTrade(1, new SimpleSell(new ItemStack(DrinksLoader.bottle_alcoholic,1,5),new PriceInfo(10, 20)));

	wine_trader.addTrade(2, new SimpleBuy(new ItemStack(DrinksLoader.bottle_alcoholic,1,2),new PriceInfo(40, 60)));
	wine_trader.addTrade(2, new SimpleSell(new ItemStack(DrinksLoader.bottle_alcoholic,1,2),new PriceInfo(20, 35)));
	wine_trader.addTrade(2, new SimpleBuy(new ItemStack(DrinksLoader.bottle_alcoholic,1,6),new PriceInfo(40, 60)));
	wine_trader.addTrade(2, new SimpleSell(new ItemStack(DrinksLoader.bottle_alcoholic,1,6),new PriceInfo(20, 35)));
	
	wine_trader.addTrade(3, new SimpleBuy(new ItemStack(DrinksLoader.bottle_alcoholic,1,3),new PriceInfo(60, 80)));
	wine_trader.addTrade(3, new SimpleSell(new ItemStack(DrinksLoader.bottle_alcoholic,1,3),new PriceInfo(30, 45)));
	wine_trader.addTrade(3, new SimpleBuy(new ItemStack(DrinksLoader.bottle_alcoholic,1,7),new PriceInfo(60, 80)));
	wine_trader.addTrade(3, new SimpleSell(new ItemStack(DrinksLoader.bottle_alcoholic,1,7),new PriceInfo(30, 45)));
	wine_trader.addTrade(3, new SimpleBuy(new ItemStack(DrinksLoader.bottle_alcoholic,1,8),new PriceInfo(60, 80)));
	wine_trader.addTrade(3, new SimpleSell(new ItemStack(DrinksLoader.bottle_alcoholic,1,8),new PriceInfo(30, 45)));
	wine_trader.addTrade(3, new SimpleBuy(new ItemStack(DrinksLoader.bottle_alcoholic,1,9),new PriceInfo(60, 80)));
	wine_trader.addTrade(3, new SimpleSell(new ItemStack(DrinksLoader.bottle_alcoholic,1,9),new PriceInfo(30, 45)));
	wine_trader.addTrade(3, new SimpleBuy(new ItemStack(DrinksLoader.bottle_alcoholic,1,10),new PriceInfo(60, 80)));
	wine_trader.addTrade(3, new SimpleSell(new ItemStack(DrinksLoader.bottle_alcoholic,1,10),new PriceInfo(30, 45)));
	
	wine_trader.addTrade(4, new SimpleBuy(new ItemStack(DrinksLoader.bottle_alcoholic,1,11),new PriceInfo(50, 100)));
	wine_trader.addTrade(4, new SimpleSell(new ItemStack(DrinksLoader.bottle_alcoholic,1,11),new PriceInfo(40, 70)));
	wine_trader.addTrade(4, new SimpleBuy(new ItemStack(DrinksLoader.bottle_alcoholic,1,12),new PriceInfo(50, 100)));
	wine_trader.addTrade(4, new SimpleSell(new ItemStack(DrinksLoader.bottle_alcoholic,1,12),new PriceInfo(40, 70)));
	wine_trader.addTrade(4, new SimpleBuy(new ItemStack(DrinksLoader.bottle_alcoholic,1,13),new PriceInfo(75, 120)));
	wine_trader.addTrade(4, new SimpleSell(new ItemStack(DrinksLoader.bottle_alcoholic,1,13),new PriceInfo(40, 70)));
	wine_trader.addTrade(4, new SimpleBuy(new ItemStack(DrinksLoader.bottle_alcoholic,1,14),new PriceInfo(75, 120)));
	wine_trader.addTrade(4, new SimpleSell(new ItemStack(DrinksLoader.bottle_alcoholic,1,14),new PriceInfo(40, 70)));

}
 
Example #5
Source File: VillagerLoader.java    From Sakura_mod with MIT License 4 votes vote down vote up
public SimpleBuy(ItemStack item, PriceInfo price){
	this.item = item;
	this.price = price;
}
 
Example #6
Source File: VillagerLoader.java    From Sakura_mod with MIT License 4 votes vote down vote up
public SimpleSell(ItemStack item, PriceInfo price){
	this.item = item;
	this.price = price;
}