Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 1.2 KB

README.md

File metadata and controls

44 lines (34 loc) · 1.2 KB

RecipeBuilder

How to Use

1- Copy and paste RecipeBuilder.java

2- Create your recipe. Example:

//First paremeter is main plugin class, second is NameSpaceKey and last is resut
ShapedRecipe recipe = new RepiceBuilder(this, "test", new ItemStack(Material.NETHER_STAR))
            //First paremeter item and secon is column
            .addIngredientsToColumn(Material.DIRT, 1)
            .build();

3- Add recipe to server in OnEnable. Example:

    @Override
    public void onEnable() {
        ShapedRecipe recipe = new RepiceBuilder(this, "test", new ItemStack(Material.NETHER_STAR))
            .addIngredientsToColumn(Material.DIRT, 1)
            .build();
            
        getServer().addRecipe(recipe);
    }

Example Output

This is an image

Other Examples

ShapedRecipe recipe = new RepiceBuilder(this, "test", new ItemStack(Material.NETHER_STAR))
            .addIngredient(Material.DIRT, 1)
            .build();
ShapedRecipe recipe = new RepiceBuilder(this, "test", new ItemStack(Material.NETHER_STAR))
            .addIngredientsToRow(Material.DIRT, 1)
            .build();