Added own creative tab

This commit is contained in:
Henry Mao 2013-01-05 23:19:56 +08:00
parent 0d978d5de4
commit 23e432ac23
12 changed files with 41 additions and 18 deletions

View file

@ -2,6 +2,7 @@
# @author Calclavia
# Gui
itemGroup.assemblyline=Assembly Line
assemblyline.gui.crafting=Crafting
# Blocks

View file

@ -103,6 +103,7 @@ public class AssemblyLine
GameRegistry.registerBlock(blockDetector, "Detector");
GameRegistry.registerBlock(blockRejector, "Rejector");
TabAssemblyLine.itemStack = new ItemStack(AssemblyLine.blockConveyorBelt);
UpdateNotifier.INSTANCE.checkUpdate(NAME, VERSION, "http://calclavia.com/downloads/al/recommendedversion.txt");
proxy.preInit();

View file

@ -0,0 +1,21 @@
package assemblyline.common;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
public class TabAssemblyLine extends CreativeTabs
{
public static final TabAssemblyLine INSTANCE = new TabAssemblyLine("assemblyline");
public static ItemStack itemStack;
public TabAssemblyLine(String par2Str)
{
super(CreativeTabs.getNextID(), par2Str);
}
@Override
public ItemStack getIconItemStack()
{
return itemStack;
}
}

View file

@ -8,9 +8,9 @@ import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.UniversalElectricity;
import universalelectricity.prefab.BlockMachine;
import universalelectricity.prefab.UETab;
import assemblyline.api.IFilterable;
import assemblyline.common.AssemblyLine;
import assemblyline.common.TabAssemblyLine;
import assemblyline.common.machine.imprinter.ItemImprinter;
/**
@ -26,7 +26,7 @@ public class BlockCrate extends BlockMachine
{
super("crate", id, UniversalElectricity.machine);
this.blockIndexInTexture = texture;
this.setCreativeTab(UETab.INSTANCE);
this.setCreativeTab(TabAssemblyLine.INSTANCE);
this.setTextureFile(AssemblyLine.BLOCK_TEXTURE_PATH);
}

View file

@ -5,8 +5,8 @@ import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import universalelectricity.core.UniversalElectricity;
import universalelectricity.prefab.UETab;
import assemblyline.client.render.BlockRenderingHandler;
import assemblyline.common.TabAssemblyLine;
import assemblyline.common.machine.imprinter.BlockImprintable;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -21,7 +21,7 @@ public class BlockManipulator extends BlockImprintable
{
public BlockManipulator(int id)
{
super("manipulator", id, UniversalElectricity.machine, UETab.INSTANCE);
super("manipulator", id, UniversalElectricity.machine, TabAssemblyLine.INSTANCE);
this.setBlockBounds(0, 0, 0, 1, 0.3f, 1);
}

View file

@ -3,8 +3,8 @@ package assemblyline.common.machine;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import universalelectricity.core.UniversalElectricity;
import universalelectricity.prefab.UETab;
import assemblyline.client.render.BlockRenderingHandler;
import assemblyline.common.TabAssemblyLine;
import assemblyline.common.machine.imprinter.BlockImprintable;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -13,7 +13,7 @@ public class BlockRejector extends BlockImprintable
{
public BlockRejector(int id)
{
super("rejector", id, UniversalElectricity.machine, UETab.INSTANCE);
super("rejector", id, UniversalElectricity.machine, TabAssemblyLine.INSTANCE);
}
@Override

View file

@ -10,8 +10,8 @@ import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.UniversalElectricity;
import universalelectricity.prefab.BlockMachine;
import universalelectricity.prefab.UETab;
import assemblyline.client.render.BlockRenderingHandler;
import assemblyline.common.TabAssemblyLine;
import assemblyline.common.machine.belt.TileEntityConveyorBelt.SlantType;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@ -27,7 +27,7 @@ public class BlockConveyorBelt extends BlockMachine
{
super("conveyorBelt", id, UniversalElectricity.machine);
this.setBlockBounds(0, 0, 0, 1, 0.3f, 1);
this.setCreativeTab(UETab.INSTANCE);
this.setCreativeTab(TabAssemblyLine.INSTANCE);
}
@Override

View file

@ -8,8 +8,8 @@ import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeDirection;
import universalelectricity.core.UniversalElectricity;
import universalelectricity.prefab.UETab;
import assemblyline.common.AssemblyLine;
import assemblyline.common.TabAssemblyLine;
import assemblyline.common.machine.imprinter.BlockImprintable;
/**
@ -19,7 +19,7 @@ public class BlockDetector extends BlockImprintable
{
public BlockDetector(int blockID, int texture)
{
super("detector", blockID, UniversalElectricity.machine, UETab.INSTANCE);
super("detector", blockID, UniversalElectricity.machine, TabAssemblyLine.INSTANCE);
this.blockIndexInTexture = texture;
this.setTextureFile(AssemblyLine.BLOCK_TEXTURE_PATH);
}

View file

@ -5,9 +5,9 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import universalelectricity.prefab.BlockMachine;
import universalelectricity.prefab.UETab;
import assemblyline.common.AssemblyLine;
import assemblyline.common.CommonProxy;
import assemblyline.common.TabAssemblyLine;
public class BlockEncoder extends BlockMachine
{
@ -16,7 +16,7 @@ public class BlockEncoder extends BlockMachine
super(id, Material.wood);
this.blockIndexInTexture = 4;
this.setBlockName("encoder");
this.setCreativeTab(UETab.INSTANCE);
this.setCreativeTab(TabAssemblyLine.INSTANCE);
this.setTextureFile(AssemblyLine.BLOCK_TEXTURE_PATH);
}

View file

@ -8,8 +8,8 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import universalelectricity.prefab.UETab;
import assemblyline.common.AssemblyLine;
import assemblyline.common.TabAssemblyLine;
public class ItemDisk extends Item
{
@ -18,7 +18,7 @@ public class ItemDisk extends Item
super(id);
this.setItemName("disk");
this.setIconIndex(0);
this.setCreativeTab(UETab.INSTANCE);
this.setCreativeTab(TabAssemblyLine.INSTANCE);
this.setHasSubtypes(true);
this.setTextureFile(AssemblyLine.ITEM_TEXTURE_PATH);
}

View file

@ -4,9 +4,9 @@ import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.world.World;
import universalelectricity.prefab.BlockMachine;
import universalelectricity.prefab.UETab;
import assemblyline.common.AssemblyLine;
import assemblyline.common.CommonProxy;
import assemblyline.common.TabAssemblyLine;
public class BlockImprinter extends BlockMachine
{
@ -15,7 +15,7 @@ public class BlockImprinter extends BlockMachine
super(id, Material.wood);
this.blockIndexInTexture = 4;
this.setBlockName("imprinter");
this.setCreativeTab(UETab.INSTANCE);
this.setCreativeTab(TabAssemblyLine.INSTANCE);
this.setTextureFile(AssemblyLine.BLOCK_TEXTURE_PATH);
}

View file

@ -8,8 +8,8 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import universalelectricity.prefab.UETab;
import assemblyline.common.AssemblyLine;
import assemblyline.common.TabAssemblyLine;
public class ItemImprinter extends Item
{
@ -18,7 +18,7 @@ public class ItemImprinter extends Item
super(id);
this.setItemName("imprint");
this.setIconIndex(1);
this.setCreativeTab(UETab.INSTANCE);
this.setCreativeTab(TabAssemblyLine.INSTANCE);
this.setHasSubtypes(true);
this.setTextureFile(AssemblyLine.ITEM_TEXTURE_PATH);
}