Heyho guys!
I assume you read the Thread Title as you are reading this and that you are curious what MMORPG API means
Well while my main target is to create a simple way to let you create an awesome MMORGP/RPG experience for Minecraft!
However you should be capable of coding to achieve this D:
Now you might think: How exactly should that API help to do this?
You can read about that further bellow but one thing should be clear to you:
Dark Roleplay Core isn't a simple API that just adds a few lines of code and Methods,
but it adds a bunch of new content/systems to the game (at least a bunch is planed for the near future :P)
It's sometimes hard to create crafting recipes that are even close of beieng realistic or comprehensible,
now this Crafting System solves most of the problem and opens endless new doors for you:
With a completely new GUI:
Made as user friendly as possible and getting rid of the need of NEI for players playing larger modpacks or a good tutorial you would need to create.
It's supporting nearly infinite amounts of Recipe Categories (The names are Localized),
infinite amounts of Recipes, locking recipes for players and even the requirement to learn some recipes and everything can be used as simple as Minecraft Vanilla Recipes.
(Of course there is also a tool tip as you hover over the recipes.)
As soon as you choose what you want to craft and klick on the recipe it takes you to this GUI:
Containing a preview of the Item you want to craft and also up to 6 additional outputs.
And a slider that lets you choose how much you want to craft of everything. (Not working yet)
Oh and before i forget it, there is also a list of all required ingredients Oh and don't worry you can use as much of them as you wan't as there is an awesome slider (Also not working yet, sorry)
As soon as you klick that Button with the Anvil it crafts that Item for you by sending the instructions to the server.
Wait what? Oh I have forgotten to tell you that everything to this point is client side, that is also the reason why the inventory at the bottom is just an overview and cannot be used.
That is all for now but you can easily create much more complex recipes by yourself Code Snippets how to do all that can be found at the bottom.
One second.... you didn't wanted to craft that "Flower Pot"(Content of another mod using this Mod)?
Well just klick on return and you will be send back to the recipe selection where ever you left it ^^
Thread will be continued later as Minecraftforum doesn't support drafts....
The boolean this method returns will always be true unless there is already a recipe with the same registry name.
The Parameters:
Stations: Well that's just a Block, you can open the Crafting GUI by pressing "C" (Default Key).
You do not need any Crafting Stations for this like Minecrafts Workbench but in case you wan't to create a recipe that for example needs a custom bench you made just pass the block here and the Recipe will not appear at any other crafting stations.
Category: That's the category your recipe will be sorted in. (It will be converted into a localizable String (crafting.category.YOURNAME.name) and needs to be inserted into the lang files).
Recipe: Now it's getting interesting:
Simple Recipes are the main Recipe type (which can be extendet of course),
I will show you how to create them further below, basicly it's just the recipe you want to add.
requiresUnlock: This one is interesting too! In case you want to make this recipe some late game recipe you can simply lock it, and unlock it for separate players when ever you want!
Now let me explain the Simple Recipe a little bit closer:
new SimpleRecipe(new ResourceLocation(DarkRoleplayMedieval.MODID, "simple_chair_oak"),
new ItemStack[]{new ItemStack(DRPMBlocks.SIMPLE_CHAIR_OAK, 1, 0)},new ItemStack[]{new ItemStack(DRPMItems.Plank, 8, 0)})
It has 2 constructors but I will only talk about the more important one
registryName: That's the registry name it just works like registry names for items and blocks.
mainOutput: That is as the name already tells just a list of Outputs you get from this recipe.
However don't forget that the first ItemStack in the list equals the Main Output of the recipe and will be used in the recipe-preview as well as in the recipe-selection.
mainIngredients: That's also just a simple list of ItemStacks but this time this are ingredients. Basicly you are only limited here in the maximum size JAVA allows for Arrays
Here is a full exapmle: (Code Snippet out of the Dark Roleplay Medieval Mod)
CraftingRegistry.registerRecipe(
Blocks.AIR, //Crafting Station
"food_ingredients", //Category Name
new SimpleRecipe(
new ResourceLocation( //Registry Name
DarkRoleplayMedieval.MODID,
"dough_wheat_pumpkin"),
new ItemStack[]{ //Recipe Output List
new ItemStack(
DRPMItems.DoughPumpkin, 3, 0)
},
new ItemStack[]{ //Recipe Input List
new ItemStack(
DRPMItems.FlourWheat,3,0),
new ItemStack(Items.WATER_BUCKET, 1, 0),
new ItemStack(Items.PUMPKIN_SEEDS,9,0)
}
),
false); //This recipe is unlocked from the beginning
+ Added Just Enough Items Support
+ Added auto craft when craft button hold
+ Added hovering information for crafting GUI
+ Added craft multiplier (needs activation in config)
+ Added ability to scroll craft ingredients when there are more than 9
* Fixed crafting a little bit (you no longer need to restack your items)
I assume you read the Thread Title as you are reading this and that you are curious what MMORPG API means
It's supporting nearly infinite amounts of Recipe Categories (The names are Localized), infinite amounts of Recipes, locking recipes for players and even the requirement to learn some recipes and everything can be used as simple as Minecraft Vanilla Recipes. (Of course there is also a tool tip as you hover over the recipes.)
As soon as you choose what you want to craft and klick on the recipe it takes you to this GUI:
Placeholder Post for Code Snippets and Tutorials of how to use this API
Crafting:
The way to add Recipes is to use the CraftingRegistry class provided by this mod.
In there you will find following method:
The boolean this method returns will always be true unless there is already a recipe with the same registry name.
The Parameters:
Stations: Well that's just a Block, you can open the Crafting GUI by pressing "C" (Default Key).
You do not need any Crafting Stations for this like Minecrafts Workbench but in case you wan't to create a recipe that for example needs a custom bench you made just pass the block here and the Recipe will not appear at any other crafting stations.
Category: That's the category your recipe will be sorted in. (It will be converted into a localizable String (crafting.category.YOURNAME.name) and needs to be inserted into the lang files).
Recipe: Now it's getting interesting:
Simple Recipes are the main Recipe type (which can be extendet of course),
I will show you how to create them further below, basicly it's just the recipe you want to add.
requiresUnlock: This one is interesting too! In case you want to make this recipe some late game recipe you can simply lock it, and unlock it for separate players when ever you want!
Now let me explain the Simple Recipe a little bit closer:
new SimpleRecipe(new ResourceLocation(DarkRoleplayMedieval.MODID, "simple_chair_oak"),
new ItemStack[]{new ItemStack(DRPMBlocks.SIMPLE_CHAIR_OAK, 1, 0)},new ItemStack[]{new ItemStack(DRPMItems.Plank, 8, 0)})
It has 2 constructors but I will only talk about the more important one
registryName: That's the registry name it just works like registry names for items and blocks.

mainOutput: That is as the name already tells just a list of Outputs you get from this recipe.
However don't forget that the first ItemStack in the list equals the Main Output of the recipe and will be used in the recipe-preview as well as in the recipe-selection.
mainIngredients: That's also just a simple list of ItemStacks but this time this are ingredients. Basicly you are only limited here in the maximum size JAVA allows for Arrays
Here is a full exapmle: (Code Snippet out of the Dark Roleplay Medieval Mod)
New Version!
Changelog:
+ Added Just Enough Items Support
+ Added auto craft when craft button hold
+ Added hovering information for crafting GUI
+ Added craft multiplier (needs activation in config)
+ Added ability to scroll craft ingredients when there are more than 9
* Fixed crafting a little bit (you no longer need to restack your items)
Download: https://minecraft.curseforge.com/projects/dark-roleplay-core/files/2411013
Download Deob: https://minecraft.curseforge.com/projects/dark-roleplay-core/files/2411012
hmm interesting