Updated getByName functions

Made comparison case insensitive
This commit is contained in:
joflashstudios 2015-06-25 19:16:26 -04:00
parent 0f6747f703
commit 33b274ca68
12 changed files with 12 additions and 12 deletions

View file

@ -15,7 +15,7 @@ public class ItemCrushedOre extends Item {
public static ItemStack getCrushedOreByName(String name, int count)
{
for (int i = 0; i < types.length; i++) {
if (types[i].equals(name)) {
if (types[i].equalsIgnoreCase(name)) {
return new ItemStack(ModItems.crushedOre, count, i);
}
}

View file

@ -16,7 +16,7 @@ public class ItemDustTiny extends ItemTR {
public static ItemStack getTinyDustByName(String name, int count)
{
for (int i = 0; i < types.length; i++) {
if (types[i].equals(name)) {
if (types[i].equalsIgnoreCase(name)) {
return new ItemStack(ModItems.tinyDusts, count, i);
}
}

View file

@ -15,7 +15,7 @@ public class ItemDusts extends ItemTR {
public static ItemStack getDustByName(String name, int count)
{
for (int i = 0; i < types.length; i++) {
if (types[i].equals(name)) {
if (types[i].equalsIgnoreCase(name)) {
return new ItemStack(ModItems.dusts, count, i);
}
}

View file

@ -16,7 +16,7 @@ public class ItemDustsSmall extends ItemTR {
public static ItemStack getSmallDustByName(String name, int count)
{
for (int i = 0; i < types.length; i++) {
if (types[i].equals(name)) {
if (types[i].equalsIgnoreCase(name)) {
return new ItemStack(ModItems.smallDusts, count, i);
}
}

View file

@ -16,7 +16,7 @@ public class ItemGems extends Item {
public static ItemStack getGemByName(String name, int count)
{
for (int i = 0; i < types.length; i++) {
if (types[i].equals(name)) {
if (types[i].equalsIgnoreCase(name)) {
return new ItemStack(ModItems.gems, count, i);
}
}

View file

@ -15,7 +15,7 @@ public class ItemIngots extends Item {
public static ItemStack getIngotByName(String name, int count)
{
for (int i = 0; i < types.length; i++) {
if (types[i].equals(name)) {
if (types[i].equalsIgnoreCase(name)) {
return new ItemStack(ModItems.ingots, count, i);
}
}

View file

@ -16,7 +16,7 @@ public class ItemNuggets extends Item {
public static ItemStack getNuggetByName(String name, int count)
{
for (int i = 0; i < types.length; i++) {
if (types[i].equals(name)) {
if (types[i].equalsIgnoreCase(name)) {
return new ItemStack(ModItems.nuggets, count, i);
}
}

View file

@ -19,7 +19,7 @@ public class ItemParts extends Item {
public static ItemStack getPartByName(String name, int count)
{
for (int i = 0; i < types.length; i++) {
if (types[i].equals(name)) {
if (types[i].equalsIgnoreCase(name)) {
return new ItemStack(ModItems.parts, count, i);
}
}

View file

@ -16,7 +16,7 @@ public class ItemPlates extends ItemTR {
public static ItemStack getPlateByName(String name, int count)
{
for (int i = 0; i < types.length; i++) {
if (types[i].equals(name)) {
if (types[i].equalsIgnoreCase(name)) {
return new ItemStack(ModItems.plate, count, i);
}
}

View file

@ -16,7 +16,7 @@ public class ItemPurifiedCrushedOre extends Item {
public static ItemStack getPurifiedCrushedOreByName(String name, int count)
{
for (int i = 0; i < types.length; i++) {
if (types[i].equals(name)) {
if (types[i].equalsIgnoreCase(name)) {
return new ItemStack(ModItems.purifiedCrushedOre, count, i);
}
}

View file

@ -16,7 +16,7 @@ public class ItemRods extends Item {
public static ItemStack getRodByName(String name, int count)
{
for (int i = 0; i < types.length; i++) {
if (types[i].equals(name)) {
if (types[i].equalsIgnoreCase(name)) {
return new ItemStack(ModItems.rods, count, i);
}
}

View file

@ -17,7 +17,7 @@ public class ItemUpgrade extends ItemTR implements IMachineUpgrade {
public static ItemStack getUpgradeByName(String name, int count) {
for (int i = 0; i < types.length; i++) {
if (types[i].equals(name)) {
if (types[i].equalsIgnoreCase(name)) {
return new ItemStack(ModItems.plate, count, i);
}
}