Jump to content

[1.7.2] Can't add new Items.


PeterRDevries

Recommended Posts

Hello Somehow I can't add any new items or blocks this is my main file:

 package molecularscience;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraftforge.common.config.Configuration;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;

@Mod(modid = MolecularScience.MODID, version = MolecularScience.VERSION)
public class MolecularScience {

public static Item tutorialItem;

    public static final String MODID = "MolecularScience";
    public static final String VERSION = "1.0.0";

@Instance(value = "MolecularScience")
public static MolecularScience instance;

@SidedProxy(clientSide="molecularscience.ClientProxy", serverSide="molecularscience.CommonProxy")
public static CommonProxy proxy;

public void preInit(FMLPreInitializationEvent event){

	Configuration config = new Configuration(event.getSuggestedConfigurationFile());

	config.load();

	config.save();
	System.out.println("hoi");
}

public void load(FMLInitializationEvent event) {
        proxy.registerRenderers();
        
	tutorialItem = new ItemTutorial().setUnlocalizedName("tutorialitem");
        GameRegistry.registerItem(tutorialItem,"tutorial");
}

public void postInit(FMLPostInitializationEvent event) {
	System.out.println("hoi");
}

}

 

And this is my item file:

package molecularscience;

import java.util.List;

import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.IIcon;
import net.minecraft.util.MathHelper;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class ItemTutorial extends Item
{
    public ItemTutorial()
    {
        super();
        this.setCreativeTab(CreativeTabs.tabMisc);
    }
}

 

I don't know what I'm doing wrong here please help.

 

Thanks

I'm always happy to help others!

 

Java is not my main programming language but I have alot experience in PHP/HTML/JS/CSS3/C#/SQL

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.