- 30
- 0
Пробую сделать рецепт крафта добавленного блока.Если в рецепт я добавляю ванильные вещи, то игра нормально запускается.Если я начинаю добавлять в рецепт крафта добавленного блока добавленные айтемы.(доб блок делается из доб айтемов) то майн не запускается.
Main:
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.Item.ToolMaterial;
import net.minecraft.item.ItemStack;
@Mod(modid = Main.MODID, name = Main.MODNAME, version = Main.VERSION)
public class Main {
public static final CreativeTabs tabExperiment = new CreativeTabs("Experiment") {
public Item getTabIconItem() {
return Item.getItemFromBlock(Blocks.diamond_ore);
}
};
public static final String MODID = "experiment";
public static final String MODNAME = "ExperimentName";
public static final String VERSION = "1.1.0";
public static Block amethyst_block;
public static Item amethyst_pick;
public static Item amethyst_stone;
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
amethyst_block = new amethyst_Block(Material.rock, "amethyst_block", "amethyst_block");
GameRegistry.registerBlock(amethyst_block, "amethyst_block");
GameRegistry.addRecipe(new ItemStack(Main.amethyst_block, 1),
new Object[]{ "###", "XXX", "YYY",
('X'), Main.amethyst_pick,('Y'),Items.apple,('#'),Items.apple }
);
amethyst_pick = new amethyst_pickAxe(ToolMaterial.EMERALD,"amethyst pick","amethyst_pick").setUnlocalizedName("amethyst_pick");
GameRegistry.registerItem(amethyst_pick, amethyst_pick.getUnlocalizedName());
amethyst_stone = new amethyst_Stone("amethyst_stone","amethyst_stone").setUnlocalizedName("amethyst_stone");
GameRegistry.registerItem(amethyst_stone, amethyst_stone.getUnlocalizedName());
}
};