diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 15a459e6..7bc9a9be 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -73,6 +73,8 @@ public class GT_Mod public static int MAX_IC2 = 2147483647; public static GT_Achievements achievements; + private static final String aTextGeneral = "general"; + static { if ((509 != GregTech_API.VERSION) || (509 != GT_ModHandler.VERSION) || (509 != GT_OreDictUnificator.VERSION) || (509 != GT_Recipe.VERSION) || (509 != GT_Utility.VERSION) || (509 != GT_RecipeRegistrator.VERSION) || (509 != Element.VERSION) || (509 != Materials.VERSION) || (509 != OrePrefixes.VERSION)) { throw new GT_ItsNotMyFaultException("One of your Mods included GregTech-API Files inside it's download, mention this to the Mod Author, who does this bad thing, and tell him/her to use reflection. I have added a Version check, to prevent Authors from breaking my Mod that way."); @@ -81,15 +83,15 @@ public class GT_Mod public GT_Mod() { try { - Class.forName("ic2.core.IC2").getField("enableOreDictCircuit").set(null, Boolean.valueOf(true)); + Class.forName("ic2.core.IC2").getField("enableOreDictCircuit").set(null, Boolean.FALSE); } catch (Throwable e) { } try { - Class.forName("ic2.core.IC2").getField("enableCraftingBucket").set(null, Boolean.valueOf(false)); + Class.forName("ic2.core.IC2").getField("enableCraftingBucket").set(null, Boolean.FALSE); } catch (Throwable e) { } try { - Class.forName("ic2.core.IC2").getField("enableEnergyInStorageBlockItems").set(null, Boolean.valueOf(false)); + Class.forName("ic2.core.IC2").getField("enableEnergyInStorageBlockItems").set(null, Boolean.FALSE); } catch (Throwable e) { } GT_Values.GT = this; @@ -208,35 +210,35 @@ public class GT_Mod for (Dyes tDye : Dyes.values()) { if ((tDye != Dyes._NULL) && (tDye.mIndex < 0)) { String SBdye1 = new StringBuilder(18).append(SBdye0).append(tDye).toString(); - tDye.mRGBa[0] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get("ColorModulation." + tDye, "R", tDye.mRGBa[0])))); - tDye.mRGBa[1] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get("ColorModulation." + tDye, "G", tDye.mRGBa[1])))); - tDye.mRGBa[2] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get("ColorModulation." + tDye, "B", tDye.mRGBa[2])))); + tDye.mRGBa[0] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get(SBdye1, "R", tDye.mRGBa[0])))); + tDye.mRGBa[1] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get(SBdye1, "G", tDye.mRGBa[1])))); + tDye.mRGBa[2] = ((short) Math.min(255, Math.max(0, GregTech_API.sClientDataFile.get(SBdye1, "B", tDye.mRGBa[2])))); } } - gregtechproxy.mMaxEqualEntitiesAtOneSpot = tMainConfig.get("general", "MaxEqualEntitiesAtOneSpot", 3).getInt(3); - gregtechproxy.mSkeletonsShootGTArrows = tMainConfig.get("general", "SkeletonsShootGTArrows", 16).getInt(16); - gregtechproxy.mFlintChance = tMainConfig.get("general", "FlintAndSteelChance", 30).getInt(30); - gregtechproxy.mItemDespawnTime = tMainConfig.get("general", "ItemDespawnTime", 6000).getInt(6000); - gregtechproxy.mDisableVanillaOres = tMainConfig.get("general", "DisableVanillaOres", true).getBoolean(true); - gregtechproxy.mNerfDustCrafting = tMainConfig.get("general", "NerfDustCrafting", true).getBoolean(true); - gregtechproxy.mIncreaseDungeonLoot = tMainConfig.get("general", "IncreaseDungeonLoot", true).getBoolean(true); - gregtechproxy.mAxeWhenAdventure = tMainConfig.get("general", "AdventureModeStartingAxe", true).getBoolean(true); - gregtechproxy.mHardcoreCables = tMainConfig.get("general", "HardCoreCableLoss", false).getBoolean(false); - gregtechproxy.mSurvivalIntoAdventure = tMainConfig.get("general", "forceAdventureMode", false).getBoolean(false); - gregtechproxy.mHungerEffect = tMainConfig.get("general", "AFK_Hunger", false).getBoolean(false); - gregtechproxy.mHardRock = tMainConfig.get("general", "harderstone", false).getBoolean(false); - gregtechproxy.mInventoryUnification = tMainConfig.get("general", "InventoryUnification", true).getBoolean(true); - gregtechproxy.mGTBees = tMainConfig.get("general", "GTBees", true).getBoolean(true); - gregtechproxy.mCraftingUnification = tMainConfig.get("general", "CraftingUnification", true).getBoolean(true); - gregtechproxy.mNerfedWoodPlank = tMainConfig.get("general", "WoodNeedsSawForCrafting", true).getBoolean(true); - gregtechproxy.mNerfedVanillaTools = tMainConfig.get("general", "smallerVanillaToolDurability", true).getBoolean(true); - gregtechproxy.mSortToTheEnd = tMainConfig.get("general", "EnsureToBeLoadedLast", true).getBoolean(true); - gregtechproxy.mDisableIC2Cables = tMainConfig.get("general", "DisableIC2Cables", true).getBoolean(true); - gregtechproxy.mAchievements = tMainConfig.get("general", "EnableAchievements", true).getBoolean(true); + gregtechproxy.mMaxEqualEntitiesAtOneSpot = tMainConfig.get(aTextGeneral, "MaxEqualEntitiesAtOneSpot", 3).getInt(3); + gregtechproxy.mSkeletonsShootGTArrows = tMainConfig.get(aTextGeneral, "SkeletonsShootGTArrows", 16).getInt(16); + gregtechproxy.mFlintChance = tMainConfig.get(aTextGeneral, "FlintAndSteelChance", 30).getInt(30); + gregtechproxy.mItemDespawnTime = tMainConfig.get(aTextGeneral, "ItemDespawnTime", 6000).getInt(6000); + gregtechproxy.mDisableVanillaOres = tMainConfig.get(aTextGeneral, "DisableVanillaOres", true).getBoolean(true); + gregtechproxy.mNerfDustCrafting = tMainConfig.get(aTextGeneral, "NerfDustCrafting", true).getBoolean(true); + gregtechproxy.mIncreaseDungeonLoot = tMainConfig.get(aTextGeneral, "IncreaseDungeonLoot", true).getBoolean(true); + gregtechproxy.mAxeWhenAdventure = tMainConfig.get(aTextGeneral, "AdventureModeStartingAxe", true).getBoolean(true); + gregtechproxy.mHardcoreCables = tMainConfig.get(aTextGeneral, "HardCoreCableLoss", false).getBoolean(false); + gregtechproxy.mSurvivalIntoAdventure = tMainConfig.get(aTextGeneral, "forceAdventureMode", false).getBoolean(false); + gregtechproxy.mHungerEffect = tMainConfig.get(aTextGeneral, "AFK_Hunger", false).getBoolean(false); + gregtechproxy.mHardRock = tMainConfig.get(aTextGeneral, "harderstone", false).getBoolean(false); + gregtechproxy.mInventoryUnification = tMainConfig.get(aTextGeneral, "InventoryUnification", true).getBoolean(true); + gregtechproxy.mGTBees = tMainConfig.get(aTextGeneral, "GTBees", true).getBoolean(true); + gregtechproxy.mCraftingUnification = tMainConfig.get(aTextGeneral, "CraftingUnification", true).getBoolean(true); + gregtechproxy.mNerfedWoodPlank = tMainConfig.get(aTextGeneral, "WoodNeedsSawForCrafting", true).getBoolean(true); + gregtechproxy.mNerfedVanillaTools = tMainConfig.get(aTextGeneral, "smallerVanillaToolDurability", true).getBoolean(true); + gregtechproxy.mSortToTheEnd = tMainConfig.get(aTextGeneral, "EnsureToBeLoadedLast", true).getBoolean(true); + gregtechproxy.mDisableIC2Cables = tMainConfig.get(aTextGeneral, "DisableIC2Cables", true).getBoolean(true); + gregtechproxy.mAchievements = tMainConfig.get(aTextGeneral, "EnableAchievements", true).getBoolean(true); gregtechproxy.mAE2Integration = GregTech_API.sSpecialFile.get(ConfigCategories.general, "EnableAE2Integration", Loader.isModLoaded("appliedenergistics2")); - gregtechproxy.mNerfedCombs = tMainConfig.get("general", "NerfCombs", true).getBoolean(true); - gregtechproxy.mHideUnusedOres = tMainConfig.get("general", "HideUnusedOres", true).getBoolean(true); - gregtechproxy.mHideRecyclingRecipes = tMainConfig.get("general", "HideRecyclingRecipes", true).getBoolean(true); + gregtechproxy.mNerfedCombs = tMainConfig.get(aTextGeneral, "NerfCombs", true).getBoolean(true); + gregtechproxy.mHideUnusedOres = tMainConfig.get(aTextGeneral, "HideUnusedOres", true).getBoolean(true); + gregtechproxy.mHideRecyclingRecipes = tMainConfig.get(aTextGeneral, "HideRecyclingRecipes", true).getBoolean(true); GregTech_API.mOutputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "OutputRF", true); GregTech_API.mInputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "InputRF", false); @@ -255,10 +257,10 @@ public class GT_Mod } }} - if (tMainConfig.get("general", "hardermobspawners", true).getBoolean(true)) { + if (tMainConfig.get(aTextGeneral, "hardermobspawners", true).getBoolean(true)) { Blocks.mob_spawner.setHardness(500.0F).setResistance(6000000.0F); } - gregtechproxy.mOnline = tMainConfig.get("general", "online", true).getBoolean(false); + gregtechproxy.mOnline = tMainConfig.get(aTextGeneral, "online", true).getBoolean(false); gregtechproxy.mUpgradeCount = Math.min(64, Math.max(1, tMainConfig.get("features", "UpgradeStacksize", 4).getInt())); for (OrePrefixes tPrefix : OrePrefixes.values()) { @@ -689,7 +691,7 @@ public class GT_Mod } achievements = new GT_Achievements(); - Map.Entry tRecipe; + //Map.Entry tRecipe; Unused? GT_Log.out.println("GT_Mod: Loading finished, deallocating temporary Init Variables."); GregTech_API.sBeforeGTPreload = null; GregTech_API.sAfterGTPreload = null; diff --git a/src/main/java/gregtech/api/objects/ElementStack.java b/src/main/java/gregtech/api/objects/ElementStack.java index e406461d..773700f0 100644 --- a/src/main/java/gregtech/api/objects/ElementStack.java +++ b/src/main/java/gregtech/api/objects/ElementStack.java @@ -17,8 +17,7 @@ public class ElementStack implements Cloneable { @Override public ElementStack clone() { - try { Object cloneES = super.clone(); - return (ElementStack) cloneES; } catch (Exception e) { return new ElementStack(mElement, mAmount); } + try { return (ElementStack) super.clone(); } catch (Exception e) { return new ElementStack(mElement, mAmount); } } @Override diff --git a/src/main/java/gregtech/api/objects/MaterialStack.java b/src/main/java/gregtech/api/objects/MaterialStack.java index b0adba8d..6066d3cf 100644 --- a/src/main/java/gregtech/api/objects/MaterialStack.java +++ b/src/main/java/gregtech/api/objects/MaterialStack.java @@ -17,8 +17,7 @@ public class MaterialStack implements Cloneable { @Override public MaterialStack clone() { - try { Object cloneMS = super.clone(); - return (MaterialStack) cloneMS;} catch (Exception e) { return new MaterialStack(mMaterial, mAmount); } + try { return (MaterialStack) super.clone(); } catch (Exception e) { return new MaterialStack(mMaterial, mAmount); } } @Override diff --git a/src/main/java/gregtech/api/util/GT_LanguageManager.java b/src/main/java/gregtech/api/util/GT_LanguageManager.java index a60189ea..9937d0c0 100644 --- a/src/main/java/gregtech/api/util/GT_LanguageManager.java +++ b/src/main/java/gregtech/api/util/GT_LanguageManager.java @@ -75,9 +75,11 @@ public class GT_LanguageManager { public static String getTranslation(String aKey, String aSeperator) { if (aKey == null) return E; String rTranslation = E; + StringBuilder rTranslationSB = new StringBuilder(rTranslation); for (String tString : aKey.split(aSeperator)) { - rTranslation += getTranslation(tString); + rTranslationSB.append(getTranslation(tString)); } + rTranslation = String.valueOf(rTranslationSB); return rTranslation; } diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 833922cd..32c02afa 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -20,7 +20,6 @@ import gregtech.api.objects.GT_ItemStack; import gregtech.api.objects.ItemData; import gregtech.api.threads.GT_Runnable_Sound; import gregtech.common.GT_Proxy; -import ic2.api.recipe.ICannerBottleRecipeManager; import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputItemStack; import ic2.api.recipe.RecipeInputOreDict; @@ -1095,7 +1094,6 @@ public class GT_Utility { * Converts a Number to a String */ public static String parseNumberToString(int aNumber) { - String tString = E; boolean temp = true, negative = false; if (aNumber < 0) { @@ -1103,15 +1101,18 @@ public class GT_Utility { negative = true; } + StringBuilder tStringB = new StringBuilder(); for (int i = 1000000000; i > 0; i /= 10) { int tDigit = (aNumber / i) % 10; if (temp && tDigit != 0) temp = false; if (!temp) { - tString += tDigit; - if (i != 1) for (int j = i; j > 0; j /= 1000) if (j == 1) tString += ","; + tStringB.append(tDigit); + if (i != 1) for (int j = i; j > 0; j /= 1000) if (j == 1) tStringB.append(","); } } + String tString = tStringB.toString(); + if (tString.equals(E)) tString = "0"; return negative ? "-" + tString : tString; @@ -1722,10 +1723,11 @@ public class GT_Utility { + " Humidity: " + ((ic2.api.crops.ICropTile) tTileEntity).getHumidity() + " Air-Quality: " + ((ic2.api.crops.ICropTile) tTileEntity).getAirQuality() ); - String tString = E; + StringBuilder tStringB = new StringBuilder(); for (String tAttribute : ic2.api.crops.Crops.instance.getCropList()[((ic2.api.crops.ICropTile) tTileEntity).getID()].attributes()) { - tString += ", " + tAttribute; + tStringB.append(", ").append(tAttribute); } + String tString = tStringB.toString(); tList.add("Attributes:" + tString.replaceFirst(",", E)); tList.add("Discovered by: " + ic2.api.crops.Crops.instance.getCropList()[((ic2.api.crops.ICropTile) tTileEntity).getID()].discoveredBy()); } diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java index f7c4fff7..93371c2f 100644 --- a/src/main/java/gregtech/common/GT_Proxy.java +++ b/src/main/java/gregtech/common/GT_Proxy.java @@ -1752,40 +1752,40 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler { && (tOre.mMaterial != null)) { if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("enderio") && tOre.mPrefix == OrePrefixes.ingot && tOre.mMaterial == Materials.DarkSteel) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); + GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); } else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("thermalfoundation") && tOre.mPrefix == OrePrefixes.dust && tOre.mMaterial == Materials.Blizz) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); + GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); } else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("thermalfoundation") && tOre.mPrefix == OrePrefixes.dust && tOre.mMaterial == Materials.Pyrotheum) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); + GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); } else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("arsmagica2") && tOre.mPrefix == OrePrefixes.dust && tOre.mMaterial == Materials.Vinteum) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); + GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); } else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("arsmagica2") && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.BlueTopaz) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); + GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); } else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("arsmagica2") && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.Chimerite) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); + GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); } else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("arsmagica2") && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.Moonstone) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); + GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); } else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("arsmagica2") && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.Sunstone) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); + GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); } else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("rotarycraft") && tOre.mPrefix == OrePrefixes.ingot && tOre.mMaterial == Materials.HSLA) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); + GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); } else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("appliedenergistics2") && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.CertusQuartz) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); + GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); } else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("appliedenergistics2") && tOre.mPrefix == OrePrefixes.dust && tOre.mMaterial == Materials.CertusQuartz) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); + GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); } else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals(GT_Values.MOD_ID_TC) && tOre.mPrefix == OrePrefixes.block && tOre.mMaterial == Materials.Thaumium) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false); - GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); + GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true); } else if (GT_OreDictUnificator.isBlacklisted(tOre.mEvent.Ore)) { GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, true); } else { diff --git a/src/main/java/gregtech/common/items/armor/ArmorCalculation.java b/src/main/java/gregtech/common/items/armor/ArmorCalculation.java index 8915ce6f..440d6aae 100644 --- a/src/main/java/gregtech/common/items/armor/ArmorCalculation.java +++ b/src/main/java/gregtech/common/items/armor/ArmorCalculation.java @@ -1,8 +1,5 @@ package gregtech.common.items.armor; -import java.util.List; - -import thaumcraft.api.nodes.IRevealer; import cpw.mods.fml.common.Loader; import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; @@ -12,8 +9,8 @@ import gregtech.api.util.GT_ModHandler; import gregtech.api.util.GT_OreDictUnificator; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; -import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidStack; +import thaumcraft.api.nodes.IRevealer; public class ArmorCalculation { public static float[] calculateArmor(ItemStack[] parts) { diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java index 6aabea82..260d5f10 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java @@ -154,6 +154,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch { && (!consumeFluid(((ChunkPosition) this.mPumpList.get(this.mPumpList.size() - 1)).chunkPosX, ((ChunkPosition) this.mPumpList.get(this.mPumpList.size() - 1)).chunkPosY, ((ChunkPosition) this.mPumpList.remove(this.mPumpList.size() - 1)).chunkPosZ))) { + //Should this be empty? } this.mPumpTimer = 160 / ((int) Math.pow(2, this.mTier)); } diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java index a4ccb9b6..a6028b54 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java @@ -32,7 +32,6 @@ import java.util.ArrayList; public class GT_MetaTileEntity_AdvMiner2 extends GT_MetaTileEntity_MultiBlockBase { private final ArrayList mMineList = new ArrayList(); - private boolean completedCycle = false; public GT_MetaTileEntity_AdvMiner2(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); diff --git a/src/main/java/gregtech/loaders/misc/GT_Achievements.java b/src/main/java/gregtech/loaders/misc/GT_Achievements.java index c0274327..f13a460d 100644 --- a/src/main/java/gregtech/loaders/misc/GT_Achievements.java +++ b/src/main/java/gregtech/loaders/misc/GT_Achievements.java @@ -1,9 +1,5 @@ package gregtech.loaders.misc; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.eventhandler.SubscribeEvent; @@ -33,6 +29,10 @@ import net.minecraftforge.event.entity.player.EntityItemPickupEvent; import net.minecraftforge.fluids.FluidStack; import thaumcraft.api.ThaumcraftApiHelper; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + public class GT_Achievements { public static List oreList = new ArrayList(); @@ -190,10 +190,8 @@ public class GT_Achievements { if(Loader.isModLoaded("NotEnoughItems") && GT_Mod.gregtechproxy.mHideUnusedOres){ for (int i = 1; i < GregTech_API.sGeneratedMaterials.length; i++) { - if (GregTech_API.sGeneratedMaterials[i] != null) { - if(!oreList.contains(GregTech_API.sGeneratedMaterials[i])){ - codechicken.nei.api.API.hideItem(GT_OreDictUnificator.get(OrePrefixes.ore, GregTech_API.sGeneratedMaterials[i], 1)); - } + if ((GregTech_API.sGeneratedMaterials[i] != null) && (!oreList.contains(GregTech_API.sGeneratedMaterials[i]))) { + codechicken.nei.api.API.hideItem(GT_OreDictUnificator.get(OrePrefixes.ore, GregTech_API.sGeneratedMaterials[i], 1)); } } } @@ -284,29 +282,27 @@ public class GT_Achievements { } ItemData data = GT_OreDictUnificator.getItemData(stack); - if (data != null) { - if (data.mPrefix == OrePrefixes.ingot) { - if (data.mMaterial.mMaterial == Materials.Aluminium) { - issueAchievement(player, "gtaluminium"); - } else if (data.mMaterial.mMaterial == Materials.Titanium) { - issueAchievement(player, "titan"); - } else if (data.mMaterial.mMaterial == Materials.BlueSteel) { - issueAchievement(player, "complexalloys"); - } else if (data.mMaterial.mMaterial == Materials.Tungsten) { - issueAchievement(player, "tungsten"); - } else if (data.mMaterial.mMaterial == Materials.Osmium) { - issueAchievement(player, "osmium"); - } else if (data.mMaterial.mMaterial == Materials.TungstenSteel) { - issueAchievement(player, "tungstensteel"); - } else if (data.mMaterial.mMaterial == Materials.HSSG) { - issueAchievement(player, "hssg"); - } else if (data.mMaterial.mMaterial == Materials.Naquadah) { - issueAchievement(player, "stargatematerial"); - } else if (data.mMaterial.mMaterial == Materials.NaquadahAlloy) { - issueAchievement(player, "alienmetallurgy"); - } else if (data.mMaterial.mMaterial == Materials.Naquadria) { - issueAchievement(player, "finalpreparations"); - } + if ((data != null) && (data.mPrefix == OrePrefixes.ingot)) { + if (data.mMaterial.mMaterial == Materials.Aluminium) { + issueAchievement(player, "gtaluminium"); + } else if (data.mMaterial.mMaterial == Materials.Titanium) { + issueAchievement(player, "titan"); + } else if (data.mMaterial.mMaterial == Materials.BlueSteel) { + issueAchievement(player, "complexalloys"); + } else if (data.mMaterial.mMaterial == Materials.Tungsten) { + issueAchievement(player, "tungsten"); + } else if (data.mMaterial.mMaterial == Materials.Osmium) { + issueAchievement(player, "osmium"); + } else if (data.mMaterial.mMaterial == Materials.TungstenSteel) { + issueAchievement(player, "tungstensteel"); + } else if (data.mMaterial.mMaterial == Materials.HSSG) { + issueAchievement(player, "hssg"); + } else if (data.mMaterial.mMaterial == Materials.Naquadah) { + issueAchievement(player, "stargatematerial"); + } else if (data.mMaterial.mMaterial == Materials.NaquadahAlloy) { + issueAchievement(player, "alienmetallurgy"); + } else if (data.mMaterial.mMaterial == Materials.Naquadria) { + issueAchievement(player, "finalpreparations"); } } if (stack.getUnlocalizedName().equals("ic2.itemPartIndustrialDiamond")) { @@ -516,10 +512,8 @@ public class GT_Achievements { } else if (data.mMaterial.mMaterial == Materials.Steel) { if (data.mPrefix == OrePrefixes.ingot && stack.stackSize == stack.getMaxStackSize()) { issueAchievement(player, "steel"); - } else if (data.mPrefix == OrePrefixes.nugget && Loader.isModLoaded("Thaumcraft")) { - if (ThaumcraftApiHelper.isResearchComplete(player.getDisplayName(), "GT_IRON_TO_STEEL")) { - issueAchievement(player, "steel"); - } + } else if ((data.mPrefix == OrePrefixes.nugget) && Loader.isModLoaded("Thaumcraft") && ThaumcraftApiHelper.isResearchComplete(player.getDisplayName(), "GT_IRON_TO_STEEL")) { + issueAchievement(player, "steel"); } } else if (data.mPrefix == OrePrefixes.circuit && data.mMaterial.mMaterial == Materials.Advanced) { issueAchievement(player, "stepforward"); diff --git a/src/main/java/gregtech/loaders/misc/OreProcessingConfiguration.java b/src/main/java/gregtech/loaders/misc/OreProcessingConfiguration.java index cafde848..1c1d4f44 100644 --- a/src/main/java/gregtech/loaders/misc/OreProcessingConfiguration.java +++ b/src/main/java/gregtech/loaders/misc/OreProcessingConfiguration.java @@ -1,13 +1,14 @@ package gregtech.loaders.misc; -import java.io.File; -import java.util.HashMap; - import gregtech.api.GregTech_API; import gregtech.api.enums.Materials; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Property; +import java.io.File; +import java.util.HashMap; +import java.util.Map; + public class OreProcessingConfiguration implements Runnable { @@ -40,17 +41,12 @@ public class OreProcessingConfiguration } } @Override - public void run() - { - for (String tMaterialName : this.mEnabledMaterials.keySet()) - { - if (this.mEnabledMaterials.get(tMaterialName)) - { - Materials.valueOf(tMaterialName).mTypes |= 8; - } - else if ((Materials.valueOf(tMaterialName).mTypes & 8) != 0) - { - Materials.valueOf(tMaterialName).mTypes ^= 8; + public void run() { + for (Map.Entry aEntry : this.mEnabledMaterials.entrySet()) { + if (this.mEnabledMaterials.get(aEntry.getKey())) { + Materials.valueOf(aEntry.getKey()).mTypes |= 8; + } else if ((Materials.valueOf(aEntry.getKey()).mTypes & 8) != 0) { + Materials.valueOf(aEntry.getKey()).mTypes ^= 8; } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBattery.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBattery.java index 56b8b2af..cf29bfc9 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBattery.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBattery.java @@ -1,11 +1,7 @@ package gregtech.loaders.oreprocessing; -import gregtech.api.enums.GT_Values; -import gregtech.api.enums.ItemList; import gregtech.api.enums.Materials; import gregtech.api.enums.OrePrefixes; -import gregtech.api.util.GT_ModHandler; -import gregtech.api.util.GT_Utility; import net.minecraft.item.ItemStack; public class ProcessingBattery implements gregtech.api.interfaces.IOreRecipeRegistrator { @@ -14,8 +10,8 @@ public class ProcessingBattery implements gregtech.api.interfaces.IOreRecipeRegi } public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - if (aMaterial == Materials.Lithium) { + /*if (aMaterial == Materials.Lithium) { // GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.getIC2Item("cropnalyzer", 1L, 32767), ItemList.Tool_Scanner.getAlmostBroken(1L, new Object[0]), 12800, 16); - } + }*/ } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java index df158b8d..e9fed851 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java @@ -61,12 +61,10 @@ public class ProcessingCell tList.add(GT_Utility.copyAmount(64L, new Object[]{tStack})); tStack.stackSize -= 64; } - if (tStack.stackSize > 0) { - if (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}) <= 64L) { - if (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}) < 0L ? tList.size() < 5 : tList.size() < 6) { - tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}); - tList.add(tStack); - } + if ((tStack.stackSize > 0) && tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}) <= 64L) { + if (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}) < 0L ? tList.size() < 5 : tList.size() < 6) { + tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}); + tList.add(tStack); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java index ee9665d8..abf581d8 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java @@ -76,11 +76,9 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr tList.add(GT_Utility.copyAmount(64L, new Object[]{tStack})); tStack.stackSize -= 64; } - if ((tStack.stackSize > 0) && (tList.size() < 6)) { - if (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}) <= 64L) { - tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}); - tList.add(tStack); - } + if ((tStack.stackSize > 0) && (tList.size() < 6) && (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}) <= 64L)) { + tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}); + tList.add(tStack); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java index 80ee117e..e681552c 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java @@ -16,37 +16,30 @@ public class ProcessingItem implements gregtech.api.interfaces.IOreRecipeRegistr } public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) { - if (GT_OreDictUnificator.getItemData(aStack) == null) { - - if (!aOreDictName.equals("itemCertusQuartz")) { - - if (!aOreDictName.equals("itemNetherQuartz")) { - - if (aOreDictName.equals("itemSilicon")) { - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Silicon, 3628800L, new MaterialStack[0])); - GT_Values.RA.addFormingPressRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 0L, 19), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 20), 200, 16); - } else if (aOreDictName.equals("itemWheat")) { - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Wheat, 3628800L, new MaterialStack[0])); - } else if (aOreDictName.equals("itemManganese")) { - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Manganese, 3628800L, new MaterialStack[0])); - } else if (aOreDictName.equals("itemSalt")) { - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Salt, 3628800L, new MaterialStack[0])); - } else if (aOreDictName.equals("itemMagnesium")) { - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Magnesium, 3628800L, new MaterialStack[0])); - } else if ((aOreDictName.equals("itemPhosphorite")) || (aOreDictName.equals("itemPhosphorus"))) { - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Phosphorus, 3628800L, new MaterialStack[0])); - } else if (aOreDictName.equals("itemSulfur")) { - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Sulfur, 3628800L, new MaterialStack[0])); - } else if ((aOreDictName.equals("itemAluminum")) || (aOreDictName.equals("itemAluminium"))) { - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Aluminium, 3628800L, new MaterialStack[0])); - } else if (aOreDictName.equals("itemSaltpeter")) { - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Saltpeter, 3628800L, new MaterialStack[0])); - } else if (aOreDictName.equals("itemUranium")) { - GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Uranium, 3628800L, new MaterialStack[0])); - } else { - //System.out.println("Item Name: " + aOreDictName + " !!!Unknown Item detected!!! Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, it's just an Information."); - } - } + if ((GT_OreDictUnificator.getItemData(aStack) == null) && !aOreDictName.equals("itemCertusQuartz") && !aOreDictName.equals("itemNetherQuartz")) { + if (aOreDictName.equals("itemSilicon")) { + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Silicon, 3628800L, new MaterialStack[0])); + GT_Values.RA.addFormingPressRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 0L, 19), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 20), 200, 16); + } else if (aOreDictName.equals("itemWheat")) { + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Wheat, 3628800L, new MaterialStack[0])); + } else if (aOreDictName.equals("itemManganese")) { + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Manganese, 3628800L, new MaterialStack[0])); + } else if (aOreDictName.equals("itemSalt")) { + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Salt, 3628800L, new MaterialStack[0])); + } else if (aOreDictName.equals("itemMagnesium")) { + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Magnesium, 3628800L, new MaterialStack[0])); + } else if ((aOreDictName.equals("itemPhosphorite")) || (aOreDictName.equals("itemPhosphorus"))) { + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Phosphorus, 3628800L, new MaterialStack[0])); + } else if (aOreDictName.equals("itemSulfur")) { + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Sulfur, 3628800L, new MaterialStack[0])); + } else if ((aOreDictName.equals("itemAluminum")) || (aOreDictName.equals("itemAluminium"))) { + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Aluminium, 3628800L, new MaterialStack[0])); + } else if (aOreDictName.equals("itemSaltpeter")) { + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Saltpeter, 3628800L, new MaterialStack[0])); + } else if (aOreDictName.equals("itemUranium")) { + GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Uranium, 3628800L, new MaterialStack[0])); + } else { + //System.out.println("Item Name: " + aOreDictName + " !!!Unknown Item detected!!! Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, it's just an Information."); } } } diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java index ffc35582..3e7932b4 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java @@ -32,7 +32,6 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra GT_ModHandler.addValuableOre(GT_Utility.getBlockFromStack(aOreStack), aOreStack.getItemDamage(), aMaterial.mOreValue); Materials tMaterial = aMaterial.mOreReplacement; Materials tPrimaryByMaterial = null; - Materials tSecondaryByMaterial = null; aMultiplier = Math.max(1, aMultiplier); aOreStack = GT_Utility.copyAmount(1L, new Object[]{aOreStack}); aOreStack.stackSize = 1; @@ -42,7 +41,6 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra ItemStack tGem = GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial, 1L); ItemStack tSmeltInto = tIngot == null ? null : aMaterial.contains(SubTag.SMELTING_TO_GEM) ? GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial.mDirectSmelting, GT_OreDictUnificator.get(OrePrefixes.crystal, tMaterial.mDirectSmelting, GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial, GT_OreDictUnificator.get(OrePrefixes.crystal, tMaterial, 1L), 1L), 1L), 1L) : tIngot; - ItemStack tSmall = GT_OreDictUnificator.get(OrePrefixes.dustSmall, tMaterial, 1L); ItemStack tDust = GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial, tGem, 1L); ItemStack tCleaned = GT_OreDictUnificator.get(OrePrefixes.crushedPurified, tMaterial, tDust, 1L); ItemStack tCrushed = GT_OreDictUnificator.get(OrePrefixes.crushed, tMaterial, aMaterial.mOreMultiplier * aMultiplier); diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java index 0ab6d19e..c855691d 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java @@ -42,10 +42,8 @@ public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegist GT_ModHandler.removeRecipe(new ItemStack[]{tStack, tStack, tStack}); GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(tOutput.stackSize / 3, new Object[]{tOutput}), new Object[]{"sP", Character.valueOf('P'), tStack}); } - if(tStack==null){ - if(i>=16){ - break; - } + if((tStack == null) && (i >= 16)){ + break; } } } else {