kamishibusan
1/11/2018 - 9:53 AM

nyagosu_hanten_244_1.java

package net.nyagosu.minecraftmodexample.example000_009.e007_add_reciepe;

import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.registry.GameRegistry;

public class InitCommon {

	public static void preInitCommon()
	{

	}

	public static void initCommon()
	{

	}

	public static void postInitCommon()
	{
		ItemStack itemEgg = new ItemStack(Items.EGG);
		ItemStack itemDirt = new ItemStack(Blocks.DIRT);
		ItemStack itemCobbleStone = new ItemStack(Blocks.COBBLESTONE);

		GameRegistry.addRecipe(
				new ItemStack(Items.DIAMOND),//土9個で、ダイヤ1個
				new Object[] {
						"eee",
						"eee",
						"eee",
						'e',itemEgg
				});

		GameRegistry.addRecipe(
				new ItemStack(Items.DIAMOND,64),//土8個、丸石1個で、ダイヤ64個
				new Object[] {
						"ddd",
						"dcd",
						"ddd",
						'd',itemDirt,
						'c',itemCobbleStone
				});

		GameRegistry.addRecipe(
				new ItemStack(Items.DIAMOND_PICKAXE,1,1561),//丸石8個、土1個で、耐久値を指定したダイヤピッケルのレシピ
				new Object[] {
						"ddd",
						"dcd",
						"ddd",
						'c',itemDirt,
						'd',itemCobbleStone
				});
	}
}