- 33
- 1
- 0
Ребят помогите я новичок , вобщем сделал я предмет - eclipse не ругается ни на что , а вот сам майн вылетает с ошибкой:
(Скопировал все со значением error)
ну из ошибки нашол у себя в коде описанный фрагмент (скопирую класс весь может что не так сделал):
И навсякий случай главный класс :
(Сорр если что под спойлер не понял как код поставить)
Код:
[12:57:35] [Client thread/ERROR] [FML]: Fatal errors were detected during the transition from PREINITIALIZATION to INITIALIZATION. Loading cannot continue
[12:57:35] [Client thread/ERROR] [FML]:
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCH mcp{9.05} [Minecraft Coder Pack] (minecraft.jar)
UCH FML{7.10.99.99} [Forge Mod Loader] (forge-1.7.10-10.13.4.1614-1.7.10.jar)
UCH Forge{10.13.4.1614} [Minecraft Forge] (forge-1.7.10-10.13.4.1614-1.7.10.jar)
UCE megamod{0.0.0.0.0.2} [Modex] (modid-1.0.jar)
[12:57:35] [Client thread/ERROR] [FML]: The following problems were captured during this phase
[12:57:35] [Client thread/ERROR] [FML]: Caught exception from megamod
java.lang.NullPointerException: Can't add null-object to the registry, name megamod:microsxem.
ну из ошибки нашол у себя в коде описанный фрагмент (скопирую класс весь может что не так сделал):
Код:
package divanchik.megamod;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
public class Microsxem extends Item {
public Microsxem(int par1)
{
super();
this.setCreativeTab(BaseMegaMode.tabTutorial);
}
public void registerIcons(IIconRegister par1IconRegister)
{
this.itemIcon = par1IconRegister.registerIcon("megamod:Microsxem");
}
}
И навсякий случай главный класс :
Код:
package divanchik.megamod;
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.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@Mod (modid = "megamod", name = "Modex", version = "0.0.0.0.0.2")
public class BaseMegaMode {
public static Block systemcore;
public static CreativeTabs tabTutorial = new TabTutorial("Tab");
public static Item Microsxem;
@EventHandler
public void preLoad(FMLPreInitializationEvent event)
{
systemcore = new BlockBestBlockEver();
GameRegistry.registerBlock(systemcore, "systemcore");
GameRegistry.registerItem(Microsxem,"microsxem");
GameRegistry.addRecipe(new ItemStack(BaseMegaMode.systemcore, 1),
new Object[]{ "###", "#X#", "###",
('X'), Items.lava_bucket, ('#'), BaseMegaMode.Microsxem});
GameRegistry.addRecipe(new ItemStack(BaseMegaMode.Microsxem, 1),
new Object[]{ "X#X", "###", "X#X",
('X'), Blocks.wool, ('#'), Items.iron_ingot,});
}
}
(Сорр если что под спойлер не понял как код поставить)