diff options
author | Muramasa <haydenkilloh@gmail.com> | 2016-09-24 23:05:18 +0100 |
---|---|---|
committer | Muramasa <haydenkilloh@gmail.com> | 2016-09-24 23:05:18 +0100 |
commit | fed8109b17fd2b41de17ceef92f37e39dc1ffc53 (patch) | |
tree | 9806dc7273bfc03fbb7a6eff1f6d0f98ce3a5bc3 /src/main/java/gregtech/GT_Mod.java | |
parent | 291839871e1233ba0c72e48cf16847246a1ccc7c (diff) | |
parent | 380211de8a2aaeaa6b24bbde34625bba4e626d79 (diff) | |
download | GT5-Unofficial-fed8109b17fd2b41de17ceef92f37e39dc1ffc53.tar.gz GT5-Unofficial-fed8109b17fd2b41de17ceef92f37e39dc1ffc53.tar.bz2 GT5-Unofficial-fed8109b17fd2b41de17ceef92f37e39dc1ffc53.zip |
Update with exp changes
Diffstat (limited to 'src/main/java/gregtech/GT_Mod.java')
-rw-r--r-- | src/main/java/gregtech/GT_Mod.java | 290 |
1 files changed, 140 insertions, 150 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java index 885913509e..46b8b1cda0 100644 --- a/src/main/java/gregtech/GT_Mod.java +++ b/src/main/java/gregtech/GT_Mod.java @@ -13,6 +13,7 @@ import gregtech.api.enums.*; import gregtech.api.interfaces.internal.IGT_Mod;
import gregtech.api.objects.ItemData;
import gregtech.api.objects.MaterialStack;
+import gregtech.api.objects.XSTR;
import gregtech.api.util.*;
import gregtech.common.GT_DummyWorld;
import gregtech.common.GT_Network;
@@ -55,14 +56,8 @@ import java.io.PrintStream; import java.util.*;
import java.util.Map.Entry;
-//import forestry.factory.recipes.ISqueezerRecipe;
-//import forestry.factory.tiles.TileCentrifuge;
-//import forestry.factory.tiles.TileSqueezer;
-
-
@Mod(modid = "gregtech", name = "GregTech", version = "MC1710", useMetadata = false, dependencies = "required-after:IC2; after:Forestry; after:PFAAGeologica; after:Thaumcraft; after:Railcraft; after:appliedenergistics2; after:ThermalExpansion; after:TwilightForest; after:harvestcraft; after:magicalcrops; after:BuildCraft|Transport; after:BuildCraft|Silicon; after:BuildCraft|Factory; after:BuildCraft|Energy; after:BuildCraft|Core; after:BuildCraft|Builders; after:GalacticraftCore; after:GalacticraftMars; after:GalacticraftPlanets; after:ThermalExpansion|Transport; after:ThermalExpansion|Energy; after:ThermalExpansion|Factory; after:RedPowerCore; after:RedPowerBase; after:RedPowerMachine; after:RedPowerCompat; after:RedPowerWiring; after:RedPowerLogic; after:RedPowerLighting; after:RedPowerWorld; after:RedPowerControl; after:UndergroundBiomes;")
-public class GT_Mod
- implements IGT_Mod {
+public class GT_Mod implements IGT_Mod {
public static final int VERSION = 509;
public static final int REQUIRED_IC2 = 624;
@Mod.Instance("gregtech")
@@ -71,6 +66,8 @@ public class GT_Mod public static GT_Proxy gregtechproxy;
public static int MAX_IC2 = 2147483647;
public static GT_Achievements achievements;
+ private final String aTextGeneral = "general";
+ private final String aTextIC2 = "ic2_";
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)) {
@@ -80,15 +77,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;
@@ -102,16 +99,15 @@ public class GT_Mod @Mod.EventHandler
public void onPreLoad(FMLPreInitializationEvent aEvent) {
+ Locale.setDefault(Locale.ENGLISH);
if (GregTech_API.sPreloadStarted) {
return;
}
- for (Runnable tRunnable : GregTech_API.sBeforeGTPreload) {
- try {
+ try {
+ for (Runnable tRunnable : GregTech_API.sBeforeGTPreload) {
tRunnable.run();
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
}
- }
+ } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
File tFile = new File(new File(aEvent.getModConfigurationDirectory(), "GregTech"), "GregTech.cfg");
Configuration tMainConfig = new Configuration(tFile);
tMainConfig.load();
@@ -148,7 +144,7 @@ public class GT_Mod } catch (Throwable e) {
}
}
- if (tMainConfig.get("general", "LoggingPlayerActivity", true).getBoolean(true)) {
+ if (tMainConfig.get(aTextGeneral, "LoggingPlayerActivity", true).getBoolean(true)) {
GT_Log.mPlayerActivityLogFile = new File(aEvent.getModConfigurationDirectory().getParentFile(), "logs/PlayerActivity.log");
if (!GT_Log.mPlayerActivityLogFile.exists()) {
try {
@@ -178,15 +174,15 @@ public class GT_Mod gregtechproxy.onPreLoad();
GT_Log.out.println("GT_Mod: Setting Configs");
- GT_Values.D1 = tMainConfig.get("general", "Debug", false).getBoolean(false);
- GT_Values.D2 = tMainConfig.get("general", "Debug2", false).getBoolean(false);
+ GT_Values.D1 = tMainConfig.get(aTextGeneral, "Debug", false).getBoolean(false);
+ GT_Values.D2 = tMainConfig.get(aTextGeneral, "Debug2", false).getBoolean(false);
- GregTech_API.TICKS_FOR_LAG_AVERAGING = tMainConfig.get("general", "TicksForLagAveragingWithScanner", 25).getInt(25);
- GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = tMainConfig.get("general", "MillisecondsPassedInGTTileEntityUntilLagWarning", 100).getInt(100);
- if (tMainConfig.get("general", "disable_STDOUT", false).getBoolean(false)) {
+ GregTech_API.TICKS_FOR_LAG_AVERAGING = tMainConfig.get(aTextGeneral, "TicksForLagAveragingWithScanner", 25).getInt(25);
+ GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING = tMainConfig.get(aTextGeneral, "MillisecondsPassedInGTTileEntityUntilLagWarning", 100).getInt(100);
+ if (tMainConfig.get(aTextGeneral, "disable_STDOUT", false).getBoolean(false)) {
System.out.close();
}
- if (tMainConfig.get("general", "disable_STDERR", false).getBoolean(false)) {
+ if (tMainConfig.get(aTextGeneral, "disable_STDERR", false).getBoolean(false)) {
System.err.close();
}
GregTech_API.sMachineExplosions = tMainConfig.get("machines", "machines_explosion_damage", true).getBoolean(false);
@@ -199,41 +195,46 @@ public class GT_Mod GregTech_API.sConstantEnergy = tMainConfig.get("machines", "constant_need_of_energy", true).getBoolean(false);
GregTech_API.sColoredGUI = tMainConfig.get("machines", "colored_guis_when_painted", true).getBoolean(false);
- GregTech_API.sTimber = tMainConfig.get("general", "timber_axe", false).getBoolean(false);
- GregTech_API.sDrinksAlwaysDrinkable = tMainConfig.get("general", "drinks_always_drinkable", false).getBoolean(false);
- GregTech_API.sDoShowAllItemsInCreative = tMainConfig.get("general", "show_all_metaitems_in_creative_and_NEI", false).getBoolean(false);
- GregTech_API.sMultiThreadedSounds = tMainConfig.get("general", "sound_multi_threading", false).getBoolean(false);
+ GregTech_API.sTimber = tMainConfig.get(aTextGeneral, "timber_axe", false).getBoolean(false);
+ GregTech_API.sDrinksAlwaysDrinkable = tMainConfig.get(aTextGeneral, "drinks_always_drinkable", false).getBoolean(false);
+ GregTech_API.sDoShowAllItemsInCreative = tMainConfig.get(aTextGeneral, "show_all_metaitems_in_creative_and_NEI", false).getBoolean(false);
+ GregTech_API.sMultiThreadedSounds = tMainConfig.get(aTextGeneral, "sound_multi_threading", false).getBoolean(false);
+ String SBdye0 = "ColorModulation.";
for (Dyes tDye : Dyes.values()) {
if ((tDye != Dyes._NULL) && (tDye.mIndex < 0)) {
- 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]))));
- }
- }
- 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);
+ String SBdye1 = new StringBuilder(18).append(SBdye0).append(tDye).toString();
+ 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(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);
+ gregtechproxy.mArcSmeltIntoAnnealed = tMainConfig.get(aTextGeneral, "ArcSmeltIntoAnnealedWrought", true).getBoolean(true);
+ gregtechproxy.mMagneticraftRecipes = tMainConfig.get(aTextGeneral, "EnableMagneticraftSupport", true).getBoolean(true);
+ gregtechproxy.mMagneticraftBonusOutputPercent = tMainConfig.get(aTextGeneral, "MagneticraftBonusOutputPercent", 100.0f).getDouble();
gregtechproxy.mTEMachineRecipes = tMainConfig.get("general", "TEMachineRecipes", false).getBoolean(false);
GregTech_API.mOutputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "OutputRF", true);
@@ -246,7 +247,7 @@ public class GT_Mod if (tMainConfig.get("general", "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()) {
@@ -339,7 +340,8 @@ public class GT_Mod List<ModContainer> tModList = tLoadController.getActiveModList();
List<ModContainer> tNewModsList = new ArrayList();
ModContainer tGregTech = null;
- for (short i = 0; i < tModList.size(); i = (short) (i + 1)) {
+ short tModList_sS= (short) tModList.size();
+ for (short i = 0; i < tModList_sS; i = (short) (i + 1)) {
ModContainer tMod = (ModContainer) tModList.get(i);
if (tMod.getModId().equalsIgnoreCase("gregtech")) {
tGregTech = tMod;
@@ -360,13 +362,11 @@ public class GT_Mod GregTech_API.sPreloadFinished = true;
GT_Log.out.println("GT_Mod: Preload-Phase finished!");
GT_Log.ore.println("GT_Mod: Preload-Phase finished!");
- for (Runnable tRunnable : GregTech_API.sAfterGTPreload) {
- try {
+ try {
+ for (Runnable tRunnable : GregTech_API.sAfterGTPreload) {
tRunnable.run();
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
}
- }
+ } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
}
@Mod.EventHandler
@@ -374,14 +374,12 @@ public class GT_Mod if (GregTech_API.sLoadStarted) {
return;
}
- for (Runnable tRunnable : GregTech_API.sBeforeGTLoad) {
- try {
+ try {
+ for (Runnable tRunnable : GregTech_API.sBeforeGTLoad) {
tRunnable.run();
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
}
- }
-
+ } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
+
new GT_Bees();
gregtechproxy.onLoad();
@@ -393,13 +391,11 @@ public class GT_Mod GregTech_API.sLoadFinished = true;
GT_Log.out.println("GT_Mod: Load-Phase finished!");
GT_Log.ore.println("GT_Mod: Load-Phase finished!");
- for (Runnable tRunnable : GregTech_API.sAfterGTLoad) {
- try {
+ try {
+ for (Runnable tRunnable : GregTech_API.sAfterGTLoad) {
tRunnable.run();
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
}
- }
+ } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
}
@Mod.EventHandler
@@ -407,13 +403,11 @@ public class GT_Mod if (GregTech_API.sPostloadStarted) {
return;
}
- for (Runnable tRunnable : GregTech_API.sBeforeGTPostload) {
- try {
+ try {
+ for (Runnable tRunnable : GregTech_API.sBeforeGTPostload) {
tRunnable.run();
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
}
- }
+ } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
gregtechproxy.onPostLoad();
if (gregtechproxy.mSortToTheEnd) {
gregtechproxy.registerUnificationEntries();
@@ -449,7 +443,10 @@ public class GT_Mod FMLLog.info("If your Log stops here, you were too impatient. Wait a bit more next time, before killing Minecraft with the Task Manager.", new Object[0]);
gregtechproxy.activateOreDictHandler();
FMLLog.info("Congratulations, you have been waiting long enough. Have a Cake.", new Object[0]);
- GT_Log.out.println("GT_Mod: " + GT_ModHandler.sSingleNonBlockDamagableRecipeList.size() + " Recipes were left unused.");
+ GT_Log.out.println("GT_Mod: List of Lists of Tool Recipes: "+GT_ModHandler.sSingleNonBlockDamagableRecipeList_list.toString());
+ GT_Log.out.println("GT_Mod: Vanilla Recipe List -> Outputs null or stackSize <=0: " + GT_ModHandler.sVanillaRecipeList_warntOutput.toString());
+ GT_Log.out.println("GT_Mod: Single Non Block Damagable Recipe List -> Outputs null or stackSize <=0: " + GT_ModHandler.sSingleNonBlockDamagableRecipeList_warntOutput.toString());
+ GT_Log.out.println("GT_Mod: sRodMaterialList cycles: " + GT_RecipeRegistrator.sRodMaterialList_cycles);
if (GT_Values.D1) {
IRecipe tRecipe;
for (Iterator i$ = GT_ModHandler.sSingleNonBlockDamagableRecipeList.iterator(); i$.hasNext(); GT_Log.out.println("=> " + tRecipe.getRecipeOutput().getDisplayName())) {
@@ -462,10 +459,12 @@ public class GT_Mod }
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item("machine", 1L));
GT_ModHandler.addCraftingRecipe(GT_ModHandler.getIC2Item("machine", 1L), GT_ModHandler.RecipeBits.BUFFERED | GT_ModHandler.RecipeBits.NOT_REMOVABLE | GT_ModHandler.RecipeBits.REVERSIBLE, new Object[]{"RRR", "RwR", "RRR", Character.valueOf('R'), OrePrefixes.plate.get(Materials.Iron)});
+ ItemStack ISdata0 = new ItemStack(Items.potionitem, 1, 0);
+ ItemStack ILdata0 = ItemList.Bottle_Empty.get(1L, new Object[0]);
for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) {
if ((tData.filledContainer.getItem() == Items.potionitem) && (tData.filledContainer.getItemDamage() == 0)) {
- GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{ItemList.Bottle_Empty.get(1L, new Object[0])}, new ItemStack[]{new ItemStack(Items.potionitem, 1, 0)}, null, new FluidStack[]{Materials.Water.getFluid(250L)}, null, 4, 1, 0);
- GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{new ItemStack(Items.potionitem, 1, 0)}, new ItemStack[]{ItemList.Bottle_Empty.get(1L, new Object[0])}, null, null, null, 4, 1, 0);
+ GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{ILdata0}, new ItemStack[]{ISdata0}, null, new FluidStack[]{Materials.Water.getFluid(250L)}, null, 4, 1, 0);
+ GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{ISdata0}, new ItemStack[]{ILdata0}, null, null, null, 4, 1, 0);
} else {
GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{tData.emptyContainer}, new ItemStack[]{tData.filledContainer}, null, new FluidStack[]{tData.fluid}, null, tData.fluid.amount / 62, 1, 0);
GT_Recipe.GT_Recipe_Map.sFluidCannerRecipes.addRecipe(true, new ItemStack[]{tData.filledContainer}, new ItemStack[]{GT_Utility.getContainerItem(tData.filledContainer, true)}, null, null, new FluidStack[]{tData.fluid}, tData.fluid.amount / 62, 1, 0);
@@ -501,58 +500,58 @@ public class GT_Mod }
}
String tName = "";
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2_" + (tName = "blastfurnace"), true)) {
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "blastfurnace"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L));
}
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2_" + (tName = "blockcutter"), true)) {
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "blockcutter"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L));
}
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2_" + (tName = "inductionFurnace"), true)) {
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "inductionFurnace"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L));
}
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2_" + (tName = "generator"), false)) {
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "generator"), false)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L));
}
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2_" + (tName = "windMill"), true)) {
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "windMill"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L));
}
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2_" + (tName = "waterMill"), true)) {
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "waterMill"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L));
}
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2_" + (tName = "solarPanel"), true)) {
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "solarPanel"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L));
}
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2_" + (tName = "centrifuge"), true)) {
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "centrifuge"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L));
}
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2_" + (tName = "electrolyzer"), false)) {
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "electrolyzer"), false)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L));
}
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2_" + (tName = "compressor"), true)) {
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "compressor"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L));
}
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2_" + (tName = "electroFurnace"), true)) {
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "electroFurnace"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L));
}
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2_" + (tName = "extractor"), true)) {
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "extractor"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L));
}
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2_" + (tName = "macerator"), true)) {
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "macerator"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L));
}
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2_" + (tName = "recycler"), true)) {
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "recycler"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L));
}
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2_" + (tName = "metalformer"), true)) {
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "metalformer"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L));
}
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2_" + (tName = "orewashingplant"), true)) {
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "orewashingplant"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L));
}
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2_" + (tName = "massFabricator"), true)) {
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "massFabricator"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L));
}
- if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, "ic2_" + (tName = "replicator"), true)) {
+ if (GregTech_API.sRecipeFile.get(ConfigCategories.Recipes.disabledrecipes, aTextIC2 + (tName = "replicator"), true)) {
GT_ModHandler.removeRecipeByOutput(GT_ModHandler.getIC2Item(tName, 1L));
}
if (gregtechproxy.mNerfedVanillaTools) {
@@ -595,13 +594,11 @@ public class GT_Mod GregTech_API.sPostloadFinished = true;
GT_Log.out.println("GT_Mod: PostLoad-Phase finished!");
GT_Log.ore.println("GT_Mod: PostLoad-Phase finished!");
- for (Runnable tRunnable : GregTech_API.sAfterGTPostload) {
- try {
+ try {
+ for (Runnable tRunnable : GregTech_API.sAfterGTPostload) {
tRunnable.run();
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
}
- }
+ } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
GT_Log.out.println("GT_Mod: Adding Fake Recipes for NEI");
if (ItemList.FR_Bee_Drone.get(1L, new Object[0]) != null) {
GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{ItemList.FR_Bee_Drone.getWildcard(1L, new Object[0])}, new ItemStack[]{ItemList.FR_Bee_Drone.getWithName(1L, "Scanned Drone", new Object[0])}, null, new FluidStack[]{Materials.Honey.getFluid(100L)}, null, 500, 2, 0);
@@ -644,14 +641,18 @@ public class GT_Mod Behaviour_DataOrb.setDataTitle(tOutput, "Elemental-Scan");
Behaviour_DataOrb.setDataName(tOutput, tMaterial.mElement.name());
ItemStack tInput = GT_OreDictUnificator.get(OrePrefixes.dust, tMaterial, 1L);
+ ItemStack[] ISmat0 = new ItemStack[]{tInput};
+ ItemStack[] ISmat1 = new ItemStack[]{tOutput};
if (tInput != null) {
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{tInput}, new ItemStack[]{tOutput}, ItemList.Tool_DataOrb.get(1L, new Object[0]), null, null, (int) (tMaterial.getMass() * 8192L), 32, 0);
- GT_Recipe.GT_Recipe_Map.sRepicatorFakeRecipes.addFakeRecipe(false, null, new ItemStack[]{tInput}, new ItemStack[]{tOutput}, new FluidStack[]{Materials.UUMatter.getFluid(tMaterial.getMass())}, null, (int) (tMaterial.getMass() * 512L), 32, 0);
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, ISmat0, ISmat1, ItemList.Tool_DataOrb.get(1L, new Object[0]), null, null, (int) (tMaterial.getMass() * 8192L), 32, 0);
+ GT_Recipe.GT_Recipe_Map.sRepicatorFakeRecipes.addFakeRecipe(false, null, ISmat0, ISmat1, new FluidStack[]{Materials.UUMatter.getFluid(tMaterial.getMass())}, null, (int) (tMaterial.getMass() * 512L), 32, 0);
+
}
tInput = GT_OreDictUnificator.get(OrePrefixes.cell, tMaterial, 1L);
+ ISmat0 = new ItemStack[]{tInput};
if (tInput != null) {
- GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{tInput}, new ItemStack[]{tOutput}, ItemList.Tool_DataOrb.get(1L, new Object[0]), null, null, (int) (tMaterial.getMass() * 8192L), 32, 0);
- GT_Recipe.GT_Recipe_Map.sRepicatorFakeRecipes.addFakeRecipe(false, null, new ItemStack[]{tInput}, new ItemStack[]{tOutput}, new FluidStack[]{Materials.UUMatter.getFluid(tMaterial.getMass())}, null, (int) (tMaterial.getMass() * 512L), 32, 0);
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, ISmat0, ISmat1, ItemList.Tool_DataOrb.get(1L, new Object[0]), null, null, (int) (tMaterial.getMass() * 8192L), 32, 0);
+ GT_Recipe.GT_Recipe_Map.sRepicatorFakeRecipes.addFakeRecipe(false, null, ISmat0, ISmat1, new FluidStack[]{Materials.UUMatter.getFluid(tMaterial.getMass())}, null, (int) (tMaterial.getMass() * 512L), 32, 0);
}
}
}
@@ -670,14 +671,13 @@ public class GT_Mod }
if(GregTech_API.mOutputRF||GregTech_API.mInputRF){
- GT_Utility.checkAvailabilities();
- if(!GT_Utility.RF_CHECK){
- GregTech_API.mOutputRF = false;
- GregTech_API.mInputRF = false;
- }
+ GT_Utility.checkAvailabilities();
+ if(!GT_Utility.RF_CHECK){
+ GregTech_API.mOutputRF = false;
+ GregTech_API.mInputRF = false;
+ }
}
achievements = new GT_Achievements();
- Map.Entry<IRecipeInput, RecipeOutput> tRecipe;
GT_Log.out.println("GT_Mod: Loading finished, deallocating temporary Init Variables.");
GregTech_API.sBeforeGTPreload = null;
GregTech_API.sAfterGTPreload = null;
@@ -689,13 +689,11 @@ public class GT_Mod @Mod.EventHandler
public void onServerStarting(FMLServerStartingEvent aEvent) {
- for (Runnable tRunnable : GregTech_API.sBeforeGTServerstart) {
- try {
+ try {
+ for (Runnable tRunnable : GregTech_API.sBeforeGTServerstart) {
tRunnable.run();
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
}
- }
+ } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
gregtechproxy.onServerStarting();
GT_Log.out.println("GT_Mod: Unificating outputs of all known Recipe Types.");
ArrayList<ItemStack> tStacks = new ArrayList(10000);
@@ -761,34 +759,34 @@ public class GT_Mod }
}
GT_Log.out.println("GT_Mod: Dungeon Loot");
- for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("dungeonChest").getItems(new Random())) {
+ for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("dungeonChest").getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
- for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("bonusChest").getItems(new Random())) {
+ for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("bonusChest").getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
- for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("villageBlacksmith").getItems(new Random())) {
+ for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("villageBlacksmith").getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
- for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("strongholdCrossing").getItems(new Random())) {
+ for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("strongholdCrossing").getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
- for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("strongholdLibrary").getItems(new Random())) {
+ for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("strongholdLibrary").getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
- for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("strongholdCorridor").getItems(new Random())) {
+ for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("strongholdCorridor").getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
- for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("pyramidJungleDispenser").getItems(new Random())) {
+ for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("pyramidJungleDispenser").getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
- for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("pyramidJungleChest").getItems(new Random())) {
+ for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("pyramidJungleChest").getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
- for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("pyramidDesertyChest").getItems(new Random())) {
+ for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("pyramidDesertyChest").getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
- for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("mineshaftCorridor").getItems(new Random())) {
+ for (WeightedRandomChestContent tContent : ChestGenHooks.getInfo("mineshaftCorridor").getItems(new XSTR())) {
tStacks.add(tContent.theItemId);
}
GT_Log.out.println("GT_Mod: Smelting");
@@ -829,13 +827,11 @@ public class GT_Mod GregTech_API.mServerStarted = true;
GT_Log.out.println("GT_Mod: ServerStarting-Phase finished!");
GT_Log.ore.println("GT_Mod: ServerStarting-Phase finished!");
- for (Runnable tRunnable : GregTech_API.sAfterGTServerstart) {
- try {
+ try {
+ for (Runnable tRunnable : GregTech_API.sAfterGTServerstart) {
tRunnable.run();
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
}
- }
+ } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
}
@Mod.EventHandler
@@ -847,14 +843,12 @@ public class GT_Mod public void onIDChangingEvent(FMLModIdMappingEvent aEvent) {
GT_Utility.reInit();
GT_Recipe.reInit();
- for (Iterator i$ = GregTech_API.sItemStackMappings.iterator(); i$.hasNext(); ) {
- Map tMap = (Map) i$.next();
- try {
+ try {
+ for (Iterator i$ = GregTech_API.sItemStackMappings.iterator(); i$.hasNext(); ) {
+ Map tMap = (Map) i$.next();
GT_Utility.reMap(tMap);
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
}
- }
+ } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
}
// public void onIDChangingEvent(FMLModIdMappingEvent aEvent)
@@ -869,13 +863,11 @@ public class GT_Mod @Mod.EventHandler
public void onServerStopping(FMLServerStoppingEvent aEvent) {
- for (Runnable tRunnable : GregTech_API.sBeforeGTServerstop) {
- try {
+ try {
+ for (Runnable tRunnable : GregTech_API.sBeforeGTServerstop) {
tRunnable.run();
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
}
- }
+ } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
gregtechproxy.onServerStopping();
try {
if ((GT_Values.D1) || (GT_Log.out != System.out)) {
@@ -943,13 +935,11 @@ public class GT_Mod e.printStackTrace(GT_Log.err);
}
}
- for (Runnable tRunnable : GregTech_API.sAfterGTServerstop) {
- try {
+ try {
+ for (Runnable tRunnable : GregTech_API.sAfterGTServerstop) {
tRunnable.run();
- } catch (Throwable e) {
- e.printStackTrace(GT_Log.err);
}
- }
+ } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
}
public boolean isServerSide() {
@@ -975,4 +965,4 @@ public class GT_Mod public void doSonictronSound(ItemStack aStack, World aWorld, double aX, double aY, double aZ) {
gregtechproxy.doSonictronSound(aStack, aWorld, aX, aY, aZ);
}
-}
+}
\ No newline at end of file |