Jump to content

Recommended Posts

Posted

So I just want my Creative Tab to say Blacksmithery Tab but I can't get rid of the itemGroup...Can I put something in my en_US.lang file to fix this or is it in the code somewhere that I'm missing.

 

 

Main Class Code

 

 

package com.Skye4Life.Blacksmithery;

 

import com.Skye4Life.Blacksmithery.block.ModBlocks;

import com.Skye4Life.Blacksmithery.client.BlacksmitheryTab;

import com.Skye4Life.Blacksmithery.items.ModItems;

import com.Skye4Life.Blacksmithery.proxy.CommonProxy;

 

import net.minecraft.creativetab.CreativeTabs;

import net.minecraftforge.fml.common.Mod;

import net.minecraftforge.fml.common.Mod.EventHandler;

import net.minecraftforge.fml.common.Mod.Instance;

import net.minecraftforge.fml.common.SidedProxy;

import net.minecraftforge.fml.common.event.FMLInitializationEvent;

import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;

import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

 

@Mod(modid = Main.modId, name = Main.name, version = Main.version, acceptedMinecraftVersions = "[1.10.2]")

 

public class Main

{

public static final String modId = "bs_mod";

public static final String name = "Blacksmithery";

public static final String version = "1.0";

public static final BlacksmitheryTab creativeTab = new BlacksmitheryTab();

 

@Mod.Instance(modId)

public static Main instance;

 

@SidedProxy

(serverSide = "com.Skye4Life.Blacksmithery.proxy.CommonProxy", clientSide = "com.Skye4Life.Blacksmithery.proxy.ClientProxy")

public static CommonProxy proxy;

 

@Mod.EventHandler

public void preInit(FMLPreInitializationEvent event)

{

System.out.println(name + " is loading!");

ModItems.init();

ModBlocks.init();

}

@Mod.EventHandler

public void init(FMLInitializationEvent event)

{

 

}

@Mod.EventHandler

public void postInit(FMLPostInitializationEvent event)

{

 

}

 

}

 

 

 

Base Block and Item Classes

 

 

package com.Skye4Life.Blacksmithery.block;

 

import com.Skye4Life.Blacksmithery.Main;

import com.Skye4Life.Blacksmithery.client.BlacksmitheryTab;

 

import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.item.ItemBlock;

 

 

public class BaseBlock extends Block {

 

protected String name;

 

public BaseBlock(Material material, String name) {

super(material);

 

this.name = name;

 

setUnlocalizedName(name);

setRegistryName(name);

setCreativeTab(Main.creativeTab);

}

 

public void registerItemModel(ItemBlock itemBlock) {

Main.proxy.registerItemRenderer(itemBlock, 0, name);

}

 

@Override

public BaseBlock setCreativeTab(CreativeTabs tab) {

super.setCreativeTab(tab);

return this;

}

 

}

 

 

 

package com.Skye4Life.Blacksmithery.items;

 

import net.minecraft.item.Item;

import net.minecraft.creativetab.CreativeTabs;

import com.Skye4Life.Blacksmithery.Main;

 

public class ItemBase extends Item

{

protected String name;

 

public ItemBase(String name)

{

this.name = name;

setUnlocalizedName(name);

setRegistryName(name);

setCreativeTab(Main.creativeTab);

}

public void registerItemModel()

{

Main.proxy.registerItemRenderer(this, 0, name);

}

 

@Override

public ItemBase setCreativeTab(CreativeTabs tab)

{

super.setCreativeTab(tab);

return this;

}

 

 

}

 

 

 

BlacksmitheryTab Class

 

package com.Skye4Life.Blacksmithery.client;

 

import com.Skye4Life.Blacksmithery.Main;

import com.Skye4Life.Blacksmithery.items.ModItems;

 

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.item.Item;

 

public class BlacksmitheryTab extends CreativeTabs

{

public BlacksmitheryTab()

{

super(0, "BlacksmitheryTab");

}

 

@Override

public Item getTabIconItem()

{

return ModItems.StoneHammer;

}

}

 

 

Posted

TheThingYouSeeOnScreen=TheThingYouWantToSee

 

Really, is it that hard?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.