Reformatted all the code using the default intelji formatting options.
This commit is contained in:
parent
2f63a24070
commit
e0ab0af822
363 changed files with 20524 additions and 23016 deletions
|
@ -12,91 +12,82 @@ import java.security.InvalidParameterException;
|
|||
import java.util.List;
|
||||
|
||||
public class ItemDustsTiny extends ItemTR {
|
||||
|
||||
public static ItemStack getTinyDustByName(String name, int count)
|
||||
{
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
if (types[i].equalsIgnoreCase(name)) {
|
||||
return new ItemStack(ModItems.tinyDusts, count, i);
|
||||
}
|
||||
}
|
||||
throw new InvalidParameterException("The gem " + name + " could not be found.");
|
||||
}
|
||||
|
||||
public static ItemStack getTinyDustByName(String name)
|
||||
{
|
||||
return getTinyDustByName(name, 1);
|
||||
}
|
||||
|
||||
public static final String[] types = new String[]
|
||||
{ "Almandine", "AluminumBrass", "Aluminum", "Alumite", "Andradite",
|
||||
"Antimony", "Ardite", "Ashes", "Basalt", "Bauxite", "Biotite",
|
||||
"Brass", "Bronze", "Cadmium", "Calcite", "Charcoal", "Chrome",
|
||||
"Cinnabar", "Clay", "Coal", "Cobalt", "Copper", "Cupronickel",
|
||||
"DarkAshes", "DarkIron", "Diamond", "Electrum", "Emerald",
|
||||
"EnderEye", "EnderPearl", "Endstone", "Flint", "Glowstone", "Gold", "Graphite",
|
||||
"Grossular", "Gunpowder", "Indium", "Invar", "Iridium", "Iron", "Kanthal", "Lapis", "Lazurite",
|
||||
"Lead", "Limestone", "Lodestone", "Magnesium", "Magnetite", "Manganese",
|
||||
"Manyullyn", "Marble", "Mithril", "Netherrack", "Nichrome", "Nickel",
|
||||
"Obsidian", "Osmium", "Peridot", "Phosphorous", "Platinum", "PotassiumFeldspar",
|
||||
"Pyrite", "Pyrope", "RedGarnet", "Redrock", "Redstone", "Ruby", "Saltpeter",
|
||||
"Sapphire", "Silicon", "Silver", "Sodalite", "Spessartine", "Sphalerite",
|
||||
"Steel", "Sulfur", "Tellurium", "Teslatite", "Tetrahedrite", "Tin",
|
||||
"Titanium", "Tungsten", "Uvarovite", "Vinteum", "Voidstone", "YellowGarnet",
|
||||
"Zinc", "Galena" };
|
||||
|
||||
private IIcon[] textures;
|
||||
public static ItemStack getTinyDustByName(String name, int count) {
|
||||
for (int i = 0; i < types.length; i++) {
|
||||
if (types[i].equalsIgnoreCase(name)) {
|
||||
return new ItemStack(ModItems.tinyDusts, count, i);
|
||||
}
|
||||
}
|
||||
throw new InvalidParameterException("The gem " + name + " could not be found.");
|
||||
}
|
||||
|
||||
public ItemDustsTiny()
|
||||
{
|
||||
setUnlocalizedName("techreborn.dusttiny");
|
||||
setHasSubtypes(true);
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
}
|
||||
public static ItemStack getTinyDustByName(String name) {
|
||||
return getTinyDustByName(name, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
// Registers Textures For All Dusts
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
textures = new IIcon[types.length];
|
||||
public static final String[] types = new String[]
|
||||
{"Almandine", "AluminumBrass", "Aluminum", "Alumite", "Andradite",
|
||||
"Antimony", "Ardite", "Ashes", "Basalt", "Bauxite", "Biotite",
|
||||
"Brass", "Bronze", "Cadmium", "Calcite", "Charcoal", "Chrome",
|
||||
"Cinnabar", "Clay", "Coal", "Cobalt", "Copper", "Cupronickel",
|
||||
"DarkAshes", "DarkIron", "Diamond", "Electrum", "Emerald",
|
||||
"EnderEye", "EnderPearl", "Endstone", "Flint", "Glowstone", "Gold", "Graphite",
|
||||
"Grossular", "Gunpowder", "Indium", "Invar", "Iridium", "Iron", "Kanthal", "Lapis", "Lazurite",
|
||||
"Lead", "Limestone", "Lodestone", "Magnesium", "Magnetite", "Manganese",
|
||||
"Manyullyn", "Marble", "Mithril", "Netherrack", "Nichrome", "Nickel",
|
||||
"Obsidian", "Osmium", "Peridot", "Phosphorous", "Platinum", "PotassiumFeldspar",
|
||||
"Pyrite", "Pyrope", "RedGarnet", "Redrock", "Redstone", "Ruby", "Saltpeter",
|
||||
"Sapphire", "Silicon", "Silver", "Sodalite", "Spessartine", "Sphalerite",
|
||||
"Steel", "Sulfur", "Tellurium", "Teslatite", "Tetrahedrite", "Tin",
|
||||
"Titanium", "Tungsten", "Uvarovite", "Vinteum", "Voidstone", "YellowGarnet",
|
||||
"Zinc", "Galena"};
|
||||
|
||||
for (int i = 0; i < types.length; ++i)
|
||||
{
|
||||
textures[i] = iconRegister.registerIcon("techreborn:" + "tinyDust/tiny"
|
||||
+ types[i] + "Dust");
|
||||
}
|
||||
}
|
||||
private IIcon[] textures;
|
||||
|
||||
@Override
|
||||
// Adds Texture what match's meta data
|
||||
public IIcon getIconFromDamage(int meta)
|
||||
{
|
||||
if (meta < 0 || meta >= textures.length)
|
||||
{
|
||||
meta = 0;
|
||||
}
|
||||
public ItemDustsTiny() {
|
||||
setUnlocalizedName("techreborn.dusttiny");
|
||||
setHasSubtypes(true);
|
||||
setCreativeTab(TechRebornCreativeTabMisc.instance);
|
||||
}
|
||||
|
||||
return textures[meta];
|
||||
}
|
||||
@Override
|
||||
// Registers Textures For All Dusts
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
textures = new IIcon[types.length];
|
||||
|
||||
@Override
|
||||
// gets Unlocalized Name depending on meta data
|
||||
public String getUnlocalizedName(ItemStack itemStack)
|
||||
{
|
||||
int meta = itemStack.getItemDamage();
|
||||
if (meta < 0 || meta >= types.length)
|
||||
{
|
||||
meta = 0;
|
||||
}
|
||||
for (int i = 0; i < types.length; ++i) {
|
||||
textures[i] = iconRegister.registerIcon("techreborn:" + "tinyDust/tiny"
|
||||
+ types[i] + "Dust");
|
||||
}
|
||||
}
|
||||
|
||||
return super.getUnlocalizedName() + "." + types[meta];
|
||||
}
|
||||
@Override
|
||||
// Adds Texture what match's meta data
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
if (meta < 0 || meta >= textures.length) {
|
||||
meta = 0;
|
||||
}
|
||||
|
||||
// Adds Dusts SubItems To Creative Tab
|
||||
public void getSubItems(Item item, CreativeTabs creativeTabs, List list) {
|
||||
for (int meta = 0; meta < types.length; ++meta) {
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
}
|
||||
}
|
||||
return textures[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
// gets Unlocalized Name depending on meta data
|
||||
public String getUnlocalizedName(ItemStack itemStack) {
|
||||
int meta = itemStack.getItemDamage();
|
||||
if (meta < 0 || meta >= types.length) {
|
||||
meta = 0;
|
||||
}
|
||||
|
||||
return super.getUnlocalizedName() + "." + types[meta];
|
||||
}
|
||||
|
||||
// Adds Dusts SubItems To Creative Tab
|
||||
public void getSubItems(Item item, CreativeTabs creativeTabs, List list) {
|
||||
for (int meta = 0; meta < types.length; ++meta) {
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue