top of page

Creative Tab

So far we've added our Lead Ore and our Lead Ingot, now I think its time to get a creative tab. Creative Tabs are very easy, in fact probably the easiest thing. Okay, Firstly, lets open our Mod File and add the following

Cool, basically what we did there was create our instance for our creative tab. The paramenter for our tab is the label or display name. Whatever you put in there will be displayed like "transport" for the transport tab. Lets go ahead and create the new class CreativeTabForging

This is a pretty basic class, we just extend Creative Tabs so it can be a creative tab and the constructor Ive already explained - hehe forge parameter name typo - The Method "getTabIconItem" returns an Item, this item's icon will be displayed as the icon for the creative tab. Ours will be the lead ingot. I have commented a way to display a block incase you wanted to display a block, just use the Item class' method "get Item From Block". Finally we want to add our items to our creative tab, its really easy, go to the block or item and change "setCreativeTabs" parameter to "ModFile.creativetab".

 

 

We need to add the localization to our creative tab! Open the en_US file and add the following to the file "itemGroup.label parameter.name=LocalName

So ours looks like this: itemGroup.Forging MC=Forging MC

Thats all! Done. Easy. Just add that to any item or block and its in our creative tab! 

bottom of page