FANDOM


Introduction Edit

Hello! I see you want to learn how to make food and creative tabs! Well, you've come to the right place! Today we'll be learning:

  • How to make food
  • Naming the food
  • Creative tabs
  • Naming the creative tab

Without any more interruptions, let's go!

Food and Creative Tabs Edit

How to make food Edit

[ COMING SOON ]

Naming the food Edit

[ COMING SOON ]

Creative Tabs Edit

Creating a creative tab is more simple than you would think! Go ahead and right click on your Init package, and press new class. Name this class InitCreativeTabs. Copy and paste the lines below, and I'll tell you what to edit.

public static final CreativeTabs <LOCAL NAME> = new CreativeTabs("<LOCAL NAME>") {
	@Override 
	public Item getTabIconItem() {
	    return <ITEM>;
	}
	public int getItemIconDamage() {
	    return 4;
	}
};

We're going to edit <LOCAL NAME> first. Whatever we name the tab's local name is what we will call on all of our items. For this tutorial, I'm going to name it tutorial_tab. Make sure you replace both of them. We're going to replace <ITEM> with one of two things. You can either replace it with the item we've created, or a default item. To replace it with a default item, you'll want to type Item., and then it will give you a list of all the default items. To use a local item, we're going to type InitItems., and then choose the item from there.

Now, to set our items' creative tab, we're going to need to change one line. If you follow the previous tutorials, your line should look something like this...

itemTest = new itemTest("itemTest").setCreativeTab(CreativeTabs.MISC);

To use our custom tab, we're simply going to change the line to say this...

itemTest = new itemTest("itemTest").setCreativeTab(InitCreativeTabs.tutorial_tab);

And there you go.

Naming the creative tab Edit

Go into your en_US.lang folder, and type the line below...

itemGroup.tutorial_tab=Tutorial Tab

Now you've named the tab; simple, huh?

Finishing Up Edit

Now we have learned how to create food, and create a creative tab! If you need some review, click here to see my github on this tutorial. Otherwise, click here to go home and see what other tutorials you should follow!

Return Back to Home Page

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.