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
Method of Implementation Ideas:
items -> currency
tokens -> enchantments
upgrading tiers
Commands: (Side note: Commands are all able to be changed in the config and these are just the default commands)
/recipesredone - Opens the custom crafting GUI
/recipestutorial - Opens the tutorial GUI in which tutorials for each custom recipe are shown.
/createrecipe - Opens the in-game recipe creation menu. Requires "recipesredone.admin" permission.
/reloadrecipes - Reloads the custom recipe configs and craftable custom recipes. Requires "recipesredone.admin" permission.
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.
Code (Text):
permission: simpleExample
recipe:
'0':
id: STICK
reward:
'0':
id: STICK
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.
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.
⟿ [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
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.
- 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!
⟿ [1.20.1.a.1] : - Updated to support 1.20
- Added support for custommodeldata
- Added support for playerskulls
- Added support for textureskulls
- Added support for enchantment glow without enchantments
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.
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'.
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'
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 "".
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.
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.
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.
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 ALL CAPS. Also, 'enchantments', 'tags', and 'flags' are explained at the bottom of this tutorial.
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.
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.
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>'.
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.
Scroll to Other -> Minecraft-URL -> Copy this text
Paste this text "textureskull:____" in the underline position
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.
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);
}
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 click and drag the last item added. You must do a solid left or right click for the recipe completion check to run.
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
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 -_-