ActuallyAdditions/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java

132 lines
4.4 KiB
Java
Raw Normal View History

2015-03-07 12:51:28 +01:00
package ellpeck.actuallyadditions.creative;
2015-01-30 20:16:32 +01:00
2015-03-08 14:58:26 +01:00
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import ellpeck.actuallyadditions.blocks.InitBlocks;
2015-03-07 12:51:28 +01:00
import ellpeck.actuallyadditions.items.InitItems;
2015-03-29 15:29:05 +02:00
import ellpeck.actuallyadditions.util.ModUtil;
2015-03-08 14:58:26 +01:00
import net.minecraft.block.Block;
2015-01-30 20:16:32 +01:00
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
2015-03-08 14:58:26 +01:00
import java.util.List;
2015-01-30 20:16:32 +01:00
public class CreativeTab extends CreativeTabs{
public static CreativeTab instance = new CreativeTab();
2015-03-08 14:58:26 +01:00
private List list;
2015-01-30 20:16:32 +01:00
public CreativeTab(){
2015-03-29 15:29:05 +02:00
super(ModUtil.MOD_ID_LOWER);
2015-01-30 20:16:32 +01:00
}
2015-03-08 14:58:26 +01:00
@Override
@SideOnly(Side.CLIENT)
public void displayAllReleventItems(List list){
this.list = list;
2015-06-15 22:06:07 +02:00
addBlock(InitBlocks.blockPhantomface);
addBlock(InitBlocks.blockPhantomEnergyface);
addBlock(InitBlocks.blockPhantomLiquiface);
addBlock(InitBlocks.blockPhantomPlacer);
addBlock(InitBlocks.blockPhantomBreaker);
addBlock(InitBlocks.blockPhantomBooster);
addBlock(InitBlocks.blockCoffeeMachine);
addBlock(InitBlocks.blockInputter);
addBlock(InitBlocks.blockInputterAdvanced);
addBlock(InitBlocks.blockGreenhouseGlass);
addBlock(InitBlocks.blockGrinder);
addBlock(InitBlocks.blockGrinderDouble);
addBlock(InitBlocks.blockFurnaceDouble);
addBlock(InitBlocks.blockLavaFactoryController);
addBlock(InitBlocks.blockFurnaceSolar);
addBlock(InitBlocks.blockHeatCollector);
addBlock(InitBlocks.blockCoalGenerator);
addBlock(InitBlocks.blockOilGenerator);
addBlock(InitBlocks.blockItemRepairer);
addBlock(InitBlocks.blockFishingNet);
addBlock(InitBlocks.blockBreaker);
addBlock(InitBlocks.blockPlacer);
addBlock(InitBlocks.blockDropper);
addBlock(InitBlocks.blockFluidPlacer);
addBlock(InitBlocks.blockFluidCollector);
addBlock(InitBlocks.blockMisc);
addBlock(InitBlocks.blockFeeder);
addBlock(InitBlocks.blockCompost);
addBlock(InitBlocks.blockGiantChest);
addBlock(InitBlocks.blockCanolaPress);
addBlock(InitBlocks.blockFermentingBarrel);
2015-06-18 13:14:57 +02:00
//addItem(InitItems.itemDrill);
2015-06-15 22:06:07 +02:00
addItem(InitItems.itemPhantomConnector);
addItem(InitItems.itemBucketCanolaOil);
addItem(InitItems.itemBucketOil);
addItem(InitItems.itemCoffeeSeed);
addItem(InitItems.itemCoffeeBean);
addItem(InitItems.itemRiceSeed);
addItem(InitItems.itemCanolaSeed);
addItem(InitItems.itemFlaxSeed);
addItem(InitItems.itemHairyBall);
addItem(InitItems.itemMisc);
addItem(InitItems.itemResonantRice);
addItem(InitItems.itemFertilizer);
addItem(InitItems.itemCoffee);
addItem(InitItems.itemFoods);
addItem(InitItems.itemKnife);
addItem(InitItems.itemCrafterOnAStick);
addItem(InitItems.itemDust);
addItem(InitItems.itemSpecialDrop);
addItem(InitItems.itemLeafBlower);
addItem(InitItems.itemLeafBlowerAdvanced);
addItem(InitItems.woodenPaxel);
addItem(InitItems.stonePaxel);
addItem(InitItems.ironPaxel);
addItem(InitItems.goldPaxel);
addItem(InitItems.diamondPaxel);
addItem(InitItems.emeraldPaxel);
addItem(InitItems.obsidianPaxel);
addItem(InitItems.itemPickaxeEmerald);
addItem(InitItems.itemSwordEmerald);
addItem(InitItems.itemAxeEmerald);
addItem(InitItems.itemShovelEmerald);
addItem(InitItems.itemHoeEmerald);
addItem(InitItems.itemPickaxeObsidian);
addItem(InitItems.itemSwordObsidian);
addItem(InitItems.itemAxeObsidian);
addItem(InitItems.itemShovelObsidian);
addItem(InitItems.itemHoeObsidian);
addItem(InitItems.itemPotionRing);
addItem(InitItems.itemPotionRingAdvanced);
addItem(InitItems.itemJams);
2015-03-08 14:58:26 +01:00
}
@Override
2015-01-30 20:16:32 +01:00
public Item getTabIconItem(){
2015-05-30 17:47:57 +02:00
return Item.getItemFromBlock(InitBlocks.blockPhantomLiquiface);
2015-01-30 20:16:32 +01:00
}
@Override
2015-01-30 20:16:32 +01:00
public ItemStack getIconItemStack(){
2015-03-08 14:58:26 +01:00
return new ItemStack(this.getTabIconItem());
}
private void addItem(Item item){
2015-06-15 22:06:07 +02:00
item.getSubItems(item, instance, list);
2015-03-08 14:58:26 +01:00
}
private void addBlock(Block block){
2015-06-15 22:06:07 +02:00
block.getSubBlocks(new ItemStack(block).getItem(), instance, list);
2015-01-30 20:16:32 +01:00
}
}