Jump to content

Does anyone have a link explaining the X's for the 3x3 crafting grid?


Recommended Posts

Posted

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 -.-

Posted

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/

Posted

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.

Posted

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I tried do download the essential mod to my mod pack but i didnt work. I paly on 1.21 and it should work. I use neoforge for my modding. The weird things is my friend somehow added the mod to his modpack and many others that I somehow can´t. Is there anything i can do? 
    • Thanks, I've now installed a slightly newer version and the server is at least starting up now.
    • i have the same issue. Found 1 Create mod class dependency(ies) in createdeco-1.3.3-1.19.2.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Found 11 Create mod class dependency(ies) in createaddition-fabric+1.19.2-20230723a.jar, which are missing from the current create-1.19.2-0.5.1.i.jar Detailed walkthrough of mods which rely on missing Create mod classes: Mod: createaddition-fabric+1.19.2-20230723a.jar Missing classes of create: com/simibubi/create/compat/jei/category/sequencedAssembly/JeiSequencedAssemblySubCategory com/simibubi/create/compat/recipeViewerCommon/SequencedAssemblySubCategoryType com/simibubi/create/compat/rei/CreateREI com/simibubi/create/compat/rei/EmptyBackground com/simibubi/create/compat/rei/ItemIcon com/simibubi/create/compat/rei/category/CreateRecipeCategory com/simibubi/create/compat/rei/category/WidgetUtil com/simibubi/create/compat/rei/category/animations/AnimatedBlazeBurner com/simibubi/create/compat/rei/category/animations/AnimatedKinetics com/simibubi/create/compat/rei/category/sequencedAssembly/ReiSequencedAssemblySubCategory com/simibubi/create/compat/rei/display/CreateDisplay Mod: createdeco-1.3.3-1.19.2.jar Missing classes of create: com/simibubi/create/content/kinetics/fan/SplashingRecipe
    • The crash points to moonlight lib - try other builds or make a test without this mod and the mods requiring it
    • Do you have shaders enabled? There is an issue with the mod simpleclouds - remove this mod or disable shaders, if enabled  
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.