Posted October 30, 20168 yr I know to make recipes n such I need the knowledge of the X's. But I have forgotten this stuff, and I need to find it again... google, bing, yahoo have failed me once again. (most likely because im typing in the wrong thing) example of what I'm talking about: GameRegistry.addRecipe(new ItemStack(GuruItems.NETHER_ORB), new Object[] {" X ", "X X", " X ", 'X', Item.getItemFromBlock(Blocks.OBSIDIAN)}); I know this results in top right left and down needing to be placed. But I need some kind of visualization of what XX or X is where and what not. the end result being 4 pieces of obsidian in the corners 4 elements in top right left down and a slime ball in the middle taking up all spaces in the crafting grid. Help would be nice, cuz I feel pretty dumb not being able to recall this, or for that matter being able to look it up -.-
October 30, 20168 yr You have 3 Strings, each of size 3, defining row 1, 2 and 3 of the crafting grid. You can see it like this: GameRegistry.addRecipe(new ItemStack(GuruItems.NETHER_ORB), new Object[] { " X ", // top row "X X", // middle row " X ", // bottom row 'X', Item.getItemFromBlock(Blocks.OBSIDIAN)}); This is your recipe. After that there is a character ( 'X' ) and an Item. This tells the CraftingManager that the 'X' s in the recipe are obsidian. Also, you can omit the new Object[] , as it's a varargs parameter. Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
October 31, 20168 yr Hi ^^What Lars said ^^^ Also- some potentially useful recipe examples here https://github.com/TheGreyGhost/MinecraftByExample/blob/master/src/main/java/minecraftbyexample/mbe35_recipes/StartupCommon.java with pictures http://greyminecraftcoder.blogspot.com/2015/02/recipes.html -TGG
November 2, 20168 yr I know to make recipes n such I need the knowledge of the X's. But I have forgotten this stuff, and I need to find it again... google, bing, yahoo have failed me once again. (most likely because im typing in the wrong thing) example of what I'm talking about: GameRegistry.addRecipe(new ItemStack(GuruItems.NETHER_ORB), new Object[] {" X ", "X X", " X ", 'X', Item.getItemFromBlock(Blocks.OBSIDIAN)}); I know this results in top right left and down needing to be placed. But I need some kind of visualization of what XX or X is where and what not. the end result being 4 pieces of obsidian in the corners 4 elements in top right left down and a slime ball in the middle taking up all spaces in the crafting grid. Help would be nice, cuz I feel pretty dumb not being able to recall this, or for that matter being able to look it up -.- Also the X's can be anything you like as in my crafting recipes GameRegistry.addRecipe(new ItemStack(ModInfo.blockBlueScreen, 8, 0), new Object[] { "BBB", "BIB", "BBB", Character.valueOf('B'), new ItemStack(Blocks.CLAY, 1, 0), Character.valueOf('I'), new ItemStack(ModInfo.itemBlueScreenPaint.setContainerItem(Items.BUCKET), 1, 0) }); also if you set your recipe up for a 2x2 grid it can be crafted in the players inventory.
November 2, 20168 yr Also the X's can be anything you like as in my crafting recipes GameRegistry.addRecipe(new ItemStack(ModInfo.blockBlueScreen, 8, 0), new Object[] { "BBB", "BIB", "BBB", Character.valueOf('B'), new ItemStack(Blocks.CLAY, 1, 0), Character.valueOf('I'), new ItemStack(ModInfo.itemBlueScreenPaint.setContainerItem(Items.BUCKET), 1, 0) }); also if you set your recipe up for a 2x2 grid it can be crafted in the players inventory. You don't need the " new Object[] " as the method wants varargs, like larsgerrits states. Also, what the heck are you doing with the Character#valueOf() ? GameRegistry.addRecipe(new ItemStack(ContentRegistry.GHAST_TEAR_JAR), "TTT", "TJT", "TTT", 'T', Items.GHAST_TEAR, 'J', ContentRegistry.JAR ); Works just fine and dandy, without all that baggage. Also previously known as eAndPi. "Pi, is there a station coming up where we can board your train of thought?" -Kronnn Published Mods: Underworld Handy links: Vic_'s Forge events Own WIP Tutorials.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.