Java Code Examples for net.minecraft.creativetab.CreativeTabs

The following are top voted examples for showing how to use net.minecraft.creativetab.CreativeTabs. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: Backmemed   File: BlockPumpkin.java   Source Code and License 7 votes vote down vote up
protected BlockPumpkin()
{
    super(Material.GOURD, MapColor.ADOBE);
    this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH));
    this.setTickRandomly(true);
    this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
}
 
Example 2
Project: Adventurers-Toolbox   File: ItemATHandpick.java   Source Code and License 6 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> subItems) {
	if(!Config.DISABLED_TOOLS.contains("handpick")) {
		ItemStack stack1 = new ItemStack(this);
		NBTTagCompound tag = new NBTTagCompound();
		tag.setString(HEAD_TAG, Materials.randomHead().getName());
		tag.setString(HAFT_TAG, Materials.randomHaft().getName());
		tag.setString(HANDLE_TAG, Materials.randomHandle().getName());
		tag.setString(ADORNMENT_TAG, Materials.randomAdornment().getName());
		stack1.setTagCompound(tag);
		if (isInCreativeTab(tab)) {
			subItems.add(stack1);
		}
	}
}
 
Example 3
Project: connor41-etfuturum2   File: EtFuturum.java   Source Code and License 6 votes vote down vote up
@EventHandler
public void postInit(FMLPostInitializationEvent event) {
	Items.blaze_rod.setFull3D();
	Blocks.trapped_chest.setCreativeTab(CreativeTabs.tabRedstone);

	if (enableUpdatedFoodValues) {
		setFinalField(ItemFood.class, Items.carrot, 3, "healAmount", "field_77853_b");
		setFinalField(ItemFood.class, Items.baked_potato, 5, "healAmount", "field_77853_b");
	}

	if (enableUpdatedHarvestLevels) {
		Blocks.packed_ice.setHarvestLevel("pickaxe", 0);
		Blocks.ladder.setHarvestLevel("axe", 0);
		Blocks.melon_block.setHarvestLevel("axe", 0);
	}
}
 
Example 4
Project: BaseClient   File: GuiContainerCreative.java   Source Code and License 6 votes vote down vote up
/**
 * Adds the buttons (and other controls) to the screen in question. Called when the GUI is displayed and when the
 * window resizes, the buttonList is cleared beforehand.
 */
public void initGui()
{
    if (this.mc.playerController.isInCreativeMode())
    {
        super.initGui();
        this.buttonList.clear();
        Keyboard.enableRepeatEvents(true);
        this.searchField = new GuiTextField(0, this.fontRendererObj, this.guiLeft + 82, this.guiTop + 6, 89, this.fontRendererObj.FONT_HEIGHT);
        this.searchField.setMaxStringLength(15);
        this.searchField.setEnableBackgroundDrawing(false);
        this.searchField.setVisible(false);
        this.searchField.setTextColor(16777215);
        int i = selectedTabIndex;
        selectedTabIndex = -1;
        this.setCurrentCreativeTab(CreativeTabs.creativeTabArray[i]);
        this.field_147059_E = new CreativeCrafting(this.mc);
        this.mc.thePlayer.inventoryContainer.onCraftGuiOpened(this.field_147059_E);
    }
    else
    {
        this.mc.displayGuiScreen(new GuiInventory(this.mc.thePlayer));
    }
}
 
Example 5
Project: CustomWorldGen   File: BlockStoneSlab.java   Source Code and License 6 votes vote down vote up
public BlockStoneSlab()
{
    super(Material.ROCK);
    IBlockState iblockstate = this.blockState.getBaseState();

    if (this.isDouble())
    {
        iblockstate = iblockstate.withProperty(SEAMLESS, Boolean.valueOf(false));
    }
    else
    {
        iblockstate = iblockstate.withProperty(HALF, BlockSlab.EnumBlockHalf.BOTTOM);
    }

    this.setDefaultState(iblockstate.withProperty(VARIANT, BlockStoneSlab.EnumType.STONE));
    this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
}
 
Example 6
Project: Backmemed   File: GuiContainerCreative.java   Source Code and License 6 votes vote down vote up
/**
 * Called when the mouse is clicked. Args : mouseX, mouseY, clickedButton
 */
protected void mouseClicked(int mouseX, int mouseY, int mouseButton) throws IOException
{
    if (mouseButton == 0)
    {
        int i = mouseX - this.guiLeft;
        int j = mouseY - this.guiTop;

        for (CreativeTabs creativetabs : CreativeTabs.CREATIVE_TAB_ARRAY)
        {
            if (this.isMouseOverTab(creativetabs, i, j))
            {
                return;
            }
        }
    }

    super.mouseClicked(mouseX, mouseY, mouseButton);
}
 
Example 7
Project: customstuff4   File: ItemHelperTests.java   Source Code and License 6 votes vote down vote up
@Test
public void test_createSubItems_sameTabs()
{
    HashMap<Integer, String> map = Maps.newHashMap();
    map.put(0, "tools");
    map.put(1, "tools");

    Attribute<String> tabLabels = Attribute.map(map);
    int[] subtypes = new int[] {0, 1};

    Item item = new Item();
    item.setHasSubtypes(true);

    NonNullList<ItemStack> subItems = ItemHelper.createSubItems(item, CreativeTabs.TOOLS, tabLabels, subtypes);

    assertSame(2, subItems.size());
    assertSame(0, subItems.get(0).getItemDamage());
    assertSame(1, subItems.get(1).getItemDamage());
}
 
Example 8
Project: CustomWorldGen   File: GuiContainerCreative.java   Source Code and License 6 votes vote down vote up
private void updateCreativeSearch()
{
    GuiContainerCreative.ContainerCreative guicontainercreative$containercreative = (GuiContainerCreative.ContainerCreative)this.inventorySlots;
    guicontainercreative$containercreative.itemList.clear();

    CreativeTabs tab = CreativeTabs.CREATIVE_TAB_ARRAY[selectedTabIndex];
    if (tab.hasSearchBar() && tab != CreativeTabs.SEARCH)
    {
        tab.displayAllRelevantItems(guicontainercreative$containercreative.itemList);
        updateFilteredItems(guicontainercreative$containercreative);
        return;
    }

    for (Item item : Item.REGISTRY)
    {
        if (item != null && item.getCreativeTab() != null)
        {
            item.getSubItems(item, (CreativeTabs)null, guicontainercreative$containercreative.itemList);
        }
    }
    updateFilteredItems(guicontainercreative$containercreative);
}
 
Example 9
Project: BaseClient   File: ItemSword.java   Source Code and License 5 votes vote down vote up
public ItemSword(Item.ToolMaterial material)
{
    this.material = material;
    this.maxStackSize = 1;
    this.setMaxDamage(material.getMaxUses());
    this.setCreativeTab(CreativeTabs.tabCombat);
    this.attackDamage = 4.0F + material.getDamageVsEntity();
}
 
Example 10
Project: Backmemed   File: BlockGrass.java   Source Code and License 5 votes vote down vote up
protected BlockGrass()
{
    super(Material.GRASS);
    this.setDefaultState(this.blockState.getBaseState().withProperty(SNOWY, Boolean.valueOf(false)));
    this.setTickRandomly(true);
    this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
}
 
Example 11
Project: CustomWorldGen   File: BlockCrops.java   Source Code and License 5 votes vote down vote up
protected BlockCrops()
{
    this.setDefaultState(this.blockState.getBaseState().withProperty(this.getAgeProperty(), Integer.valueOf(0)));
    this.setTickRandomly(true);
    this.setCreativeTab((CreativeTabs)null);
    this.setHardness(0.0F);
    this.setSoundType(SoundType.PLANT);
    this.disableStats();
}
 
Example 12
Project: DankNull   File: ItemDankNull.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item itemIn, CreativeTabs tab, NonNullList<ItemStack> subItems) {
	for (int i = 0; i < 6; i++) {
		subItems.add(new ItemStack(itemIn, 1, i));
	}
}
 
Example 13
Project: Backmemed   File: BlockTripWireHook.java   Source Code and License 5 votes vote down vote up
public BlockTripWireHook()
{
    super(Material.CIRCUITS);
    this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(POWERED, Boolean.valueOf(false)).withProperty(ATTACHED, Boolean.valueOf(false)));
    this.setCreativeTab(CreativeTabs.REDSTONE);
    this.setTickRandomly(true);
}
 
Example 14
Project: BaseClient   File: BlockPrismarine.java   Source Code and License 5 votes vote down vote up
/**
 * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
 */
public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list)
{
    list.add(new ItemStack(itemIn, 1, ROUGH_META));
    list.add(new ItemStack(itemIn, 1, BRICKS_META));
    list.add(new ItemStack(itemIn, 1, DARK_META));
}
 
Example 15
Project: minecraft-territorialdealings   File: FactionLedger.java   Source Code and License 5 votes vote down vote up
public FactionLedger()
{
	this.setMaxStackSize(1);	// Can hold a big stack of these
	this.setFull3D();
	this.setCreativeTab(CreativeTabs.TOOLS);

	this.setRegistryName("factionledger");
	this.setUnlocalizedName("territorychevsky_factionledger");
}
 
Example 16
Project: BaseClient   File: BlockTripWireHook.java   Source Code and License 5 votes vote down vote up
public BlockTripWireHook()
{
    super(Material.circuits);
    this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(POWERED, Boolean.valueOf(false)).withProperty(ATTACHED, Boolean.valueOf(false)).withProperty(SUSPENDED, Boolean.valueOf(false)));
    this.setCreativeTab(CreativeTabs.tabRedstone);
    this.setTickRandomly(true);
}
 
Example 17
Project: BaseClient   File: ItemRecord.java   Source Code and License 5 votes vote down vote up
protected ItemRecord(String name)
{
    this.recordName = name;
    this.maxStackSize = 1;
    this.setCreativeTab(CreativeTabs.tabMisc);
    RECORDS.put("records." + name, this);
}
 
Example 18
Project: BaseClient   File: BlockTrapDoor.java   Source Code and License 5 votes vote down vote up
protected BlockTrapDoor(Material materialIn)
{
    super(materialIn);
    this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(OPEN, Boolean.valueOf(false)).withProperty(HALF, BlockTrapDoor.DoorHalf.BOTTOM));
    float f = 0.5F;
    float f1 = 1.0F;
    this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
    this.setCreativeTab(CreativeTabs.tabRedstone);
}
 
Example 19
Project: Backmemed   File: BlockSnow.java   Source Code and License 5 votes vote down vote up
protected BlockSnow()
{
    super(Material.SNOW);
    this.setDefaultState(this.blockState.getBaseState().withProperty(LAYERS, Integer.valueOf(1)));
    this.setTickRandomly(true);
    this.setCreativeTab(CreativeTabs.DECORATIONS);
}
 
Example 20
Project: Infernum   File: ItemSpellPage.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
public void getSubItems(Item itemIn, CreativeTabs tab, NonNullList<ItemStack> subItems) {
	for (Spell spell : Infernum.SPELL_REGISTRY.getValues()) {
		if (!spell.equals(Spell.EMPTY_SPELL)) {
			ItemStack stack = new ItemStack(this);
			setSpell(stack, spell);
			subItems.add(stack);
		}
	}
}
 
Example 21
Project: Backmemed   File: GuiContainerCreative.java   Source Code and License 5 votes vote down vote up
/**
 * Fired when a key is typed (except F11 which toggles full screen). This is the equivalent of
 * KeyListener.keyTyped(KeyEvent e). Args : character (character on the key), keyCode (lwjgl Keyboard key code)
 */
protected void keyTyped(char typedChar, int keyCode) throws IOException
{
    if (selectedTabIndex != CreativeTabs.SEARCH.getTabIndex())
    {
        if (GameSettings.isKeyDown(this.mc.gameSettings.keyBindChat))
        {
            this.setCurrentCreativeTab(CreativeTabs.SEARCH);
        }
        else
        {
            super.keyTyped(typedChar, keyCode);
        }
    }
    else
    {
        if (this.clearSearch)
        {
            this.clearSearch = false;
            this.searchField.setText("");
        }

        if (!this.checkHotbarKeys(keyCode))
        {
            if (this.searchField.textboxKeyTyped(typedChar, keyCode))
            {
                this.updateCreativeSearch();
            }
            else
            {
                super.keyTyped(typedChar, keyCode);
            }
        }
    }
}
 
Example 22
Project: CustomWorldGen   File: BlockSilverfish.java   Source Code and License 5 votes vote down vote up
public BlockSilverfish()
{
    super(Material.CLAY);
    this.setDefaultState(this.blockState.getBaseState().withProperty(VARIANT, BlockSilverfish.EnumType.STONE));
    this.setHardness(0.0F);
    this.setCreativeTab(CreativeTabs.DECORATIONS);
}
 
Example 23
Project: CustomWorldGen   File: BlockLog.java   Source Code and License 5 votes vote down vote up
public BlockLog()
{
    super(Material.WOOD);
    this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
    this.setHardness(2.0F);
    this.setSoundType(SoundType.WOOD);
}
 
Example 24
Project: Mods   File: ItemTF2.java   Source Code and License 5 votes vote down vote up
@Override
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList<ItemStack> par3List) {
	// System.out.println(this.getCreativeTab());
	if(!this.isInCreativeTab(par2CreativeTabs))
		return;
	for (int i = 0; i < 8; i++)
		par3List.add(new ItemStack(this, 1, i));
}
 
Example 25
Project: uniquecrops   File: ItemPrecisionAxe.java   Source Code and License 5 votes vote down vote up
@Override
  @SideOnly(Side.CLIENT)
  public void getSubItems(Item item, CreativeTabs tab, List<ItemStack> list) {
  	
ItemStack precision = new ItemStack(item);
precision.addEnchantment(Enchantment.getEnchantmentByID(33), 1);
list.add(precision);
  }
 
Example 26
Project: BaseClient   File: ItemFishFood.java   Source Code and License 5 votes vote down vote up
/**
 * returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
 */
public void getSubItems(Item itemIn, CreativeTabs tab, List<ItemStack> subItems)
{
    for (ItemFishFood.FishType itemfishfood$fishtype : ItemFishFood.FishType.values())
    {
        if (!this.cooked || itemfishfood$fishtype.canCook())
        {
            subItems.add(new ItemStack(this, 1, itemfishfood$fishtype.getMetadata()));
        }
    }
}
 
Example 27
Project: PrimalChests   File: BlockPrimalChest.java   Source Code and License 5 votes vote down vote up
public BlockPrimalChest() {
    super(Material.WOOD);
    setUnlocalizedName("primal_chest");
    setCreativeTab(CreativeTabs.DECORATIONS);
    setHardness(2.5F);
    setSoundType(SoundType.WOOD);
}
 
Example 28
Project: minecraft-territorialdealings   File: TerritoryMap.java   Source Code and License 5 votes vote down vote up
public TerritoryMap()
{
	this.setMaxStackSize(1);	// Can hold a big stack of these
	this.setCreativeTab(CreativeTabs.TOOLS);
	this.setHasSubtypes(true);

	this.setRegistryName("territorymap");
	this.setUnlocalizedName("territorychevsky_territorymap");
}
 
Example 29
Project: PurificatiMagicae   File: BlockCrystalSmall.java   Source Code and License 5 votes vote down vote up
@Override
public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> list)
{
    for (Type t : Type.values())
    {
        list.add(new ItemStack(this, 1, t.ordinal()));
    }
}
 
Example 30
Project: CustomWorldGen   File: BlockDaylightDetector.java   Source Code and License 5 votes vote down vote up
/**
 * returns a list of blocks with the same ID, but different meta (eg: wood returns 4 blocks)
 */
@SideOnly(Side.CLIENT)
public void getSubBlocks(Item itemIn, CreativeTabs tab, List<ItemStack> list)
{
    if (!this.inverted)
    {
        super.getSubBlocks(itemIn, tab, list);
    }
}
 
Example 31
Project: Machines-and-Stuff   File: MBlocks.java   Source Code and License 5 votes vote down vote up
private static void registerBlock(Block block, String key, String texture, Class tile, CreativeTabs tab) {
    block.setUnlocalizedName(key).setCreativeTab(TAB);
    if(DEVENV && FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
        writeFile(key, texture);
    renderMap.put(texture, block);
    GameRegistry.register(block, new ResourceLocation(Reference.MODID + ":" + key));
    GameRegistry.register(new ItemBlock(block), new ResourceLocation(Reference.MODID + ":" + key));
    if(tile != null) {
        GameRegistry.registerTileEntity(tile, key);
    }
}
 
Example 32
Project: Backmemed   File: BlockStem.java   Source Code and License 5 votes vote down vote up
protected BlockStem(Block crop)
{
    this.setDefaultState(this.blockState.getBaseState().withProperty(AGE, Integer.valueOf(0)).withProperty(FACING, EnumFacing.UP));
    this.crop = crop;
    this.setTickRandomly(true);
    this.setCreativeTab((CreativeTabs)null);
}
 
Example 33
Project: WirelessCharger   File: CreativeTabCustom.java   Source Code and License 5 votes vote down vote up
public static void registerTab(){

        customTab = new CreativeTabs("creativetab") {
            @Override
            @SideOnly(Side.CLIENT)
            public ItemStack getTabIconItem() {
                return new ItemStack(ItemRegistry.itemUpgradeRange);
            }
        };
    }
 
Example 34
Project: CustomWorldGen   File: BlockStairs.java   Source Code and License 5 votes vote down vote up
protected BlockStairs(IBlockState modelState)
{
    super(modelState.getBlock().blockMaterial);
    this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(HALF, BlockStairs.EnumHalf.BOTTOM).withProperty(SHAPE, BlockStairs.EnumShape.STRAIGHT));
    this.modelBlock = modelState.getBlock();
    this.modelState = modelState;
    this.setHardness(this.modelBlock.blockHardness);
    this.setResistance(this.modelBlock.blockResistance / 3.0F);
    this.setSoundType(this.modelBlock.blockSoundType);
    this.setLightOpacity(255);
    this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
}
 
Example 35
Project: Backmemed   File: ItemBanner.java   Source Code and License 5 votes vote down vote up
public ItemBanner()
{
    super(Blocks.STANDING_BANNER);
    this.maxStackSize = 16;
    this.setCreativeTab(CreativeTabs.DECORATIONS);
    this.setHasSubtypes(true);
    this.setMaxDamage(0);
}
 
Example 36
Project: Proxys-Lib   File: BasicBlockLever.java   Source Code and License 5 votes vote down vote up
public BasicBlockLever(CreativeTabs creativeTab, String blockName)
{
    super();
    name = blockName;
    setUnlocalizedName(name);
    setRegistryName(name);
    setCreativeTab(creativeTab);
}
 
Example 37
Project: minecraft-quiverbow   File: LargeRedstoneMagazine.java   Source Code and License 5 votes vote down vote up
public LargeRedstoneMagazine()
{
	this.setMaxStackSize(1);	// No stacking, since we're filling these up
	
	this.setMaxDamage(200);		// Filled with gold nuggets (8 shots with 9 scatter, 24 with 3 scatter)
	this.setCreativeTab(CreativeTabs.tabCombat);	// On the combat tab by default, since this is amunition
	
	this.setHasSubtypes(true);
}
 
Example 38
Project: ExPetrum   File: ItemExPWeapon.java   Source Code and License 5 votes vote down vote up
@Override
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> subItems)
{
	if (tab != this.getCreativeTab())
	{
		return;
	}

	for (int i = 0; i < EnumToolStats.values().length; ++i)
	{
		subItems.add(new ItemStack(this, 1, i));
	}
}
 
Example 39
Project: DankNull   File: ItemDankNullPanel.java   Source Code and License 5 votes vote down vote up
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(Item item, CreativeTabs tab, NonNullList<ItemStack> subItems) {
	//if (isInCreativeTab(tab)) {
	for (int i = 0; i < 6; i++) {
		subItems.add(new ItemStack(item, 1, i));
	}
	//}
}
 
Example 40
Project: CustomWorldGen   File: BlockTorch.java   Source Code and License 5 votes vote down vote up
protected BlockTorch()
{
    super(Material.CIRCUITS);
    this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.UP));
    this.setTickRandomly(true);
    this.setCreativeTab(CreativeTabs.DECORATIONS);
}
 
Example 41
Project: ExPetrum   File: BlockVegetation.java   Source Code and License 5 votes vote down vote up
@SideOnly(Side.CLIENT)
@Override
public void getSubBlocks(CreativeTabs tab, NonNullList<ItemStack> list)
{
	for (int i = 0; i < 4; ++i)
	{
		list.add(new ItemStack(this, 1, i));
	}
}
 
Example 42
Project: BaseClient   File: GuiContainerCreative.java   Source Code and License 5 votes vote down vote up
/**
 * Draw the foreground layer for the GuiContainer (everything in front of the items). Args : mouseX, mouseY
 */
protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY)
{
    CreativeTabs creativetabs = CreativeTabs.creativeTabArray[selectedTabIndex];

    if (creativetabs.drawInForegroundOfTab())
    {
        GlStateManager.disableBlend();
        this.fontRendererObj.drawString(I18n.format(creativetabs.getTranslatedTabLabel(), new Object[0]), 8, 6, 4210752);
    }
}
 
Example 43
Project: BaseClient   File: BlockStairs.java   Source Code and License 5 votes vote down vote up
protected BlockStairs(IBlockState modelState)
{
    super(modelState.getBlock().blockMaterial);
    this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(HALF, BlockStairs.EnumHalf.BOTTOM).withProperty(SHAPE, BlockStairs.EnumShape.STRAIGHT));
    this.modelBlock = modelState.getBlock();
    this.modelState = modelState;
    this.setHardness(this.modelBlock.blockHardness);
    this.setResistance(this.modelBlock.blockResistance / 3.0F);
    this.setStepSound(this.modelBlock.stepSound);
    this.setLightOpacity(255);
    this.setCreativeTab(CreativeTabs.tabBlock);
}
 
Example 44
Project: minecraft-quiverbow   File: _WeaponBase.java   Source Code and License 5 votes vote down vote up
public _WeaponBase(int maxAmmo)
{
	this.setMaxStackSize(1);					// Default is 64
	this.setMaxDamage(maxAmmo);					// Default is 0
	this.setHasSubtypes(true);					// Got a subtype, since we're using damage values
	this.setFull3D();							// Not as thin as paper when held. Probably not relevant when using models
	this.setCreativeTab(CreativeTabs.tabCombat);// On the combat tab by default, since this is a weapon
}
 
Example 45
Project: MakeClayValuableAgain   File: ModItems.java   Source Code and License 4 votes vote down vote up
private Item register(Item item, String name) {
    item.setUnlocalizedName(MODID + ":" + name);
    item.setRegistryName(new ResourceLocation(MODID, name));
    item.setCreativeTab(CreativeTabs.TOOLS);
    return GameRegistry.register(item);
}
 
Example 46
Project: Backmemed   File: BlockEnchantmentTable.java   Source Code and License 4 votes vote down vote up
protected BlockEnchantmentTable()
{
    super(Material.ROCK, MapColor.RED);
    this.setLightOpacity(0);
    this.setCreativeTab(CreativeTabs.DECORATIONS);
}
 
Example 47
Project: Pangu   File: ItemPanguFood.java   Source Code and License 4 votes vote down vote up
@Override
public void getSubItems(@Nonnull CreativeTabs tab, @Nonnull NonNullList<ItemStack> items) {
    if (this.isInCreativeTab(tab))
        items.addAll(FoodManager.INSTANCE.toStacks());
}
 
Example 48
Project: BaseClient   File: GuiContainerCreative.java   Source Code and License 4 votes vote down vote up
protected void func_147051_a(CreativeTabs p_147051_1_)
{
    boolean flag = p_147051_1_.getTabIndex() == selectedTabIndex;
    boolean flag1 = p_147051_1_.isTabInFirstRow();
    int i = p_147051_1_.getTabColumn();
    int j = i * 28;
    int k = 0;
    int l = this.guiLeft + 28 * i;
    int i1 = this.guiTop;
    int j1 = 32;

    if (flag)
    {
        k += 32;
    }

    if (i == 5)
    {
        l = this.guiLeft + this.xSize - 28;
    }
    else if (i > 0)
    {
        l += i;
    }

    if (flag1)
    {
        i1 = i1 - 28;
    }
    else
    {
        k += 64;
        i1 = i1 + (this.ySize - 4);
    }

    GlStateManager.disableLighting();
    this.drawTexturedModalRect(l, i1, j, k, 28, j1);
    this.zLevel = 100.0F;
    this.itemRender.zLevel = 100.0F;
    l = l + 6;
    i1 = i1 + 8 + (flag1 ? 1 : -1);
    GlStateManager.enableLighting();
    GlStateManager.enableRescaleNormal();
    ItemStack itemstack = p_147051_1_.getIconItemStack();
    this.itemRender.renderItemAndEffectIntoGUI(itemstack, l, i1);
    this.itemRender.renderItemOverlays(this.fontRendererObj, itemstack, l, i1);
    GlStateManager.disableLighting();
    this.itemRender.zLevel = 0.0F;
    this.zLevel = 0.0F;
}
 
Example 49
Project: BaseClient   File: BlockBeacon.java   Source Code and License 4 votes vote down vote up
public BlockBeacon()
{
    super(Material.glass, MapColor.diamondColor);
    this.setHardness(3.0F);
    this.setCreativeTab(CreativeTabs.tabMisc);
}
 
Example 50
Project: BaseClient   File: ItemShears.java   Source Code and License 4 votes vote down vote up
public ItemShears()
{
    this.setMaxStackSize(1);
    this.setMaxDamage(238);
    this.setCreativeTab(CreativeTabs.tabTools);
}
 
Example 51
Project: Mods   File: TNTCannon.java   Source Code and License 4 votes vote down vote up
@Override
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList<ItemStack> par3List) {
	if(!this.isInCreativeTab(par2CreativeTabs))
		return;
	for (int i = 0; i < 19; i++) {
		if (i == 6)
			i = 16;
		ItemStack stack = new ItemStack(this);
		stack.setTagCompound(new NBTTagCompound());
		stack.getTagCompound().setInteger("Type", i);
		par3List.add(stack);
		ItemStack stack2 = stack.copy();
		stack2.getTagCompound().setBoolean("Sticky", true);
		par3List.add(stack2);
		ItemStack stack3 = stack.copy();
		stack3.getTagCompound().setBoolean("Bouncy", true);
		par3List.add(stack3);
		if(i < 16){
			ItemStack stack6 = stack.copy();
			stack6.getTagCompound().setBoolean("Crushing", true);
			par3List.add(stack6);
		}
		if (this.isActivator(stack)) {
			ItemStack stack4 = stack.copy();
			stack4.getTagCompound().setBoolean("Harmless", true);
			par3List.add(stack4);
		}
		if (i == 2 || i == 18) {
			ItemStack stack5 = stack.copy();
			stack5.getTagCompound().setBoolean("Stack", true);
			par3List.add(stack5);
		}
	}
	/*
	 * ItemStack[] enchantedStacks=new ItemStack[12]; for(int i=0;
	 * i<enchantedStacks.length; i++){ enchantedStacks[i]=stack.copy();
	 * if(i==0 || i==3 || i>6){
	 * enchantedStacks[i].getTagCompound().setBoolean("Sticky", true); }
	 * if(i==1 || i>3){
	 * enchantedStacks[i].getTagCompound().setBoolean("Activator", true); }
	 * if(i==2 || i==3 || i>7){
	 * enchantedStacks[i].getTagCompound().setBoolean("BowLike", true); }
	 * if(i==4 || i==6 || i==7 || i==9 || i==11){
	 * enchantedStacks[i].getTagCompound().setBoolean("Powder", true); }
	 * if(i==5 || i==6 || i>9){
	 * enchantedStacks[i].getTagCompound().setBoolean("Glowstone", true); }
	 * par3List.add(enchantedStacks[i]); }
	 */
}
 
Example 52
Project: CustomWorldGen   File: ItemSnowball.java   Source Code and License 4 votes vote down vote up
public ItemSnowball()
{
    this.maxStackSize = 16;
    this.setCreativeTab(CreativeTabs.MISC);
}
 
Example 53
Project: minecraft-quiverbow   File: FenFire.java   Source Code and License 4 votes vote down vote up
public FenFire()
{
	super(32);
	this.setCreativeTab(CreativeTabs.tabTools);		// Tool, so on the tool tab
}
 
Example 54
Project: Backmemed   File: BlockChorusPlant.java   Source Code and License 4 votes vote down vote up
protected BlockChorusPlant()
{
    super(Material.PLANTS, MapColor.PURPLE);
    this.setCreativeTab(CreativeTabs.DECORATIONS);
    this.setDefaultState(this.blockState.getBaseState().withProperty(NORTH, Boolean.valueOf(false)).withProperty(EAST, Boolean.valueOf(false)).withProperty(SOUTH, Boolean.valueOf(false)).withProperty(WEST, Boolean.valueOf(false)).withProperty(UP, Boolean.valueOf(false)).withProperty(DOWN, Boolean.valueOf(false)));
}
 
Example 55
Project: BaseClient   File: BlockGlowstone.java   Source Code and License 4 votes vote down vote up
public BlockGlowstone(Material materialIn)
{
    super(materialIn);
    this.setCreativeTab(CreativeTabs.tabBlock);
}
 
Example 56
Project: BaseClient   File: BlockSnowBlock.java   Source Code and License 4 votes vote down vote up
protected BlockSnowBlock()
{
    super(Material.craftedSnow);
    this.setTickRandomly(true);
    this.setCreativeTab(CreativeTabs.tabBlock);
}
 
Example 57
Project: Backmemed   File: BlockWorkbench.java   Source Code and License 4 votes vote down vote up
protected BlockWorkbench()
{
    super(Material.WOOD);
    this.setCreativeTab(CreativeTabs.DECORATIONS);
}
 
Example 58
Project: CustomWorldGen   File: BlockMelon.java   Source Code and License 4 votes vote down vote up
protected BlockMelon()
{
    super(Material.GOURD, MapColor.LIME);
    this.setCreativeTab(CreativeTabs.BUILDING_BLOCKS);
}
 
Example 59
Project: VanillaExtras   File: BlockMachine.java   Source Code and License 4 votes vote down vote up
@Override
public void getSubBlocks(Item itemIn, CreativeTabs tab, NonNullList<ItemStack> list) {
	for (int i = 0; i < ChipTypes.values().length; i++) {
		list.add(new ItemStack(itemIn, 1, i));
	}
}
 
Example 60
Project: BaseClient   File: Block.java   Source Code and License 4 votes vote down vote up
public Block setCreativeTab(CreativeTabs tab) {
	this.displayOnCreativeTab = tab;
	return this;
}