aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech
diff options
context:
space:
mode:
authorMuramasa <haydenkilloh@gmail.com>2016-09-16 00:17:08 +0100
committerMuramasa <haydenkilloh@gmail.com>2016-09-16 00:17:08 +0100
commit6ac01a92c9b9c54c2c853c6c46bd8e6c8030a4b2 (patch)
tree5f0b682f5b1db4995f9324f8e0094989a9942153 /src/main/java/gregtech
parentb22bb2dfa6ec7d1e91d8657fcb8bd0389ff7e74a (diff)
downloadGT5-Unofficial-6ac01a92c9b9c54c2c853c6c46bd8e6c8030a4b2.tar.gz
GT5-Unofficial-6ac01a92c9b9c54c2c853c6c46bd8e6c8030a4b2.tar.bz2
GT5-Unofficial-6ac01a92c9b9c54c2c853c6c46bd8e6c8030a4b2.zip
Fix conflicts
Diffstat (limited to 'src/main/java/gregtech')
-rw-r--r--src/main/java/gregtech/GT_Mod.java241
-rw-r--r--src/main/java/gregtech/api/items/GT_MetaBase_Item.java1
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java7
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java35
-rw-r--r--src/main/java/gregtech/api/objects/GT_FluidStack.java26
-rw-r--r--src/main/java/gregtech/api/util/GT_ModHandler.java219
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java573
-rw-r--r--src/main/java/gregtech/common/GT_Worldgenerator.java20
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Item_Machines.java18
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java18
-rw-r--r--src/main/java/gregtech/loaders/misc/GT_Achievements.java48
11 files changed, 652 insertions, 554 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java
index 7bc9a9be67..39822f063f 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;
@@ -56,14 +57,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")
@@ -72,8 +67,8 @@ public class GT_Mod
public static GT_Proxy gregtechproxy;
public static int MAX_IC2 = 2147483647;
public static GT_Achievements achievements;
-
- private static final String aTextGeneral = "general";
+ 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)) {
@@ -109,13 +104,11 @@ public class GT_Mod
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();
@@ -151,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 {
@@ -181,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);
@@ -202,10 +195,10 @@ 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)) {
@@ -239,6 +232,9 @@ public class GT_Mod
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();
GregTech_API.mOutputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "OutputRF", true);
GregTech_API.mInputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "InputRF", false);
@@ -249,13 +245,13 @@ public class GT_Mod
gregtechproxy.mChangeHarvestLevels = GregTech_API.sMaterialProperties.get("havestLevel", "activateHarvestLevelChange", false);
if(gregtechproxy.mChangeHarvestLevels){
- gregtechproxy.mGraniteHavestLevel = (int) GregTech_API.sMaterialProperties.get("havestLevel", "graniteHarvestLevel", 3);
- gregtechproxy.mMaxHarvestLevel=(int) Math.min(15, GregTech_API.sMaterialProperties.get("havestLevel", "maxLevel",7));
- for(Materials tMaterial : Materials.values()){
- if(tMaterial!=null&&tMaterial.mToolQuality>0&&tMaterial.mMetaItemSubID<gregtechproxy.mHarvestLevel.length&&tMaterial.mMetaItemSubID>=0){
- gregtechproxy.mHarvestLevel[tMaterial.mMetaItemSubID] = GregTech_API.sMaterialProperties.get("materialHavestLevel", tMaterial.mDefaultLocalName,tMaterial.mToolQuality);
- }
- }}
+ gregtechproxy.mGraniteHavestLevel = (int) GregTech_API.sMaterialProperties.get("havestLevel", "graniteHarvestLevel", 3);
+ gregtechproxy.mMaxHarvestLevel=(int) Math.min(15, GregTech_API.sMaterialProperties.get("havestLevel", "maxLevel",7));
+ for(Materials tMaterial : Materials.values()){
+ if(tMaterial!=null&&tMaterial.mToolQuality>0&&tMaterial.mMetaItemSubID<gregtechproxy.mHarvestLevel.length&&tMaterial.mMetaItemSubID>=0){
+ gregtechproxy.mHarvestLevel[tMaterial.mMetaItemSubID] = GregTech_API.sMaterialProperties.get("materialHavestLevel", tMaterial.mDefaultLocalName,tMaterial.mToolQuality);
+ }
+ }}
if (tMainConfig.get(aTextGeneral, "hardermobspawners", true).getBoolean(true)) {
Blocks.mob_spawner.setHardness(500.0F).setResistance(6000000.0F);
@@ -352,7 +348,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;
@@ -373,13 +370,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
@@ -387,16 +382,14 @@ 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();
if (gregtechproxy.mSortToTheEnd) {
new GT_ItemIterator().run();
@@ -406,13 +399,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
@@ -420,13 +411,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();
@@ -462,7 +451,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())) {
@@ -475,10 +467,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);
@@ -514,58 +508,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) {
@@ -608,13 +602,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);
@@ -657,14 +649,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);
}
}
}
@@ -683,15 +679,14 @@ 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; Unused?
GT_Log.out.println("GT_Mod: Loading finished, deallocating temporary Init Variables.");
GregTech_API.sBeforeGTPreload = null;
GregTech_API.sAfterGTPreload = null;
@@ -703,13 +698,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);
@@ -775,34 +768,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");
@@ -843,13 +836,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
@@ -861,14 +852,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)
@@ -883,13 +872,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)) {
@@ -957,13 +944,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() {
@@ -989,4 +974,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
diff --git a/src/main/java/gregtech/api/items/GT_MetaBase_Item.java b/src/main/java/gregtech/api/items/GT_MetaBase_Item.java
index 75cea04054..7796691540 100644
--- a/src/main/java/gregtech/api/items/GT_MetaBase_Item.java
+++ b/src/main/java/gregtech/api/items/GT_MetaBase_Item.java
@@ -39,7 +39,6 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci
* Creates the Item using these Parameters.
*
* @param aUnlocalized The Unlocalized Name of this Item.
- * @param aGeneratedPrefixList The OreDict Prefixes you want to have generated.
*/
public GT_MetaBase_Item(String aUnlocalized) {
super(aUnlocalized, "Generated Item", null, false);
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
index 686286d7d8..01ca8c0f7b 100644
--- a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
@@ -283,11 +283,12 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
}
default:
tCode = -1;
+ break;
}
}
} catch (Throwable e) {
- gregtech.api.util.GT_Log.err.println("Encountered Exception while ticking MetaTileEntity in Step " + (tCode - 1) + ". The Game should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
- e.printStackTrace(gregtech.api.util.GT_Log.err);
+ //GT_Log.err.println("Encountered Exception while ticking MetaTileEntity in Step " + (tCode - 1) + ". The Game should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
+ e.printStackTrace(GT_Log.err);
}
if (isServerSide() && hasValidMetaTileEntity()) {
@@ -355,7 +356,7 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
if (aValue > 16 || aValue < 0) aValue = 0;
mColor = (byte) aValue;
break;
- case 3: //int X & Y = 0 or Y; Y -> {1,2,4,8,16,32}; byte type analogy
+ case 3:
mSidedRedstone[0] = (byte) ((aValue & 1) == 1 ? 15 : 0);
mSidedRedstone[1] = (byte) ((aValue & 2) == 2 ? 15 : 0);
mSidedRedstone[2] = (byte) ((aValue & 4) == 4 ? 15 : 0);
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
index bc18ff6909..e2a23e4b41 100644
--- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
@@ -249,8 +249,8 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
mRunningThroughTick = true;
long tTime = System.currentTimeMillis();
int tCode = 0;
- boolean sidetypeS = isServerSide() ? true : false;
- boolean sidetypeC = isClientSide() ? true : false;
+ boolean aSideServer = isServerSide();
+ boolean aSideClient = isClientSide();
try { for (tCode = 0; hasValidMetaTileEntity() && tCode >= 0; ) {
switch (tCode) {
@@ -260,7 +260,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
oX = xCoord;
oY = yCoord;
oZ = zCoord;
- if (sidetypeS) for (byte i = 0; i < 6; i++)
+ if (aSideServer) for (byte i = 0; i < 6; i++)
if (getCoverIDAtSide(i) != 0)
if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i))))
dropCover(i, i, true);
@@ -273,7 +273,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
}
case 1:
tCode++;
- if (isClientSide()) {
+ if (aSideClient) {
if (mColor != oColor) {
mMetaTileEntity.onColorChangeClient(oColor = mColor);
issueTextureUpdate();
@@ -304,7 +304,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE