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

108 lines
3.7 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-03-19 21:27:56 +01:00
this.addBlock(InitBlocks.blockInputter);
this.addBlock(InitBlocks.blockInputterAdvanced);
2015-05-20 22:39:43 +02:00
this.addBlock(InitBlocks.blockPhantomface);
2015-04-19 01:50:02 +02:00
this.addBlock(InitBlocks.blockGreenhouseGlass);
2015-03-08 14:58:26 +01:00
this.addBlock(InitBlocks.blockGrinder);
this.addBlock(InitBlocks.blockGrinderDouble);
this.addBlock(InitBlocks.blockFurnaceDouble);
2015-04-26 20:07:57 +02:00
2015-05-20 22:39:43 +02:00
this.addBlock(InitBlocks.blockFurnaceSolar);
this.addBlock(InitBlocks.blockHeatCollector);
this.addBlock(InitBlocks.blockCoalGenerator);
this.addBlock(InitBlocks.blockOilGenerator);
2015-04-02 12:06:42 +02:00
this.addBlock(InitBlocks.blockItemRepairer);
2015-04-19 01:50:02 +02:00
this.addBlock(InitBlocks.blockFishingNet);
this.addBlock(InitBlocks.blockBreaker);
this.addBlock(InitBlocks.blockPlacer);
2015-05-04 17:26:50 +02:00
this.addBlock(InitBlocks.blockDropper);
2015-03-08 14:58:26 +01:00
this.addBlock(InitBlocks.blockMisc);
this.addBlock(InitBlocks.blockFeeder);
this.addBlock(InitBlocks.blockCompost);
this.addBlock(InitBlocks.blockGiantChest);
2015-05-20 22:39:43 +02:00
this.addBlock(InitBlocks.blockCanolaPress);
this.addBlock(InitBlocks.blockFermentingBarrel);
2015-03-08 14:58:26 +01:00
2015-05-20 22:39:43 +02:00
this.addItem(InitItems.itemPhantomConnector);
this.addItem(InitItems.itemBucketCanolaOil);
this.addItem(InitItems.itemBucketOil);
this.addItem(InitItems.itemRiceSeed);
this.addItem(InitItems.itemCanolaSeed);
2015-05-07 16:36:29 +02:00
this.addItem(InitItems.itemHairyBall);
2015-03-08 14:58:26 +01:00
this.addItem(InitItems.itemMisc);
2015-05-20 22:39:43 +02:00
this.addItem(InitItems.itemResonantRice);
2015-03-08 14:58:26 +01:00
this.addItem(InitItems.itemFertilizer);
this.addItem(InitItems.itemFoods);
this.addItem(InitItems.itemKnife);
this.addItem(InitItems.itemCrafterOnAStick);
this.addItem(InitItems.itemDust);
this.addItem(InitItems.itemSpecialDrop);
2015-03-29 15:29:05 +02:00
this.addItem(InitItems.itemLeafBlower);
this.addItem(InitItems.itemLeafBlowerAdvanced);
2015-03-08 14:58:26 +01:00
this.addItem(InitItems.itemPickaxeEmerald);
this.addItem(InitItems.itemSwordEmerald);
this.addItem(InitItems.itemAxeEmerald);
this.addItem(InitItems.itemShovelEmerald);
this.addItem(InitItems.itemHoeEmerald);
this.addItem(InitItems.itemPickaxeObsidian);
this.addItem(InitItems.itemSwordObsidian);
this.addItem(InitItems.itemAxeObsidian);
this.addItem(InitItems.itemShovelObsidian);
this.addItem(InitItems.itemHoeObsidian);
2015-03-31 20:37:55 +02:00
this.addItem(InitItems.itemPotionRing);
this.addItem(InitItems.itemPotionRingAdvanced);
this.addItem(InitItems.itemJams);
2015-03-08 14:58:26 +01:00
}
@Override
2015-01-30 20:16:32 +01:00
public Item getTabIconItem(){
2015-03-19 21:27:56 +01:00
return Item.getItemFromBlock(InitBlocks.blockInputter);
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){
item.getSubItems(item, this, list);
}
private void addBlock(Block block){
block.getSubBlocks(new ItemStack(block).getItem(), this, list);
2015-01-30 20:16:32 +01:00
}
}