Java Code Examples for net.minecraft.item.Item#setCreativeTab()

The following examples show how to use net.minecraft.item.Item#setCreativeTab() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
private static Item registerItem(Item item, String name, MetalMaterial metal, CreativeTabs tab){
	item.setRegistryName(BaseMetals.MODID, name);
	item.setUnlocalizedName(BaseMetals.MODID+"."+name);
	GameRegistry.register(item); 
	itemRegistry.put(item, name);
	if(tab != null){
		item.setCreativeTab(tab);
	}
	if(metal != null){
		itemsByMetal.computeIfAbsent(metal, (MetalMaterial g)->new ArrayList<>());
		itemsByMetal.get(metal).add(item);
	}
	return item;
}
 
Example 2
Source Project: TofuCraftReload   File: ItemLoader.java    License: MIT License 4 votes vote down vote up
private static void register(Item item) {
    item.setCreativeTab(CommonProxy.tab);
   	ItemRegister.register(TofuMain.MODID, item);
}
 
Example 3
Source Project: Sakura_mod   File: DrinksLoader.java    License: MIT License 4 votes vote down vote up
private static void register(Item item) {
    item.setCreativeTab(CommonProxy.tab);
    ItemRegister.register(SakuraMain.MODID, item);
}
 
Example 4
Source Project: Production-Line   File: ToolPL.java    License: MIT License 4 votes vote down vote up
private static void registerItem(String name, Item item) {
        item.setUnlocalizedName(MOD_NAME + "." + name);
//        item.setTextureName(RESOURCE_DOMAIN + ":" + "item" + name);
        item.setCreativeTab(creativeTabPL);
        GameRegistry.<Item>register(item, new ResourceLocation(MOD_ID, name));
    }
 
Example 5
private static Item registerSemiBlock(String key, Class<? extends ISemiBlock> semiBlock, boolean addItem){
    Item item = SemiBlockManager.registerSemiBlock(key, semiBlock, addItem);
    if(item != null) item.setCreativeTab(PneumaticCraft.tabPneumaticCraft);
    return item;
}