The Meaning of Life, the Universe, and Everything.
Join Date:
8/16/2011
Posts:
50
Minecraft:
dev909
Member Details
Hey just wondering how I can add multiple wood plank types to a recipe, such as how you can craft wooden swords and use any wood type. For now this is what I got:
ItemStack stickStack = new ItemStack(Item.stick);
ItemStack plankStack = new ItemStack(Block.planks);
ItemStack cobbleStack = new ItemStack(Block.cobblestone);
ItemStack ironStack = new ItemStack(Item.ingotIron);
ItemStack goldStack = new ItemStack(Item.ingotGold);
ItemStack diamondStack = new ItemStack(Item.diamond);
GameRegistry.addRecipe(new ItemStack(Item.knifeWood), "y ", " x",
'x', stickStack, 'y', plankStack);
And it will only use oak planks, no other type. Is there a way to select all types?
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
The Meaning of Life, the Universe, and Everything.
Join Date:
8/16/2011
Posts:
50
Minecraft:
dev909
Member Details
One more bothersome question. Is there anyway to specifically select which wood type, instead of selecting all? Is it something to do with metavalues?
EDIT:
Never mind I figured it out
For anyone that wants to know how to do it set the BlockWood.planks metadata to 0 for oak, 1 for spruce, 2 for birch and 3 for jungle.
And it will only use oak planks, no other type. Is there a way to select all types?
together they are powerful beyond imagination."
Thanks alot! Kudos to you
EDIT:
Never mind I figured it out
For anyone that wants to know how to do it set the BlockWood.planks metadata to 0 for oak, 1 for spruce, 2 for birch and 3 for jungle.