Jump to content

[SOLVED][1.6] Creative tab not working!


deadrecon98

Recommended Posts

First the creative tab image won't show(probably because the old code for it broke), second any items I added to the creative tab won't show on any tab.

 

Creative Tab:

package mods.cyphereion.cyphscape.core;
import mods.cyphereion.cyphscape.API.Core;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.client.resources.ResourceLocation;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.relauncher.*;

public class tabCyphScape extends CreativeTabs {

public ResourceLocation guiLocation = new ResourceLocation("CyphScape:/textures/items/CyphScape_Stats.png");

public tabCyphScape(int position, String tabID) {

super(position, tabID);
}

public String getTranslatedTabLabel()
{
return "CyphScape"; 
}
}

 

Core File:

@SidedProxy(clientSide = "mods.cyphereion.cyphscape.proxys.ClientProxy", serverSide = "mods.cyphereion.cyphscape.proxys.CommonProxy")

public static CommonProxy proxy;

public static CreativeTabs tabCyphScape = new tabCyphScape(CreativeTabs.getNextID(),"tabCyphScape");

 

 

Sample of an item:

BronzeShovel = new ItemBronzeShovel(2011, CyphScapeMaterials.Bronze).setUnlocalizedName("CyphScape_BronzeShovel");

Link to comment
Share on other sites

To fix the creative tab issue, have a look at this https://github.com/mrkirby153/MscHouses/blob/master/common/mrkirby153/MscHouses/creativeTab/CreativeTabHouse.java

 

Note: You may need to localize the name of the tab with the following code

LanguageRegistry.instance().addStringLocalization("itemGroup.INSERT TAB NAME HERE","TAB NAME");


Also, it looks like you are not adding any items to the creative tab.

 

Try this:

BronzeShovel = new ItemBronzeShovel(211, CyphSpaceMaterials.bronze).setUnlocalizedName("bronzeShovel").setCreativeTab(this.tabCyphSpace);

Link to comment
Share on other sites

To fix the creative tab issue, have a look at this https://github.com/mrkirby153/MscHouses/blob/master/common/mrkirby153/MscHouses/creativeTab/CreativeTabHouse.java

 

Note: You may need to localize the name of the tab with the following code

LanguageRegistry.instance().addStringLocalization("itemGroup.INSERT TAB NAME HERE","TAB NAME");


Also, it looks like you are not adding any items to the creative tab.

 

Try this:

BronzeShovel = new ItemBronzeShovel(211, CyphSpaceMaterials.bronze).setUnlocalizedName("bronzeShovel").setCreativeTab(this.tabCyphSpace);

 

Lol that may be the issue. Thank you for your response.

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.

Announcements



×
×
  • Create New...

Important Information

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