It's the simplest of things, right? Yeah sure. I can't figure it out though. I have followed dozens of tutorials on the forge wiki and I still can't get this poor little ol' block to show up in the creative inventory.
Heres my code, Main Class
public class mod_PackMule
{
@Instance("Einsteinium|PackMule")
public static mod_PackMule instance;
//Block Declarations
public static Block crystallineEnchanter;
@PreInit
public void preInit(FMLPreInitializationEvent event)
{
}
@Init
public void init(FMLPreInitializationEvent event)
{
crystallineEnchanter = new crystallineEnchanter(500,0).setHardness(1F).setBlockName("crystallineEnchanter").setResistance(5F);
//Registering Block
GameRegistry.registerBlock(crystallineEnchanter);
//Adding ItemName
LanguageRegistry.addName(crystallineEnchanter, "Crystalline Enchanter");
}
@PostInit
public void postInit(FMLPreInitializationEvent event)
{
}
}
Item.java
package einsteinium.packmule.common;
import net.minecraft.src.*;
public class crystallineEnchanter extends Block
{
public crystallineEnchanter(int par1, int par2)
{
super(par1, par2, Material.rock);
this.setCreativeTab(CreativeTabs.tabBlock);
}
}
I've checked and rechecked and quadruple checked ALL of my code but I just can't see anything wrong with it! I have no errors and It just wont work.
If anyone can help me point out my obvious mistakes it would be much appreciated! Thank you so much!
It's the simplest of things, right? Yeah sure. I can't figure it out though. I have followed dozens of tutorials on the forge wiki and I still can't get this poor little ol' block to show up in the creative inventory.
Heres my code, Main Class
public class mod_PackMule
{
@Instance("Einsteinium|PackMule")
public static mod_PackMule instance;
//Block Declarations
public static Block crystallineEnchanter;
@PreInit
public void preInit(FMLPreInitializationEvent event)
{
}
@Init
public void init(FMLPreInitializationEvent event)
{
crystallineEnchanter = new crystallineEnchanter(500,0).setHardness(1F).setBlockName("crystallineEnchanter").setResistance(5F);
//Registering Block
GameRegistry.registerBlock(crystallineEnchanter);
//Adding ItemName
LanguageRegistry.addName(crystallineEnchanter, "Crystalline Enchanter");
}
@PostInit
public void postInit(FMLPreInitializationEvent event)
{
}
}
Item.java
package einsteinium.packmule.common;
import net.minecraft.src.*;
public class crystallineEnchanter extends Block
{
public crystallineEnchanter(int par1, int par2)
{
super(par1, par2, Material.rock);
this.setCreativeTab(CreativeTabs.tabBlock);
}
}
I've checked and rechecked and quadruple checked ALL of my code but I just can't see anything wrong with it! I have no errors and It just wont work.
If anyone can help me point out my obvious mistakes it would be much appreciated! Thank you so much!
Umm, all of your Initialization method parameters are the same. Your @PreInit should be FMLPreInitializationEvent, your @Init should be FMLInitializationEvent, and your @PostInit should be FMLPostInitializationEvent. All of yours just say FMLPreInitializationEvent, which is incorrect for an @Init method, meaning your Class methods are never actually run by Forge. Method not Running = No Block.
Umm, all of your Initialization method parameters are the same. Your @PreInit should be FMLPreInitializationEvent, your @Init should be FMLInitializationEvent, and your @PostInit should be FMLPostInitializationEvent. All of yours just say FMLPreInitializationEvent, which is incorrect for an @Init method, meaning your Class methods are never actually run by Forge. Method not Running = No Block.
*claps* Good show mate. You are a hero.
The next thing on my to-do list is to create a table much like the one in thaumcraft for my block.
I want it to look much like the one here. Crystals and all.
Heres my code,
Main Class
Item.java
I've checked and rechecked and quadruple checked ALL of my code but I just can't see anything wrong with it! I have no errors and It just wont work.
If anyone can help me point out my obvious mistakes it would be much appreciated! Thank you so much!
Follow me on twitter! @dreinsteinium
Umm, all of your Initialization method parameters are the same. Your @PreInit should be FMLPreInitializationEvent, your @Init should be FMLInitializationEvent, and your @PostInit should be FMLPostInitializationEvent. All of yours just say FMLPreInitializationEvent, which is incorrect for an @Init method, meaning your Class methods are never actually run by Forge. Method not Running = No Block.
*claps* Good show mate. You are a hero.
The next thing on my to-do list is to create a table much like the one in thaumcraft for my block.
I want it to look much like the one here. Crystals and all.
Any suggestions?
Follow me on twitter! @dreinsteinium