The Meaning of Life, the Universe, and Everything.
Join Date:
4/25/2011
Posts:
133
Minecraft:
xandayn
Member Details
NOTICE: This mod is no longer in development, I don't the time to work on it anymore, however it is opensource and if someone wants to take over work on it feel free to clone/fork my github repository.
Personalized Recipes
version 1.1.0
The Personalized Recipes mod allows you to add your own custom recipes to minecraft!
How to use...
Using this mod is as simple as you can be, just type /recipe (/rec will work as well, you must be an OP or have cheats enabled, alternatively there is a configuration option to allow you to use the command without cheats) and then the type of recipe you want to add, your options are shaped, shapeless, fuel or smelting (tab command completion works if you forget your options). Once you've entered the command a GUI will open for the correct recipe type (a crafting bench for shaped and shapeless and a furnace for smelting and fuel) just place your recipe in the recipe slots and the item you want it to make in the output slot, hit confirm, and you're ready to craft!
Joining a server that is using the Personalized Recipes mod will automatically grab the servers custom recipes and will allow you to craft any custom recipes that the server has!
Video Example:
UPDATE: You can now remove recipes as well! It's very easy, just add remove to the end of your command, for example: "/recipe shaped remove" (without the quotes) a window will pop up and show you all the custom shaped recipes (use the arrows to navigate between recipes) you've added, find the one you want to remove and click remove, simple!
Known Bugs...
Shaped Recipes cannot be crafted in a 2x2 player inventory.
Creating a recipe appears to duplicate items, however this is a visual bug and will fix itself upon exiting the recipe creator.
When joining a server your singleplayer recipes still appear craftable, but will not work.
When leaving a server the server's recipes will still be craftable, they disappear upon relaunching Minecraft.
Recipes on servers do not get synced to players already logged into the server unless they're the one who used the recipe command. They will sync on relog.
Shapeless recipe not saving properly causing recipes to not save at all.
For Modders...
Integrating your mod with Personalized Recipes, to allow your mod's users to add custom recipes for your custom crafting system is very easy to do, just use RecipeRegistry.registerRecipeHandler, this function takes three parameters, a String, the alias for your recipe (this is the parameter the /recipe command), a Class that extends ICustomRecipeHandler, this is the class that handles actually registering your recipe with your crafting system, and reading and writing your recipes to NBT, and an IRecipeContainerComponent, this handles creating the GUI that appears when the command /recipe <your-crafting-alias> is executed, it also handles turning the itemstack that are placed inside of the GUI into an IRecipe which is used for registering the recipe.
Changelog...
Version 1.1.0:
FEATURE: Added Fuel recipes.
Version 1.0.0:
FEATURE: Added the ability to remove recipes
BUGFIX: Fixed single player recipes appearing on multiplayer servers
BUGFIX: Fixed multiplayer recipes appearing in singleplayer
Version 0.2.133:
BUGFIX: Fixed Shapeless recipe causing recipes to not save and potentially crashing the game.
BUGFIX: Fixed recipes not syncing to all players on a server when someone makes a new recipe.
EDIT: Whoops you're correct I put my personal links in, I'll have them fixed in just a moment.
EDIT 2: Alright they should be working properly now, but I'll leave this link here.
I can, but not tonight, it's quite late where I live right now, there are some examples in the XML file though. I can post an example here as well if it will help.
To create a shaped crafting recipe you would add something like this to the XML file, in between the <recipes> and </recipes> tags.
Anything in (parenthesis) is a comment and shouldn't be written in the XML.
<smelting outputItem="minecraft:dirt"> (The minecraft:dirt is the id for a dirt block you can find all the item id's in the pr_data.txt file)
<itemstack item="minecraft:diamond"/>
</smelting>
So the stuff inbetween the < > is called a tag, it defines some things for the code, the smelting keyword tells my mod that you want to create a smelting recipe. The itemstack tag tells my mod that as part of the recipe you want to use this item (in the above case a diamond) inside of the recipe.
The above recipe will allow you to put a diamond in a furnace and turn it into dirt, really useful if you ask me. You'll note that the itemstack tag is inbetween a <smelting> and </smelting> tag, this tells XML that all of this is part of the smelting recipe.
Let's try one more example this time with a shaped crafting recipe.
So this is similar to the smelting recipe, (in this case we're making a piece of stone from four diamonds) but you should notice one little difference in that this time when we made the itemstack tag we put a value called position, this tells my mod which slot in the crafting bench you want the item to be placed in. In this case we have it so the recipe looks a little like this:
The position value is a number between 0 and 8 and it looks a little bit like this:
012
345
678
(Imagine those numbers are a crafting bench)
Okay one final example, lets make a shapeless recipe:
So the shapeless recipe is very similar to the shaped recipe, the only difference is that you dont need to put in that position variable. Both shapeless and shaped accept up to 9 itemstacks inbetween their tags. The recipe above will make a block of obsidian from a bucket of water and a bucket of lava, and it should be noted that you won't lose your buckets, they'll be placed back in your inventory. I hope this helps, I can make a video tomorrow if not though.
EDIT: Just as a final note, I do plan on writing a program that will help you make recipes a lot easier, I might do that tomorrow evening, but I'm too tired tonight.
ok, I know how to make a recipe ... I spent all night thinking ... but do not know how to do this. You can leave the code crafting. I do not speak English. I use the google translator. me why it's hard to understand this mod.
ok, I know how to make a recipe ... I spent all night thinking ... but do not know how to do this. You can leave the code crafting. I do not speak English. I use the google translator. me why it's hard to understand this mod.
Ah alright, I'm actually going to add in a command and an interface ingame so you can create the recipes ingame, if you would like to tell me what language you speak I can try and find a translator for when I get the command done, but in the mean time the recipe you're looking for is either:
The Meaning of Life, the Universe, and Everything.
Join Date:
4/25/2011
Posts:
133
Minecraft:
xandayn
Member Details
I'm doing a fairly major rework of the system currently, I should have an update in a day or two ready, but be warned because all your old recipes will likely no longer work, but don't worry it will be easy to add new ones, no more messing around with XML files, it will all be done ingame.
The Meaning of Life, the Universe, and Everything.
Join Date:
4/25/2011
Posts:
133
Minecraft:
xandayn
Member Details
Im glad to hear that :D, I wanted to have the new version ready tonight, but it doesn't look like its going to happen, the codes really been kicking my butt, but I know how to fix it and I should be able to get it done tomorrow.
could you take a look at the my custom recipe's because i can only get the smelting to work, i have looked through and it seems to be fine but still nothing works.
Here are my custom recipe's
take in mind that my file does in fact have indentations when needed and are all correct so ignore there not being any here
The Meaning of Life, the Universe, and Everything.
Join Date:
4/25/2011
Posts:
133
Minecraft:
xandayn
Member Details
Well I should hopefully have the new version out today, it's been a lot more troublesome than I thought, and some of the shaped recipes dont work, but Im working on it!
The Meaning of Life, the Universe, and Everything.
Join Date:
4/25/2011
Posts:
133
Minecraft:
xandayn
Member Details
Quick update: I've got the new version working with the commands and saving the recipes and loading them back up, but it isn't ready for release just yet, currently it won't work on multiplayer which is what I need to work on tomorrow, I spent about 5 hours trying to fix a bug where the shaped recipes will only work exactly the way you create them (this bug is present in the original version as well) and was unable to solve it, for example if you make this recipe:
=
you cant put this in:
I'll try to get it fixed after I work on syncing the recipes on multiplayer tomorrow, but no promises.
Isn't that park of what the "shaped" recipes are? they are shaped so you can only make them in one specific way, or do you want it so if there is only one item then it converts it so shapeless?
Well yes and no, the main issue with it is that the shaped recipes wont work in your 2x2 crafting grid in your inventory. because it HAS to be exactly like the recipe you put in AKA it must be done in a crafting bench. Which is not how it is supposed to work. I could have it so there is a 2x2 and 3x3 shaped recipe, but i dont like doing things that way.
I have one word for this: YAAAAAAY! Now I just have to drill a hole into my brain and try to understand how to write the config code. No, I'm not a modder or a coder. Give me a pencil or paintbrush, though, and step aside. Keep up the great work.
To write the code is simple when you understand it's just plain English eg, here's an example for smelting rottenflesh into potatoes cus' why not
The item you want to be given it's as simple as: "outputitem="minecraft:potato"
and the item to input is "itemstack item="minecraft_rotten_flesh" Then all you have to do is add the XML code into i so the mod recocnises that it is a recipe and you're done so...
and you just place that between the: and
That's correct, but it's also important to note that you also need to tell it what kind of output you want to make so instead of just "outputitem="minecraft:potato" it would be "smelting outputItem="minecraft:potato"" and smelting can be replaced with shaped or shapeless as well, (furnace also works but is the same as smelting). But you don't really need to worry anymore because I think Ive got the new version that doesnt use XML ready now! I'm going to release it as a beta for testing, there may still be some game breaking bugs left in it, so you'll need to use it at your own risk. I'll update the main post with links within 30 minutes, just putting the final touches on now.
EDIT: So I sort of jumped the gun a little bit I got so excited that I got the shaped recipes done, that I forgot I still needed to finish the shapeless recipes and furnace recipes xD. That said it shouldn't take too long and I'll have it out today along with a tutorial on how to use the mod.
NOTICE: This mod is no longer in development, I don't the time to work on it anymore, however it is opensource and if someone wants to take over work on it feel free to clone/fork my github repository.
Personalized Recipes
Joining a server that is using the Personalized Recipes mod will automatically grab the servers custom recipes and will allow you to craft any custom recipes that the server has!
Video Example:
UPDATE: You can now remove recipes as well! It's very easy, just add remove to the end of your command, for example: "/recipe shaped remove" (without the quotes) a window will pop up and show you all the custom shaped recipes (use the arrows to navigate between recipes) you've added, find the one you want to remove and click remove, simple!
When joining a server your singleplayer recipes still appear craftable, but will not work.When leaving a server the server's recipes will still be craftable, they disappear upon relaunching Minecraft.Recipes on servers do not get synced to players already logged into the server unless they're the one who used the recipe command. They will sync on relog.Shapeless recipe not saving properly causing recipes to not save at all.Version 2.3.0:
Minecraft 1.7.10
(1.7.10)
https://www.dropbox.com/sh/kc4ldqkbpx4ttw3/AAC1pa6IMfFy1rvuwJkSSPqfa
EDIT: Whoops you're correct I put my personal links in, I'll have them fixed in just a moment.
EDIT 2: Alright they should be working properly now, but I'll leave this link here.
I can, but not tonight, it's quite late where I live right now, there are some examples in the XML file though. I can post an example here as well if it will help.
To create a shaped crafting recipe you would add something like this to the XML file, in between the <recipes> and </recipes> tags.
Anything in (parenthesis) is a comment and shouldn't be written in the XML.
<smelting outputItem="minecraft:dirt"> (The minecraft:dirt is the id for a dirt block you can find all the item id's in the pr_data.txt file)
<itemstack item="minecraft:diamond"/>
</smelting>
So the stuff inbetween the < > is called a tag, it defines some things for the code, the smelting keyword tells my mod that you want to create a smelting recipe. The itemstack tag tells my mod that as part of the recipe you want to use this item (in the above case a diamond) inside of the recipe.
The above recipe will allow you to put a diamond in a furnace and turn it into dirt, really useful if you ask me. You'll note that the itemstack tag is inbetween a <smelting> and </smelting> tag, this tells XML that all of this is part of the smelting recipe.
Let's try one more example this time with a shaped crafting recipe.
<shaped outputItem="minecraft:stone">
<itemstack item="minecraft:diamond" position="0"/>
<itemstack item="minecraft:diamond" position="2"/>
<itemstack item="minecraft:diamond" position="6"/>
<itemstack item="minecraft:diamond" position="8"/>
</shaped>
So this is similar to the smelting recipe, (in this case we're making a piece of stone from four diamonds) but you should notice one little difference in that this time when we made the itemstack tag we put a value called position, this tells my mod which slot in the crafting bench you want the item to be placed in. In this case we have it so the recipe looks a little like this:
The position value is a number between 0 and 8 and it looks a little bit like this:
012
345
678
(Imagine those numbers are a crafting bench)
Okay one final example, lets make a shapeless recipe:
<shapeless outputIem="minecraft:obsidian">
<itemstack item="minecraft:water_bucket"/>
<itemstack item="minecraft:lava_bucket"/>
</shapeless>
So the shapeless recipe is very similar to the shaped recipe, the only difference is that you dont need to put in that position variable. Both shapeless and shaped accept up to 9 itemstacks inbetween their tags. The recipe above will make a block of obsidian from a bucket of water and a bucket of lava, and it should be noted that you won't lose your buckets, they'll be placed back in your inventory. I hope this helps, I can make a video tomorrow if not though.
EDIT: Just as a final note, I do plan on writing a program that will help you make recipes a lot easier, I might do that tomorrow evening, but I'm too tired tonight.
Ah alright, I'm actually going to add in a command and an interface ingame so you can create the recipes ingame, if you would like to tell me what language you speak I can try and find a translator for when I get the command done, but in the mean time the recipe you're looking for is either:
<shaped outputItem="minecraft:stonebrick" outputMeta="3">
<itemstack item="minecraft:stone_slab" position="4"/>
<itemstack item="minecraft:stone_slab" position="7"/>
</shaped>
<shapeless outputItem="minecraft:stonebrick" outputMeta="3">
<itemstack item="minecraft:stone_slab" metadata="5"/>
<itemstack item="minecraft:stone_slab" metadata="5"/>
</shapeless>
I hope this helps.
I speak Spanish
Haha yeah I will, it will be really simple this time though, I promise!
<smelting outputItem="minecraft:iron_ingot" outputCount="5">
I can see the error, and I believe it's a error I made in the XML's comments I remember seeing it before and thinking "Oops"
<smelting outputItem="minecraft:leather">
<itemstack item="minecraft:rotten_flesh">
</smelting>
is what you have, you itemstack line is where the issue starts:
<smelting outputItem="minecraft:leather">
<itemstack item="minecraft:rotten_flesh"/>
</smelting>
notice the / on the end of the itemstack.
=
you cant put this in:
I'll try to get it fixed after I work on syncing the recipes on multiplayer tomorrow, but no promises.
Well yes and no, the main issue with it is that the shaped recipes wont work in your 2x2 crafting grid in your inventory. because it HAS to be exactly like the recipe you put in AKA it must be done in a crafting bench. Which is not how it is supposed to work. I could have it so there is a 2x2 and 3x3 shaped recipe, but i dont like doing things that way.
That's correct, but it's also important to note that you also need to tell it what kind of output you want to make so instead of just "outputitem="minecraft:potato" it would be "smelting outputItem="minecraft:potato"" and smelting can be replaced with shaped or shapeless as well, (furnace also works but is the same as smelting). But you don't really need to worry anymore because I think Ive got the new version that doesnt use XML ready now! I'm going to release it as a beta for testing, there may still be some game breaking bugs left in it, so you'll need to use it at your own risk. I'll update the main post with links within 30 minutes, just putting the final touches on now.
EDIT: So I sort of jumped the gun a little bit I got so excited that I got the shaped recipes done, that I forgot I still needed to finish the shapeless recipes and furnace recipes xD. That said it shouldn't take too long and I'll have it out today along with a tutorial on how to use the mod.