Java Code Examples for org.bukkit.Bukkit.addRecipe()

The following are Jave code examples for showing how to use addRecipe() of the org.bukkit.Bukkit class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: WC   File: PokeEgg.java   View Source Code Vote up 5 votes
public void registerRecipe(){
    ItemStack i = getPokeEgg();

    ShapedRecipe pokeEgg = new ShapedRecipe(i);

    pokeEgg.shape("BAB", "DCD", "BAB");

    pokeEgg.setIngredient('B', Material.WOOL);
    pokeEgg.setIngredient('A', Material.STRING);
    pokeEgg.setIngredient('D', Material.GOLD_NUGGET);
    pokeEgg.setIngredient('C', Material.EGG);

    Bukkit.addRecipe(pokeEgg);
}
 
Example 2
Project: Transport-Pipes   File: CraftUtils.java   View Source Code Vote up 5 votes
public static void initRecipes() {
	if (!TransportPipes.instance.generalConf.isCraftingEnabled()) {
		return;
	}
	for (PipeType pt : PipeType.values()) {
		Bukkit.addRecipe(TransportPipes.instance.recipesConf.createPipeRecipe(pt, null));
		if (pt == PipeType.COLORED) {
			for (PipeColor pc : PipeColor.values()) {
				Bukkit.addRecipe(TransportPipes.instance.recipesConf.createPipeRecipe(pt, pc));
			}
		}
	}

	Bukkit.addRecipe(TransportPipes.instance.recipesConf.createWrenchRecipe());
}
 
Example 3
Project: PA   File: PokeEgg.java   View Source Code Vote up 5 votes
public void registerRecipe(){
    ItemStack i = getPokeEgg();

    ShapedRecipe pokeEgg = new ShapedRecipe(i);

    pokeEgg.shape("BAB", "DCD", "BAB");

    pokeEgg.setIngredient('B', Material.WOOL);
    pokeEgg.setIngredient('A', Material.STRING);
    pokeEgg.setIngredient('D', Material.GOLD_NUGGET);
    pokeEgg.setIngredient('C', Material.EGG);

    Bukkit.addRecipe(pokeEgg);
}
 
Example 4
Project: MystiCraft   File: WandManager.java   View Source Code Vote up 4 votes
public void registerWand(Wand wand) {
	this.wands.add(wand);
	if (wand.getRecipe() != null) {
		Bukkit.addRecipe(wand.getRecipe());
	}
}
 
Example 5
Project: HCFCore   File: BottledExpListener.java   View Source Code Vote up 4 votes
public BottledExpListener() {
    // if we don't create a fake custom recipe, players won't be able to craft it.
    Bukkit.addRecipe(new ShapelessRecipe(createExpBottle(1)).addIngredient(Material.GLASS_BOTTLE));
}
 
Example 6
Project: HCFCore   File: BottledExpListener.java   View Source Code Vote up 4 votes
public BottledExpListener() {
    // if we don't create a fake custom recipe, players won't be able to craft it.
    Bukkit.addRecipe(new ShapelessRecipe(createExpBottle(1)).addIngredient(Material.GLASS_BOTTLE));
}
 
Example 7
Project: PA   File: Bocatas.java   View Source Code Vote up 3 votes
public void bocataJamon(){
    ItemStack i = getBocataJamon();

    ShapelessRecipe pokeEgg = new ShapelessRecipe(i);

    pokeEgg.addIngredient(2, Material.BREAD);
    pokeEgg.addIngredient(Material.GRILLED_PORK);

    Bukkit.addRecipe(pokeEgg);
}
 
Example 8
Project: PA   File: Bocatas.java   View Source Code Vote up 3 votes
public void hamburguesa(){
    ItemStack i = getHambur();

    ShapelessRecipe pokeEgg = new ShapelessRecipe(i);

    pokeEgg.addIngredient(2, Material.BREAD);
    pokeEgg.addIngredient(Material.COOKED_BEEF);

    Bukkit.addRecipe(pokeEgg);
}