The Meaning of Life, the Universe, and Everything.
Join Date:
9/17/2013
Posts:
52
Member Details
You could just add a crafting recipe with your custom planks into the CraftingManager that has the same output (A door)
GameRegistry.addCrafting(new ItemStack(Block.door, 1), "xx", "xx", "xx", 'x', customPlanks);
// This is off the top of my head, so it may be slightly wrong, but that's the type of statement you'll want.
EDIT: One issue you will have is making the recipes the way I coded above will only work with your planks specifically (can't mix different types). I know that Minecraft uses planks with metadata to actually create the different kinds (Oak, Jungle, etc). I'm not sure if there is a way to add planks through that metadata. I doubt it since you would probably have to modify the base classes, but if there is a way you could look into that. It would automatically substitute for you and you wouldn't need to worry about crafting recipes... I didn't really think this out the whole way before posting.
@Gernomino
I already had both your ideas, but editing base classes is beyond question and the thing with the crafting recipes is not really pretty, so I was looking for something better.
So I think I'll have a look at the ore dictionary.
EDIT: Found some things about it. but don't really understand how to add new planks...
Maybe I'm stupid, but I don't understand it. All the tutorials about the ore dictionary are about how useful it is, if you've got several mods.
My problem is that I didn't find anything explicitly invoking the item substitution. What should I do, if I want the stonewoodplanks to be treated as normal planks, so they can be used to craft doors, sticks etc. ...?
Also, would this work, if I wanted to add something that can be used to grow plants, like bonemeal?
E. g. if I want to craft a normal wooden door from my custom planks?
GameRegistry.addCrafting(new ItemStack(Block.door, 1), "xx", "xx", "xx", 'x', customPlanks);
// This is off the top of my head, so it may be slightly wrong, but that's the type of statement you'll want.
EDIT: One issue you will have is making the recipes the way I coded above will only work with your planks specifically (can't mix different types). I know that Minecraft uses planks with metadata to actually create the different kinds (Oak, Jungle, etc). I'm not sure if there is a way to add planks through that metadata. I doubt it since you would probably have to modify the base classes, but if there is a way you could look into that. It would automatically substitute for you and you wouldn't need to worry about crafting recipes... I didn't really think this out the whole way before posting.
I already had both your ideas, but editing base classes is beyond question and the thing with the crafting recipes is not really pretty, so I was looking for something better.
So I think I'll have a look at the ore dictionary.
EDIT: Found some things about it. but don't really understand how to add new planks...
This would work.
Also you may want to look at this for how to use the Ore Dict: http://www.minecraftforge.net/wiki/How_to_use_the_ore_dictionary
Found this (to me) unkown site: http://minecraftmodcustomstuff.wikia.com/wiki/Ore_Dictionary
That information may help ya out somewhat.
My problem is that I didn't find anything explicitly invoking the item substitution. What should I do, if I want the stonewoodplanks to be treated as normal planks, so they can be used to craft doors, sticks etc. ...?
Also, would this work, if I wanted to add something that can be used to grow plants, like bonemeal?
Hello!