resonant-induction/minecraft/dark/BasicUtilities/Items/ItemParts.java
Rseifert 5787f65148 Reformating, and rebalance of tanks, Final 1.4.5
Did some file changes to make finding things easier
Added: Custom creative tab
Changed: File root system, :p to many files
Changed: Tank liquid trade method to balance out instead of full trade
Changed: the packet update rate of the Tank to try to fix Render Lag
Fixed: Tank Render so Liquid levels can be seen
BugIgnorable: uneven levels of liquid will not show up on tank render
but are present
BugIgnorable: eValve names sometime glitch and call all instances Empty
XXX
TODO: Fix Textures, and add model for eValve
TODO: Finish One way valve
TODO: Finish OIL,STEAM,FUEL liquid/gas blocks
2012-12-23 05:28:26 -05:00

71 lines
1.8 KiB
Java

package dark.BasicUtilities.Items;
import java.util.List;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import dark.BasicUtilities.BasicUtilitiesMain;
import dark.BasicUtilities.PipeTab;
public class ItemParts extends Item
{
public enum basicParts
{
Bronze("Bronze Tube", 0), Iron("Iron Tube", 1), Obby("Obby Tube", 2),
Nether("Nether Tube", 3), Seal("Seal", 16), SlimeSeal("Slime Seal", 17),
Tank("unfinished Tank", 18), Valve("Valve", 19);
public String name;
public int itemIndex;
private basicParts(String name, int itemIndex)
{
this.name = name;
this.itemIndex = itemIndex;
}
}
public ItemParts(int par1)
{
super(par1);
this.setItemName("Parts");
this.setHasSubtypes(true);
this.setMaxDamage(0);
this.setMaxStackSize(64);
this.setCreativeTab(PipeTab.INSTANCE);
}
@Override
public int getIconFromDamage(int par1)
{
if (par1 < basicParts.values().length) { return basicParts.values()[par1].itemIndex; }
return par1;
}
@Override
public String getItemNameIS(ItemStack itemstack)
{
if (itemstack.getItemDamage() < basicParts.values().length) { return basicParts.values()[itemstack.getItemDamage()].name; }
return "unkown";
}
@Override
public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List)
{
for (int i = 0; i < basicParts.values().length; i++)
{
par3List.add(new ItemStack(this, 1, i));
}
}
public String getTextureFile()
{
return BasicUtilitiesMain.ITEM_PNG;
}
@Override
public String getItemName()
{
return "parts";
}
}