Updated getByName functions
Made comparison case insensitive
This commit is contained in:
parent
0f6747f703
commit
33b274ca68
12 changed files with 12 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue