// RecipesRedone | [1.8-1.12] | [API Hooks] \\ 1.6.3

[1.5] Ability to create recipes in-game has been added!

  1. TheTealViper
    Tested Minecraft Versions:
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    [​IMG]
    Note: I lied when I said throw the vanilla recipe system out the window once you install this. You still need it for vanilla recipes. It was meant to be a figure of speech. I'm a dirty liar.

    I don't have my computer for graphics right now so forgive me for the lack of aesthetic on this post. RecipesRedone, what is it? RecipesRedone is my, a developer's, take on the crafting system. It came about by it's necessity for another one of my plugins. The vanilla crafting system is small, can only require vanilla items, can only output one item, and is missing other seemingly-important (to me a dev) features. RecipesRedone fixes all these problems and allows plugin developers with access to its API, AS WELL AS SERVER OWNERS WITH ACCESS TO A TXT FILE EDITOR, the ability to create a more modern system of custom recipes. Also, you can craft items with custom textures!

    Update: If you want a piece of software that acts as a GUI that you configure and it handles the .yml stuff for you, check out MCG RR Maker by
    mmuziek
    Requirements:
    • Java 8
    Method of Implementation Ideas:
    • items -> currency
    • tokens -> enchantments
    • upgrading tiers

    Example Pictures
    Headnote: All these recipes were created with txt files any server staff could have made. No developers necessary.
    Here is an extremely simple example of a txt recipe. Take note that the crafted item is fully customized and has enchantments.
    [​IMG]
    [​IMG]
    Code (Text):

    permission: "simpleExample"
    recipe:
     0:
      id: "280:0"
    reward:
     0:
      id: "280:0"
      amount: 1
      name: "&c&lPapa's Whipping Stick"
      lore:
       - "&r&7Don't f*ck with papa"
       - "&r&7or you get the whip."
      enchantments:
       - "damage:5"
       - "knockback:20"
       - "fireaspect:1"
     


    Here is a slightly more advanced txt recipe. Take note that the sword being created has a stack size of 2.
    [​IMG]
    [​IMG]
    Code (Text):

    permission: "intermediateExample"
    recipe:
     1:
      id: "280:0"
     4:
      id: "280:0"
     7:
      id: "280:0"
     9:
      id: "280:0"
     10:
      id: "264:0"
     11:
      id: "280:0"
     13:
      id: "264:0"
     16:
      id: "264:0"
    reward:
     4:
      id: "276:0"
      amount: 2
      name: "&c&lZeus's Punisher"
      lore:
       - "&r&7No saving whoever this smites..."
      enchantments:
       - "damage:5"
       - "knockback:20"
       - "fireaspect:1"
      tags:
       - "durability:0"
     


    In this case, I used a custom item from another recipe in the recipe to make a shovel. In other words, custom items outputted from one recipe can be used as input in another recipe simply by copy-pasting it. Also, take note that the redstone in the Magical Crystal recipe requires a stack size of 2.
    [​IMG]
    [​IMG]
    [​IMG]

    Code (Text):

    permission: "complicatedExample1"
    recipe:
     0:
      id: "331:0"
      amount: 2
     1:
      id: "265:0"
     2:
      id: "331:0"
      amount: 2
     3:
      id: "265:0"
     4:
      id: "264:0"
     5:
      id: "265:0"
     6:
      id: "331:0"
      amount: 2
     7:
      id: "265:0"
     8:
      id: "331:0"
      amount: 2
    reward:
     0:
      id: "264:0"
      amount: 1
      name: "&c&lMagical Crystal"
      lore:
       - "&r&7This crystal is rumored to forge magical tools..."
     
    Code (Text):

    permission: "complicatedExample2"
    recipe:
     0:
      id: "264:0"
      amount: 1
      name: "&c&lMagical Crystal"
      lore:
       - "&r&7This crystal is rumored to forge magical tools..."
     3:
      id: "280:0"
     6:
      id: "280:0"
    reward:
     0:
      id: "277:0"
      amount: 1
      name: "&c&lMagical Shovel"
      lore:
       - "&r&7Where did this come from?!"
      enchantments:
       - "digspeed:20"
     

    [​IMG]
    Features Added Since Release
    ⟿ [1.3] :
    - Added the ability to craft 1x, 16x, 32x, or 64x of an item instead of just 1. This changed the API so ensure that you update anything that relied on the 'getCustomGui' method. Also, there was a config update so you can customize these new items of the UI.
    ⟿ [1.4] :
    - Added the whole recipe tutorial system. Now tutorials for how to craft recipes can be seen in the Recipe Tutorial GUI accessed (by default) with '/recipestutorial'. Added new variables to ModernRecipe API and text file configuration.
    - UI buttons can now make a noise.
    - Ability to craft custom textured items
    - Damage tag allowing custom damage
    • Understand https://www.spigotmc.org/wiki/custom-item-models-in-1-9-and-up/ and how it works.
    • In your item configuration, the number after the colon is the durability value or you could use the tag durability. Either way works. Each durability value means a new texture but you should know that from the previous link.
    • In your item configuration, add the tag 'unbreakable'
    • In your item configuration, add the flags 'HIDE_ATTRIBUTES' and 'HIDE_UNBREAKABLE'
    ⟿ [1.5] :
    - Added an game recipe creator. Now recipes can be created in game. These recipes created in game copy ALL INFORMATION about an item and can be used to create perfectly complex recipes.
    [​IMG]
    - Added /reloadrecipes and /createrecipe. Both require the permission "recipesredone.admin"
    ⟿ [1.6] :
    - Not everybody knows how to or wants to work custom resource packs. Now there is no need as you can create custom textured skulls!

    ModernRecipe Features
    With the modernrecipe format, recipes created will be able to utilize features unlike anything the vanilla system ever allowed.
    ⟿ Craft based off orientation, not position : When you create a recipe, it is automatically saved in all other positions where orientation is held true.
    ⟿ Control over position of output items : With that said, you can still control the position of the outputted items. This can be used for example to trade a custom crafted token in for a full set of armor helmet on top to boots on the bottom.
    ⟿ More than one output : Continuing off that last point, yes, you can output more than one item. You want a recipe where a full iron set of armor + some gold turns into a full set of gold armor? You can do that.
    ⟿ Amount control : Vanilla crafting requires 1 of each item. This is no longer the case with RecipesRedone. You want a recipe requiring a stack size of 5 of everything? You can do that.
    ⟿ Permission integration : Another thing you can't do with vanilla recipes: require permissions per recipe. ModernRecipes have optional permission requirements.
    ⟿ Recipe tutorial GUI : ModernRecipes automatically get added into the recipe tutorial GUI (but can be removed easily if wanted). The recipe tutorial GUI's look can be modified in config.yml. It also supports multiple pages of both categories & recipes!
    ⟿ Custom Textured Items : Do you want to craft items with fully custom textures (looks)? You can do that. Refer to 'Features Added Since Release' version 1.4 for the tutorial.
    [​IMG]
    [​IMG]
    [​IMG]

    GUI Features
    With a customizable GUI, unlike that vanilla system, the possibilities are endless.
    ⟿ Big space for both input & output : Take that 3x3 grid and toss it out the window. Both input and output have been upgraded to 3x6 grids to allow for complex setups.
    ⟿ Fully customizeable title and UI items : You don't want to look like every other server out there. You want to stand out. I get it. I hear you loud and clear. With RecipesRedone you can make your UI look completely different from all the others.
    ⟿ Customizeable command : Following the customizability train of thought, you're also gonna want a custom command to open the menu. I got you covered.
    ⟿ Require a workbench : Some might see this project and think it too "far out" and overpowered. Well, imagine how they would feel if I told them you can open this giant powerhouse anytime/anywhere you want. With that concern in mind, you can enable the requirement for players to be looking at a workbench to open the menu.
    Server Staff Features
    I get it. Sometimes a staff member just wants one tiny feature and doesn't have the ability to code it themselves and is forced to struggle finding someone to make it for them. With RecipesRedone, you don't need a dev to create recipes for you, you can make them yourself.
    ⟿ Text file recipes : Simple and intuitive txt file recipe creation. You don't need a dev, all you need is notepad to use this plugin :).
    ⟿ In game recipe maker : Simple and intuitive in game gui recipe creation. Forget the text files, just make them in game!

    API Features
    If this plugin is going to attempt to compete with the vanilla crafting system, it has to allow devs to hook into it's features.
    ⟿ API based recipes : Create recipes from other plugins for whatever reasons you might have. Again, the whole point of the API is for people to be able to utilize it however they creatively want.
    ⟿ RecipeRedoneCraftEvent : Want to add custom parameters for crafting that aren't available in this plugin? Just listen in to the RecipeRedoneCraftEvent like any other event and cancel it if it doesn't meet your standards.
    ⟿ Custom Menu Check : Rather than reinventing the wheel, you can use InventoryClickEvent to check if the custom crafting menu has been clicked in conjunction with the API's simple 'isCraftingGui' method.
    ⟿ Custom GUI menus : Not only do servers want to look different from each other, but so do plugins. Open your own self-creating, customized crafting GUI with 'getCustomGui'.
    [​IMG]

    Server Staff Tutorial
    Here you will find information about the config and txt file recipe creation. Also spigot formatting won't allow me to properly put this in a spoiler bubble so sorry but I have to use three I guess?
    Headnote:
    With the plugin, I have included 4 example recipes in hopes of better demonstrating the possibilities of this plugin. Once installed and understood, these can be deleted. All recipes are placed/created inside the 'plugins/RecipesRedone/recipes' folder. I DON'T UNDERSTAND WHY SPIGOT IS FUCKING MY SPOILERS BUT IT'S NOT MY FAULT THEY ARE FORMATTED SO BAD!

    Creation:
    All recipes will have to include 3 things: 'permission', 'recipe', 'reward'
    [​IMG]
    For 'permission', it is optional to require a permission but it is not optional to fill it out. If you do not want to require a permission, make it "".
    [​IMG]
    Both 'recipe' and 'reward' (input and output) act similarly so I'll just talk through 'recipe' because almost everything I say will carry over directly. In 'recipe' there is potential for you to fill in 18 items whose names range from 0-17.
    [​IMG]
    Each one of these numbers, 0-17, mark an item that will be required for input on the left side. Each number represent the slot that the item will need to be in. Remember the item is orientation based so it will automatically adjust for all other possible positions as long as you create it as close to the top left corner as you can.
    [​IMG]
    Let's say that I want to create a recipe where you mix all redstone, iron, gold, and diamonds into an emerald. To do so, I will be using slots 0, 1, 3, and 4. Because I'm not using all the rest, I can just completely leave them out of the txt file.
    [​IMG]
    Now that I have the items I know I will be using, it's time to fill them in. Formatting here is very simple. You have the options 'id', 'amount', 'name', 'lore', 'enchantments', 'tags', and 'flags'. All of these are optional to include other than 'id'. THE ID FORMAT MUST BE "#:#". EVEN IF THE INTERNET SAYS THE ID IS JUST 57. THE ID WOULD BE "57:0". Also, 'enchantments', 'tags', and 'flags' are explained at the bottom of this tutorial.
    [​IMG]
    If you wanted to for example, just include vanilla items like I am here, you would only need to fill out the id's of these.
    [​IMG]
    Now to work on the 'reward', aka the output. I want it to output an emerald but I'm going to customize the emerald just to show how this works. I will make this emerald a stack of 67, with enchantments (completely not possible through vanilla crafting system). Also just to show that it's possible to control placement, I'm going to make it output in slot 15 because why not. 'ENCHANTMENTS' FORMAT IS "ENCHANTMENT:#". The number is the level of the enchantment and can be as high as you want. I believe the highest it can be meaningfully is 200 though.
    [​IMG]
    Finally you have the options of 'category' and 'tutorial'. If you wish the recipe to not be shown in the tutorial GUI, then include 'tutorial: false'. If you wish it to be in a custom category in the tutorial GUI, then include 'category: <CATEGORY>'.
    [​IMG]
    Now I'll save this to 'plugins/RecipesRedone/recipes/' and reload.

    Enchantments: Enchantments can be placed on ANY item. However, their effect may change depending on which item they are placed on and/or may just not do anything at all. For this reason I can't really describe what they do, you just have to use common sense.
    - arrowdamage
    - arrowfire
    - arrowinfinite
    - arrowknockback
    - damage
    - digspeed
    - durability
    - fireaspect
    - knockback
    - lootbonusblock
    - lootbonusmob
    - luck
    - protectionfall
    - protectionfire
    - silktouch

    Tags: Tags can not be placed on any item and can potentially break your recipe if used incorrectly.
    - "skullskin:<PLAYERNAME>" : Changes the skin of a skull to a player's
    - "skulltexture:<TEXTURE>" : Explained below
    - "durability:#" : Changes the durability of an item with durability. 0 is perfect condition and the higher you go, the more work the item gets. Different items have different breaking durabilities.
    - "unbreakable" : Makes a tool unbreakable.
    - "damage:#" : Useful for custom textured items. Default damage is 1.

    Flags: Flags can be placed on any item and do what they say basically
    - HIDE_ATTIBUTES
    - HIDE_DESTROYS
    - HIDE_ENCHANTS
    - HIDE_PLACED_ON
    - HIDE_POTION_EFFECTS
    - HIDE_UNBREAKABLE

    Custom Skull Texture:
    • Find a head @ "https://minecraft-heads.com"
    • Once a head is found, click on it and search the "Loot table" text box for a part called "Value"
    • It will look something like
    • Value:\"<You Want To Copy All This>\"
    • Copy the text starting after the first " and before the second \
    • Paste that @ "https://www.base64decode.org/" and decode it
    • It will look something like
    • {"textures":{"SKIN":{"url":"http://textures.minecraft.net/texture/<You Want To Copy All This>"}}}
    • Copy the indicated section


    API Tutorial
    Here you will find information about the config and txt file recipe creation.
    Firstly, if you want to use this API, ensure that your plugin.yml is setup correctly. It must include the highlighted line. If you don't know what I'm talking about, you should go do some research and stop reading this tutorial.
    [​IMG]
    Code (Text):
    public void whateverMethod(){
        //How to get the plugin in case we want to do anything with it
        RecipesRedone plugin = Bukkit.getPluginManager().getPlugin("RecipesRedone");
     
        //How to create a new recipe using
        //new ModernRecipe(recipeRow1, recipeRow2, recipeRow3, recipeRow4, recipeRow5, recipeRow6, recipeMap, rewardRow1, rewardRow2, rewardRow3, rewardRow4, rewardRow5, rewardRow6, rewardsMap, permission, makeThisFalse)
        /*
         *Recipes created using this constructor are created the same as normal recipes in a sense.
         *'recipeRow1', 'rewardRow1', etc. are 3 character long strings such as "iis"
         *These strings form the shape of the 3x6 grid
         *recipeRow1
         *recipeRow2
         *recipeRow3
         *recipeRow4
         *recipeRow5
         *recipeRow6
         *Along with the characters identifying the item in each slot, we also need a copy of the item itself
         *'recipeMap' and 'rewardsMap' are already filled out Map<Character, ItemStack>
         *In these maps, put each character used in the string along with the itemstack it represents
         *If you want a spot to be blank, put the value null in the map
         *I don't want a permission so to make it no permission, use ""
         *The final value is always false. Don't ask me why and don't set it to true or you'll break stuff.
         *The recipe is registered automatically to RecipesRedone upon the ModernRecipe's creation.
         */
         Map<Character, ItemStack> recipeMap = new HashMap<Character, ItemStack>();
         recipeMap.put('i', new ItemStack(Material.IRON_INGOT));
         recipeMap.put('g', new ItemStack(Material.GOLD_INGOT));
         recipeMap.put('d', new ItemStack(Material.DIAMOND));
         recipeMap.put('X', null);
         Map<Character, ItemStack> rewardsMap = new HashMap<Character, ItemStack>();
         rewardsMap.put('e', new ItemStack(Material.EMERALD));
         rewardsMap.put('X', null);
         ModernRecipe mr = new ModernRecipe("iii", "XXX", "ggg", "XXX", "ddd", "", recipeMap, "eXX", "XXX", "XXX", "XXX", "XXX", "XXX", rewardsMap, "", false)
         /*If you wish to change information for the recipe tutorial GUI
          *look at the variables 'category' and 'showRecipeTutorial'.
          */
     
         //To unregister a recipe use your copy of the plugin you got earlier (at the top of this)
         plugin.unregisterRecipe(mr);
     
         //If you for some reason want to reregister a recipe you have manually unregistered, you can with
         plugin.registerRecipe(mr);
    }
    [​IMG]
    • All recipes work on any RecipesRedone menu from any plugin
    • Recipes can work in any orientation but there is no toggle to turn this off and REQUIRE POSITIONS
    • Can't right click drag the last item added
    • Can't craft multiple simultaneously but this can't be fixed. This happens because you can require itemstacks of any value and there is no workaround EDIT: THIS WAS ADDED IN 1.3
    [​IMG]
    As I said, I'm just a college student. This is just a hobby. You have no need to give me money. However, if you wish to help pay for my overpriced books and classes, that would be extremely appreciated.
    -_- https://paypal.me/AaronSkeels -_-
    HollyPlayer007 likes this.

Recent Reviews

  1. HollyPlayer007
    HollyPlayer007
    5/5,
    Version: 1.6.1
    Awesome update! I love the custom texture skulls! Thank you! I'll continue to update. :)
    1. TheTealViper
      Author's Response
      Awesome! Thanks for the review :)
  2. HollyPlayer007
    HollyPlayer007
    5/5,
    Version: 1.4.4
    Great plugin. No errors and no problems so far. Easy installation. I would really love to see commands and the option to create recipes ingame.
    1. TheTealViper
      Author's Response
      Thanks for the review! I've tried to think of possible ways to create recipes in-game but I'm not too sure how I would even want the functionality to work. I'll have to keep thinking :)