mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-12 08:17:48 +00:00
All devs and contributors should use the provided formatter settings. If your IDE does not support the format, the rules are simple, it is the default java formatting rules, with 200char line lengths and 1 extra line after class definitions.
77 lines
1.7 KiB
Java
77 lines
1.7 KiB
Java
package com.cricketcraft.chisel.init;
|
|
|
|
import net.minecraft.creativetab.CreativeTabs;
|
|
import net.minecraft.init.Blocks;
|
|
import net.minecraft.item.Item;
|
|
|
|
import com.cricketcraft.chisel.Chisel;
|
|
|
|
import cpw.mods.fml.common.Loader;
|
|
|
|
public class ModTabs {
|
|
|
|
private static boolean atLeastOneModIsLoaded = false;
|
|
|
|
public static CreativeTabs tabChisel;
|
|
public static CreativeTabs tabStoneChiselBlocks, tabWoodChiselBlocks, tabMetalChiselBlocks, tabOtherChiselBlocks, tabModdedChiselBlocks;
|
|
|
|
public static void load() {
|
|
|
|
tabChisel = new CreativeTabs("tabChisel") {
|
|
|
|
@Override
|
|
public Item getTabIconItem() {
|
|
return ModItems.chisel;
|
|
}
|
|
};
|
|
|
|
for (String s : Chisel.modsSupported) {
|
|
if (Loader.isModLoaded(s)) {
|
|
atLeastOneModIsLoaded = true;
|
|
}
|
|
}
|
|
|
|
if (atLeastOneModIsLoaded) {
|
|
tabModdedChiselBlocks = new CreativeTabs("tabModdedChiselBlocks") {
|
|
|
|
@Override
|
|
public Item getTabIconItem() {
|
|
return Item.getItemFromBlock(ModBlocks.arcane);
|
|
}
|
|
};
|
|
}
|
|
|
|
tabStoneChiselBlocks = new CreativeTabs("tabStoneChiselBlocks") {
|
|
|
|
@Override
|
|
public Item getTabIconItem() {
|
|
return Item.getItemFromBlock(ModBlocks.holystone);
|
|
}
|
|
};
|
|
|
|
tabWoodChiselBlocks = new CreativeTabs("tabWoodChiselBlocks") {
|
|
|
|
@Override
|
|
public Item getTabIconItem() {
|
|
return Item.getItemFromBlock(Blocks.bookshelf);
|
|
}
|
|
};
|
|
|
|
tabMetalChiselBlocks = new CreativeTabs("tabMetalChiselBlocks") {
|
|
|
|
@Override
|
|
public Item getTabIconItem() {
|
|
return Item.getItemFromBlock(ModBlocks.technical);
|
|
}
|
|
};
|
|
|
|
tabOtherChiselBlocks = new CreativeTabs("tabOtherChiselBlocks") {
|
|
|
|
@Override
|
|
public Item getTabIconItem() {
|
|
return Item.getItemFromBlock(ModBlocks.jackolantern[0]);
|
|
}
|
|
};
|
|
}
|
|
}
|