Jump to content

Custom Creative Tabs


GamerGuy_0128

Recommended Posts

Alright im new to coding with the forge API and i want to know how to create a custom creative tab to put my mod stuff under. How could i do this?

new to coding, or only with forge

 

because at the top of this screen theres a button labelled "wiki" and theres a tutorial for it

how to debug 101:http://www.minecraftforge.net/wiki/Debug_101

-hydroflame, author of the forge revolution-

Link to comment
Share on other sites

Smart/quick way:

Into MyMod.class:

public static CreativeTabs MyTab = new CreativeTabs("MyTab")
{
	public int getTabIconItemIndex()
	{
		return MyMod.itemID/.blockID
	}
};

If you want to have InGame name:

public void load(FMLInitializationEvent event)
{
	LanguageRegistry.instance().addStringLocalization("itemGroup.MyTab", "en_US", "MyTabInGameName");
}

 

And here is some unknown (never watched) tutorial found just by writing 3 words into google ;p

http://www.youtube.com/watch?v=KIisB001LG8

Only thing I know that this one is way longer.

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

Another way, in your mainmod file, have this in preinit(eventhandler),

 

	LanguageRegistry.instance().addStringLocalization(
			"itemGroup.nameoftabhere", "en_US", "Name of tabhere");

 

and this in the main file, anywhere works, i put it right under init personally,

public static CreativeTabs tabCustom = new CreativeTabs("nameoftabhere") {
	public ItemStack getIconItemStack() {
		return new ItemStack(
				block/itemnamehere; //such as Block.cobbleStone or myblockhere
	}
};

 

small difference from Ernios way, either is up to you.

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.