Answers for "forge 1.12.2 custom creative tab"

0

forge 1.12.2 custom creative tab

// this is simply just the class for the tab
// to use it, create an instance of it and use the setCreativeTab() method
// with your instance of the tab's class as the argument
package com.cubicoder.tutorial.tabs;
 
import com.cubicoder.tutorial.TutorialMod;
import com.cubicoder.tutorial.init.TutorialItems;
 
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
 
public class TutorialTab extends CreativeTabs {
 
    public TutorialTab(String name) {
        super(TutorialMod.MODID + "." + name);
    }
 
    @SideOnly(Side.CLIENT)
    @Override
    public ItemStack getTabIconItem() {
        return new ItemStack(TutorialItems.BASIC_ITEM);
    }
 
}
Posted by: Guest on August-04-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language