How to make a recipe Shapeless

Started by electrodeyt on Fri, 04/14/2017 - 19:02

Topic category: User side tutorials

Last seen on 11:58, 2. May 2017
Joined Apr 2017
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
How to make a recipe Shapeless
Fri, 04/14/2017 - 19:02

Here is how to make a recipie Shapeless:

1) Go to code

2) Click on the thing to make shapeless

3) Lock the code

Now here is an example of the recipie code:

GameRegistry.addRecipe(
                new ItemStack(block, 1),
                new Object[]{"012", "X4X", "678", Character.valueOf('0'), Items.LAVA_BUCKET, Character.valueOf('1'), Items.WATER_BUCKET,
                        Character.valueOf('2'), Items.LAVA_BUCKET, Character.valueOf('4'), Items.BUCKET, Character.valueOf('6'), Items.LAVA_BUCKET,
                        Character.valueOf('7'), Items.LAVA_BUCKET, Character.valueOf('8'), Items.WATER_BUCKET,});

Look for something similar.

4) Remove the "new Object[]{"something", "something", "something," and the very last ",}".

5) Remove each and every "Character.valueOF("some number")" (Make sure to remove the "," so there is one between each one of them)

6) Change the "addRecipe" to "addShapelessRecipe"

The Code should look a bit like this:

GameRegistry.addRecipe(
                new ItemStack(block, 1),
                Items.LAVA_BUCKET, Items.WATER_BUCKET,
                Items.LAVA_BUCKET, Items.BUCKET, Items.LAVA_BUCKET,
                Items.LAVA_BUCKET, Items.WATER_BUCKET);

Here is my Shapeless Recipe code in my mod:

GameRegistry.addShapelessRecipe(new ItemStack(block, 1), mcreator_acidBucket.block,
                mcreator_quartzLump.block);

Hope this helps!