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);
|
2015-04-04 05:20:19 +02:00
|
|
|
this.addBlock(InitBlocks.blockInputterAdvanced);
|
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-03-30 15:08:19 +02:00
|
|
|
this.addBlock(InitBlocks.blockFurnaceSolar);
|
2015-03-31 20:37:55 +02:00
|
|
|
this.addBlock(InitBlocks.blockHeatCollector);
|
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-03-08 14:58:26 +01:00
|
|
|
|
|
|
|
this.addBlock(InitBlocks.blockMisc);
|
|
|
|
this.addBlock(InitBlocks.blockFeeder);
|
|
|
|
this.addBlock(InitBlocks.blockCompost);
|
|
|
|
this.addBlock(InitBlocks.blockGiantChest);
|
|
|
|
|
2015-04-24 19:22:03 +02:00
|
|
|
this.addItem(InitItems.itemSpeedUpgrade);
|
2015-03-08 14:58:26 +01:00
|
|
|
this.addItem(InitItems.itemMisc);
|
|
|
|
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);
|
2015-04-06 15:51:59 +02:00
|
|
|
|
|
|
|
this.addItem(InitItems.itemJams);
|
2015-03-08 14:58:26 +01:00
|
|
|
}
|
|
|
|
|
2015-02-20 22:45:33 +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
|
|
|
}
|
|
|
|
|
2015-02-20 22:45:33 +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
|
|
|
}
|
|
|
|
}
|