05.07.2013, 12:09
Hi!
(First, sorry for bad English, im Hungarian :3)
With this include, you can make things in 3x3 grid. (like in game named "Minecraft")
The include just have the mechanism.. search, adding.. etc.
You must create the GUI(3x3 grid), connect to inventory.. etc.
Every grid of square have identifier. ( 0-8 )
The top lane is: 0-1-2
.. second lane: 3-4-5
.. third lane: 6-7-8
You must know this, to making recipes.
The recipes structure: [GRID ID:ITEM ID]
.. so, that is a complete recipe: "[0:1][1:1][2:1][3:2]"
Thats the way to how add recipes: addRecipe( name[], IDs[], {Float,_}:... );
Previous recipe looks like this: addRecipe( "Thing", "0123", 1112 );
(Ex.: 1 is Wood and 2 is Stone)
If you are not visualic type, you can use a function to print recipes to console.
printRecipe( recname[] );
Previous example looks like this: printRecipe( "Thing" );
To check the recipe is correct( in 3x3 grid ), you can use this: returnRecipe( recipe[] );
The returned value two different can be: -1 if the recipe not exist.
recipe id if the recipe exist.
Get recipe name from ID: getRecipeName( recipeid );
Get recipe name from recipe name: getItemNameFromRecipe( recipe[] );
If you have any question, just write to here.
Link: download
Fl0rian (dexi)
(First, sorry for bad English, im Hungarian :3)
With this include, you can make things in 3x3 grid. (like in game named "Minecraft")
The include just have the mechanism.. search, adding.. etc.
You must create the GUI(3x3 grid), connect to inventory.. etc.
Every grid of square have identifier. ( 0-8 )
The top lane is: 0-1-2
.. second lane: 3-4-5
.. third lane: 6-7-8
You must know this, to making recipes.
The recipes structure: [GRID ID:ITEM ID]
.. so, that is a complete recipe: "[0:1][1:1][2:1][3:2]"
Thats the way to how add recipes: addRecipe( name[], IDs[], {Float,_}:... );
Previous recipe looks like this: addRecipe( "Thing", "0123", 1112 );
(Ex.: 1 is Wood and 2 is Stone)
If you are not visualic type, you can use a function to print recipes to console.
printRecipe( recname[] );
Previous example looks like this: printRecipe( "Thing" );
To check the recipe is correct( in 3x3 grid ), you can use this: returnRecipe( recipe[] );
The returned value two different can be: -1 if the recipe not exist.
recipe id if the recipe exist.
Get recipe name from ID: getRecipeName( recipeid );
Get recipe name from recipe name: getItemNameFromRecipe( recipe[] );
If you have any question, just write to here.
Link: download
Fl0rian (dexi)