mirror of
https://github.com/GTNewHorizons/Chisel.git
synced 2026-11-17 03:05:10 +00:00
Begin major feature structor overhaul. Just recipes left to do.
This commit is contained in:
1 parent
71016458bd
commit
85e58f4f57
32 files changed
+424
-2116
No files matched your search
@@ -0,0 +1,83 @@
|
||||
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 ChiselTabs {
|
||||
|
||||
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 ChiselItems.chisel;
|
||||
}
|
||||
};
|
||||
|
||||
for (String s : Chisel.modsSupported) {
|
||||
if (Loader.isModLoaded(s)) {
|
||||
atLeastOneModIsLoaded = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (atLeastOneModIsLoaded) {
|
||||
tabModdedChiselBlocks = new CreativeTabs("tabModdedChiselBlocks") {
|
||||
|
||||
@Override
|
||||
public Item getTabIconItem() {
|
||||
|
||||
if (Loader.isModLoaded("Thaumcraft")) {
|
||||
return Item.getItemFromBlock(ChiselBlocks.arcane);
|
||||
} else if (Loader.isModLoaded("AWWayOfTime")) {
|
||||
return Item.getItemFromBlock(ChiselBlocks.bloodRune);
|
||||
} else {
|
||||
return Item.getItemFromBlock(ChiselBlocks.voidstone);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
tabStoneChiselBlocks = new CreativeTabs("tabStoneChiselBlocks") {
|
||||
|
||||
@Override
|
||||
public Item getTabIconItem() {
|
||||
return Item.getItemFromBlock(ChiselBlocks.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(ChiselBlocks.technical);
|
||||
}
|
||||
};
|
||||
|
||||
tabOtherChiselBlocks = new CreativeTabs("tabOtherChiselBlocks") {
|
||||
|
||||
@Override
|
||||
public Item getTabIconItem() {
|
||||
return Item.getItemFromBlock(ChiselBlocks.jackolantern[0]);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user