Posted July 17, 20169 yr 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>
July 17, 20169 yr Author I have a lang file, what do I need to do? Example? It goes from TheBasicElements to The Basic Elements with the fancy spaces and all...
July 17, 20169 yr Author @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
July 17, 20169 yr Author why the hell can't I just public TBECreativeTab(int id) { super("The Basic Elements")substring(9); //this.setBackgroundImageName("item_search.png"); } This sucks...
July 17, 20169 yr Author 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
July 18, 20169 yr 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
July 18, 20169 yr 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.