MyRecipes

Jan 24, 2016
MyRecipes
  • MyRecipes wiki
    -------------------------------------------------------------------------------------------------------------------------------------------------------

    » MyRecipes API
    » Get custom recipes list

    You can get the custom recipe list.
    Code (Text):
    List<com.dootie.myrecipes.Recipe> recipes = MyRecipes.recipes;
    » Get main data
    Code (Text):
    // Get type (crafting or furnace)
    recipe.getData().get("type");

    // Get shaped
    recipe.getData().get("shaped");

    // Get input (furnace recipes)
    recipe.getData().get("input");

    // Get slot material
    recipe.getData().get("slot"+slot+"material");

    // Get slot damage
    recipe.getData().get("slot"+slot+"data");

    // Get output
    recipe.getData().get("output");
    » Get custom data
    Get custom data from file recipes.yml data:. This can be used for create custom items.
    Code (Text):
    recipe.getData().get("data.DATA_OPTION_FROM_RECIPES_FILE");
    recipe.getData().get("data.DATA_OPTION_FROM_RECIPES_FILE.MORE_DEEP");
    recipe.getData().get("data.DATA_OPTION_FROM_RECIPES_FILE.MORE_DEEP.AND_MORE");
    Code (Text):
    ### RECIPES.YML
    recipe:
      type: 'craft'
      shaped: true
      slot:
        1: 'WOOD'
      output: 'STONE'
      amount: 1
      data:
        color: green
    Code (Text):
    // JAVA

    // Return green
    String color = recipe.getData().get("data.color");
     
  • Loading...
  • Loading...