Bugfixes 10

This commit is contained in:
Muramasa 2016-08-15 21:56:56 +01:00
parent 0307f682b5
commit ccc7a18739
17 changed files with 135 additions and 163 deletions

View file

@ -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<IRecipeInput, RecipeOutput> tRecipe;
//Map.Entry<IRecipeInput, RecipeOutput> tRecipe; Unused?
GT_Log.out.println("GT_Mod: Loading finished, deallocating temporary Init Variables.");
GregTech_API.sBeforeGTPreload = null;
GregTech_API.sAfterGTPreload = null;

View file

@ -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

View file

@ -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

View file

@ -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;
}

View file

@ -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());
}

View file

@ -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 {

View file

@ -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) {

View file

@ -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));
}

View file

@ -32,7 +32,6 @@ import java.util.ArrayList;
public class GT_MetaTileEntity_AdvMiner2 extends GT_MetaTileEntity_MultiBlockBase {
private final ArrayList<ChunkPosition> mMineList = new ArrayList();
private boolean completedCycle = false;
public GT_MetaTileEntity_AdvMiner2(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);

View file

@ -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<Materials> oreList = new ArrayList<Materials>();
@ -190,13 +190,11 @@ 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])){
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));
}
}
}
}
if (GT_Mod.gregtechproxy.mAchievements) {
AchievementPage.registerAchievementPage(new AchievementPage("GregTech 5", (Achievement[]) this.achievementList.values().toArray(
new Achievement[this.achievementList.size()])));
@ -284,8 +282,7 @@ public class GT_Achievements {
}
ItemData data = GT_OreDictUnificator.getItemData(stack);
if (data != null) {
if (data.mPrefix == OrePrefixes.ingot) {
if ((data != null) && (data.mPrefix == OrePrefixes.ingot)) {
if (data.mMaterial.mMaterial == Materials.Aluminium) {
issueAchievement(player, "gtaluminium");
} else if (data.mMaterial.mMaterial == Materials.Titanium) {
@ -308,7 +305,6 @@ public class GT_Achievements {
issueAchievement(player, "finalpreparations");
}
}
}
if (stack.getUnlocalizedName().equals("ic2.itemPartIndustrialDiamond")) {
issueAchievement(player, "artificaldia");
issueAchievement(player, "buildCoalDiamond");
@ -516,11 +512,9 @@ 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")) {
} 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");
}

View file

@ -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<String, Boolean> 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;
}
}
}

View file

@ -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);
}
}*/
}
}

View file

@ -61,8 +61,7 @@ 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 ((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);
@ -72,7 +71,6 @@ public class ProcessingCell
}
}
}
}
tItemAmount = (tItemAmount * tDensityMultiplier % aMaterial.getDensity() > 0L ? 1 : 0) + tItemAmount * tDensityMultiplier / aMaterial.getDensity();
if (tList.size() > 0) {
if ((aMaterial.mExtraData & 0x1) != 0) {

View file

@ -76,15 +76,13 @@ 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) {
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);
}
}
}
}
}
tItemAmount = (tItemAmount * tDensityMultiplier % aMaterial.getDensity() > 0L ? 1 : 0) + tItemAmount * tDensityMultiplier / aMaterial.getDensity();
if (tList.size() > 0) {
FluidStack tFluid = null;

View file

@ -16,12 +16,7 @@ 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 ((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);
@ -48,6 +43,4 @@ public class ProcessingItem implements gregtech.api.interfaces.IOreRecipeRegistr
}
}
}
}
}
}

View file

@ -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);

View file

@ -42,12 +42,10 @@ 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){
if((tStack == null) && (i >= 16)){
break;
}
}
}
} else {
ItemStack tOutput = GT_ModHandler.getRecipeOutput(new ItemStack[]{aStack, aStack, aStack});
if ((tOutput != null) && (tOutput.stackSize >= 3)) {