Replace homegrown character comparision for builtin ones
This commit is contained in:
parent
ba53c6004c
commit
7150103150
2 changed files with 3 additions and 10 deletions
|
@ -32,13 +32,6 @@ public class GT_Values {
|
||||||
/** Empty String for an easier Call Hierarchy */
|
/** Empty String for an easier Call Hierarchy */
|
||||||
public static final String E = "";
|
public static final String E = "";
|
||||||
|
|
||||||
/** Character Set with all Numbers */
|
|
||||||
public static final HashSet<Character> CN = new HashSet<Character>(Arrays.asList('0', '1', '2', '3', '4', '5', '6', '7', '8', '9'));
|
|
||||||
/** Character Set with all lowercased Characters */
|
|
||||||
public static final HashSet<Character> CL = new HashSet<Character>(Arrays.asList('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'));
|
|
||||||
/** Character Set with all uppercased Characters */
|
|
||||||
public static final HashSet<Character> CU = new HashSet<Character>(Arrays.asList('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'));
|
|
||||||
|
|
||||||
/** The first 32 Bits */
|
/** The first 32 Bits */
|
||||||
public static final int[] B = new int[] {1<<0,1<<1,1<<2,1<<3,1<<4,1<<5,1<<6,1<<7,1<<8,1<<9,1<<10,1<<11,1<<12,1<<13,1<<14,1<<15,1<<16,1<<17,1<<18,1<<19,1<<20,1<<21,1<<22,1<<23,1<<24,1<<25,1<<26,1<<27,1<<28,1<<29,1<<30,1<<31};
|
public static final int[] B = new int[] {1<<0,1<<1,1<<2,1<<3,1<<4,1<<5,1<<6,1<<7,1<<8,1<<9,1<<10,1<<11,1<<12,1<<13,1<<14,1<<15,1<<16,1<<17,1<<18,1<<19,1<<20,1<<21,1<<22,1<<23,1<<24,1<<25,1<<26,1<<27,1<<28,1<<29,1<<30,1<<31};
|
||||||
|
|
||||||
|
|
|
@ -1124,7 +1124,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
||||||
GT_Log.ore.println(tModToName + " is invalid due to being solely uppercased.");
|
GT_Log.ore.println(tModToName + " is invalid due to being solely uppercased.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (GT_Values.CU.contains(Character.valueOf(aEvent.Name.charAt(0)))) {
|
if (Character.isUpperCase(aEvent.Name.charAt(0))) {
|
||||||
GT_Log.ore.println(tModToName + " is invalid due to the first character being uppercased.");
|
GT_Log.ore.println(tModToName + " is invalid due to the first character being uppercased.");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1141,8 +1141,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
|
||||||
}
|
}
|
||||||
String tName = aEvent.Name.replaceFirst(aPrefix.toString(), "");
|
String tName = aEvent.Name.replaceFirst(aPrefix.toString(), "");
|
||||||
if (tName.length() > 0) {
|
if (tName.length() > 0) {
|
||||||
if ((GT_Values.CU.contains(Character.valueOf(tName.charAt(0)))) || (GT_Values.CN.contains(Character.valueOf(tName.charAt(0))))
|
char firstChar = tName.charAt(0);
|
||||||
|| (tName.charAt(0) == '_')) {
|
if (Character.isUpperCase(firstChar) || Character.isLowerCase(firstChar) || firstChar == '_') {
|
||||||
if (aPrefix.mIsMaterialBased) {
|
if (aPrefix.mIsMaterialBased) {
|
||||||
aMaterial = Materials.get(tName);
|
aMaterial = Materials.get(tName);
|
||||||
if (aMaterial != aMaterial.mMaterialInto) {
|
if (aMaterial != aMaterial.mMaterialInto) {
|
||||||
|
|
Loading…
Reference in a new issue