public void addWand() {
ItemStack wand = new ItemStack(ConfigItems.itemWandCasting);
((ItemWandCasting) wand.getItem()).setRod(wand, ConfigItems.WAND_ROD_SILVERWOOD);
((ItemWandCasting) wand.getItem()).setCap(wand, ConfigItems.WAND_CAP_THAUMIUM);
((ItemWandCasting) wand.getItem()).storeAllVis(wand, new AspectList().add(Aspect.AIR, 10000).add(Aspect.EARTH, 10000).add(Aspect.FIRE, 10000).add(Aspect.WATER, 10000).add(Aspect.ORDER, 10000).add(Aspect.ENTROPY, 10000));
if (list != null)
list.add(wand);
displayItem = wand;
if (ConfigHandler.enableKami) {
ItemStack wand1 = new ItemStack(ConfigItems.itemWandCasting)...
@SideOnly(Side.CLIENT)
public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List) {
ItemStack w1 = new ItemStack(this, 1, 0);
ItemStack w2 = new ItemStack(this, 1, 9);
ItemStack w3 = new ItemStack(this, 1, 54);
((ItemWandCasting)w2.getItem()).setCap(w2, ConfigItems.WAND_CAP_GOLD);
((ItemWandCasting)w3.getItem()).setCap(w3, ConfigItems.WAND_CAP_THAUMIUM);
((ItemWandCasting)w2.getItem()).setRod(w2, ConfigItems.WAND_ROD_GREATWOOD);
((ItemWandCasting)w3.getItem()).setRod(w3, ConfigItems.WAND_ROD_SILVERWOOD);
ItemStack sceptre = new ItemStack(ConfigItems.itemWandCasting, 1, 128);
((ItemWandCasting)sceptre.getItem()).setCap(sceptre, ConfigItems.WAND_CAP_THAUMIUM);
((ItemWandCasting)sceptre.getItem()).setRod(sceptre, ConfigItems.WAND_ROD_SILVERWOOD);
sceptre.setTagInfo("sceptre", new NBTTagByte((byte)1));
Iterator i$ = Aspect.getPrimalAspects().iterator();
while(i$.hasNext()) {
Aspect aspect = (Aspect)i$.next();
((ItemWandCasting)w1.getItem()).addVis(w1, aspect, ((ItemWandCasting)w1.getItem()).getMaxVis(w1), true);
((ItemWandCasting)w2.getItem()).addVis(w2, aspect, ((ItemWandCasting)w2.getItem()).getMaxVis(w2), true);
((ItemWandCasting)w3.getItem()).addVis(w3, aspect, ((ItemWandCasting)w3.getItem()).getMaxVis(w3), true);
((ItemWandCasting)sceptre.getItem()).addVis(sceptre, aspect, ((ItemWandCasting)sceptre.getItem()).getMaxVis(sceptre), true);
}
par3List.add(w1);
par3List.add(w2);
par3List.add(w3);
par3List.add(sceptre);
}
public void addWand() {
ItemStack wand = new ItemStack(ConfigItems.itemWandCasting);
((ItemWandCasting) wand.getItem()).setRod(wand, ConfigItems.WAND_ROD_SILVERWOOD);
((ItemWandCasting) wand.getItem()).setCap(wand, ConfigItems.WAND_CAP_THAUMIUM);
((ItemWandCasting) wand.getItem()).storeAllVis(wand, new AspectList().add(Aspect.AIR, 10000).add(Aspect.EARTH, 10000).add(Aspect.FIRE, 10000).add(Aspect.WATER, 10000).add(Aspect.ORDER, 10000).add(Aspect.ENTROPY, 10000));
if (list != null)
list.add(wand);
displayItem = wand;
if (ConfigHandler.enableKami) {
ItemStack wand1 = new ItemStack(ConfigItems.itemWandCasting);
((ItemWandCasting) wand1.getItem()).setRod(wand1, ThaumicTinkerer.proxy.rodIchor);
((ItemWandCasting) wand1.getItem()).setCap(wand1, ThaumicTinkerer.proxy.capIchor);
((ItemWandCasting) wand1.getItem()).storeAllVis(wand1, new AspectList().add(Aspect.AIR, 100000).add(Aspect.EARTH, 100000).add(Aspect.FIRE, 100000).add(Aspect.WATER, 100000).add(Aspect.ORDER, 100000).add(Aspect.ENTROPY, 100000));
if (list != null)
list.add(wand1);
displayItem = wand1;
}
}
public class ModCreativeTab extends CreativeTabs {
public static ModCreativeTab INSTANCE;
//Holds the registered items and blocks before they are sorted
public ArrayList<ItemStack> creativeTabQueue = new ArrayList<ItemStack>();
ItemStack displayItem;
List list = new ArrayList();
public ModCreativeTab() {
super(LibMisc.MOD_ID);
//addWand();
}
@Override
public ItemStack getIconItemStack() {
return displayItem;
}
@Override
public Item getTabIconItem() {
return ThaumicTinkerer.registry.getFirstItemFromClass(ItemKamiResource.class);
}
@Override
public void displayAllReleventItems(List list) {
list.addAll(this.list);
}
public void addWand() {
ItemStack wand = new ItemStack(ConfigItems.itemWandCasting);
((ItemWandCasting) wand.getItem()).setRod(wand, ConfigItems.WAND_ROD_SILVERWOOD);
((ItemWandCasting) wand.getItem()).setCap(wand, ConfigItems.WAND_CAP_THAUMIUM);
((ItemWandCasting) wand.getItem()).storeAllVis(wand, new AspectList().add(Aspect.AIR, 10000).add(Aspect.EARTH, 10000).add(Aspect.FIRE, 10000).add(Aspect.WATER, 10000).add(Aspect.ORDER, 10000).add(Aspect.ENTROPY, 10000));
if (list != null)
list.add(wand);
displayItem = wand;
if (ConfigHandler.enableKami) {
ItemStack wand1 = new ItemStack(ConfigItems.itemWandCasting);
((ItemWandCasting) wand1.getItem()).setRod(wand1, ThaumicTinkerer.proxy.rodIchor);
((ItemWandCasting) wand1.getItem()).setCap(wand1, ThaumicTinkerer.proxy.capIchor);
((ItemWandCasting) wand1.getItem()).storeAllVis(wand1, new AspectList().add(Aspect.AIR, 100000).add(Aspect.EARTH, 100000).add(Aspect.FIRE, 100000).add(Aspect.WATER, 100000).add(Aspect.ORDER, 100000).add(Aspect.ENTROPY, 100000));
if (list != null)
list.add(wand1);
displayItem = wand1;
}
}
public void addItem(Item item) {
item.getSubItems(item, this, creativeTabQueue);
}
public void addBlock(Block block) {
block.getSubBlocks(Item.getItemFromBlock(block), this, creativeTabQueue);
}
public void addAllItemsAndBlocks() {
Collections.sort(creativeTabQueue, new ItemStackCompatator());
list.addAll(creativeTabQueue);
}
}
ModCreativeTab.INSTANCE.addWand();
@Override
public void displayAllReleventItems(List list) {
list.addAll(this.list);
}