Jump to content

How Do I Get Rid of itemGroup. On My Creative Tab? (1.10.2) [solved]


Recommended Posts

Posted

I got the tab working. Got the right picture and name on it.

But I can't figure in a way to substring this

itemGroup.The Basic Elements

 

Anyone got an idea?

I was able to find this really old deprecated stuff but it didn't help...

 

<source lang="java">LanguageRegistry.instance().addStringLocalization("itemGroup.tabCustom", "en_US", "My Custom Tab");</source>

Posted

@SidedProxy(clientSide = Reference.CLIENT_PROXY_CLASS, serverSide = Reference.SERVER_PROXY_CLASS)
public static CommonProxy proxy;
@Instance(Reference.MOD_ID)
private static Guru instance;
@EventHandler
public void preInit(FMLPreInitializationEvent event)
{
	proxy.preInit();
	GuruItems.init();
	GuruItems.register();
	GuruEntities.registerEntities();
	ModCreativeTabs.load();
	initRecipes();
}

 

 

package guru.tbe;

import net.minecraft.creativetab.CreativeTabs;

public class ModCreativeTabs {

public static CreativeTabs TheBasicElements;

public static void load(){

	TheBasicElements = new TBECreativeTab(CreativeTabs.getNextID());
}
}

 

package guru.tbe;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Items;
import net.minecraft.item.Item;

public class TBECreativeTab extends CreativeTabs {

public TBECreativeTab(int id) {
	super("The Basic Elements");
	//this.setBackgroundImageName("item_search.png");
}

@Override
public Item getTabIconItem() {
	return guru.tbe.init.GuruItems.NetherOrb;
}

}

 

 

item.AirOrb.name=Air Orb
item.EarthOrb.name=Earth Orb
item.FireOrb.name=Fire Orb
item.WaterOrb.name=Water Orb
item.NetherOrb.name=Nether Orb
item.InvisibleOrb.name=Invisible Orb
item.CreativeOrb.name=Creative Orb

Posted

why the hell can't I just

 

public TBECreativeTab(int id) {

super("The Basic Elements")substring(9);

//this.setBackgroundImageName("item_search.png");

}

 

 

This sucks...

Posted

itemGroup.The Basic Elements=The Basic Elements

 

 

Alright i got it.

 

Cool beans man thanks to ya.

 

itemGroup.The Basic Elements=The Basic Elements
item.AirOrb.name=Air Orb
item.EarthOrb.name=Earth Orb
item.FireOrb.name=Fire Orb
item.WaterOrb.name=Water Orb
item.NetherOrb.name=Nether Orb
item.InvisibleOrb.name=Invisible Orb
item.CreativeOrb.name=Creative Orb

Posted

Proptip when doing language files, spaces in the key is not advised, it can mess with a lot of parsers. And just doesn't fit the standard programming practices.

CamelCase: someNameHere

Or Underscores: some_name_here

 

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Posted

I fixed it shortly after. Was finally able to get my account back too! google won't allow you to sign in if you are in a different state... -.- ... which is very helpful

 

itemGroup.TheBasicElements=The Basic Elements

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.