diff options
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/api/util')
| -rw-r--r-- | src/main/java/gtPlusPlus/xmod/gregtech/api/util/GTPPConfig.java (renamed from src/main/java/gtPlusPlus/xmod/gregtech/api/util/GTPP_Config.java) | 38 | ||||
| -rw-r--r-- | src/main/java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java | 4 |
2 files changed, 21 insertions, 21 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/util/GTPP_Config.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/util/GTPPConfig.java index 65beea207a..1a32b75bb8 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/util/GTPP_Config.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/util/GTPPConfig.java @@ -1,46 +1,46 @@ package gtPlusPlus.xmod.gregtech.api.util; -import static gregtech.api.enums.GT_Values.E; +import static gregtech.api.enums.GTValues.E; import net.minecraft.item.ItemStack; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Property; -import gregtech.api.GregTech_API; -import gregtech.api.util.GT_OreDictUnificator; -import gregtech.api.util.GT_Utility; +import gregtech.api.GregTechAPI; +import gregtech.api.util.GTOreDictUnificator; +import gregtech.api.util.GTUtility; -public class GTPP_Config implements Runnable { +public class GTPPConfig implements Runnable { public static boolean troll = false; public static Configuration sConfigFileIDs; public final Configuration mConfig; - public GTPP_Config(Configuration aConfig) { + public GTPPConfig(Configuration aConfig) { mConfig = aConfig; mConfig.load(); mConfig.save(); } public static int addIDConfig(Object aCategory, String aName, int aDefault) { - if (GT_Utility.isStringInvalid(aName)) return aDefault; + if (GTUtility.isStringInvalid(aName)) return aDefault; Property tProperty = sConfigFileIDs.get( aCategory.toString() .replaceAll("\\|", "."), aName.replaceAll("\\|", "."), aDefault); int rResult = tProperty.getInt(aDefault); - if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) sConfigFileIDs.save(); + if (!tProperty.wasRead() && GregTechAPI.sPostloadFinished) sConfigFileIDs.save(); return rResult; } public static String getStackConfigName(ItemStack aStack) { - if (GT_Utility.isStackInvalid(aStack)) return E; - Object rName = GT_OreDictUnificator.getAssociation(aStack); + if (GTUtility.isStackInvalid(aStack)) return E; + Object rName = GTOreDictUnificator.getAssociation(aStack); if (rName != null) return rName.toString(); try { - if (GT_Utility.isStringValid(rName = aStack.getUnlocalizedName())) return rName.toString(); + if (GTUtility.isStringValid(rName = aStack.getUnlocalizedName())) return rName.toString(); } catch (Throwable e) { /* Do nothing */ } @@ -57,14 +57,14 @@ public class GTPP_Config implements Runnable { } public boolean get(Object aCategory, String aName, boolean aDefault) { - if (GT_Utility.isStringInvalid(aName)) return aDefault; + if (GTUtility.isStringInvalid(aName)) return aDefault; Property tProperty = mConfig.get( aCategory.toString() .replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); boolean rResult = tProperty.getBoolean(aDefault); - if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save(); + if (!tProperty.wasRead() && GregTechAPI.sPostloadFinished) mConfig.save(); return rResult; } @@ -73,14 +73,14 @@ public class GTPP_Config implements Runnable { } public int get(Object aCategory, String aName, int aDefault) { - if (GT_Utility.isStringInvalid(aName)) return aDefault; + if (GTUtility.isStringInvalid(aName)) return aDefault; Property tProperty = mConfig.get( aCategory.toString() .replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); int rResult = tProperty.getInt(aDefault); - if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save(); + if (!tProperty.wasRead() && GregTechAPI.sPostloadFinished) mConfig.save(); return rResult; } @@ -89,14 +89,14 @@ public class GTPP_Config implements Runnable { } public double get(Object aCategory, String aName, double aDefault) { - if (GT_Utility.isStringInvalid(aName)) return aDefault; + if (GTUtility.isStringInvalid(aName)) return aDefault; Property tProperty = mConfig.get( aCategory.toString() .replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); double rResult = tProperty.getDouble(aDefault); - if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save(); + if (!tProperty.wasRead() && GregTechAPI.sPostloadFinished) mConfig.save(); return rResult; } @@ -105,14 +105,14 @@ public class GTPP_Config implements Runnable { } public String get(Object aCategory, String aName, String aDefault) { - if (GT_Utility.isStringInvalid(aName)) return aDefault; + if (GTUtility.isStringInvalid(aName)) return aDefault; Property tProperty = mConfig.get( aCategory.toString() .replaceAll("\\|", "_"), (aName + "_" + aDefault).replaceAll("\\|", "_"), aDefault); String rResult = tProperty.getString(); - if (!tProperty.wasRead() && GregTech_API.sPostloadFinished) mConfig.save(); + if (!tProperty.wasRead() && GregTechAPI.sPostloadFinished) mConfig.save(); return rResult; } diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java index df95b7de2b..da6db942aa 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/util/SpecialBehaviourTooltipHandler.java @@ -7,7 +7,7 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraftforge.event.entity.player.ItemTooltipEvent; import cpw.mods.fml.common.eventhandler.SubscribeEvent; -import gregtech.api.util.GT_Utility; +import gregtech.api.util.GTUtility; public class SpecialBehaviourTooltipHandler { @@ -22,7 +22,7 @@ public class SpecialBehaviourTooltipHandler { if (event != null) { if (event.itemStack != null) { for (ItemStack aKey : mTooltipCache.keySet()) { - if (GT_Utility.areStacksEqual(aKey, event.itemStack, false)) { + if (GTUtility.areStacksEqual(aKey, event.itemStack, false)) { String s = mTooltipCache.get(aKey); if (s != null && s.length() > 0) { event.toolTip.add(EnumChatFormatting.RED + s); |
