aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/gregtech/GT_Mod.java73
-rw-r--r--src/main/java/gregtech/api/GregTech_API.java49
-rw-r--r--src/main/java/gregtech/api/enums/GT_Values.java4
-rw-r--r--src/main/java/gregtech/api/enums/Materials.java2
-rw-r--r--src/main/java/gregtech/api/gui/GT_Container.java11
-rw-r--r--src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java2
-rw-r--r--src/main/java/gregtech/api/items/GT_EnergyArmor_Item.java3
-rw-r--r--src/main/java/gregtech/api/items/GT_MetaBase_Item.java2
-rw-r--r--src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java2
-rw-r--r--src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java3
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java226
-rw-r--r--src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java514
-rw-r--r--src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java3
-rw-r--r--src/main/java/gregtech/api/metatileentity/MetaTileEntity.java3
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java7
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java5
-rw-r--r--src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java11
-rw-r--r--src/main/java/gregtech/api/objects/ElementStack.java4
-rw-r--r--src/main/java/gregtech/api/objects/GT_FluidStack.java1
-rw-r--r--src/main/java/gregtech/api/objects/GT_RenderedTexture.java35
-rw-r--r--src/main/java/gregtech/api/objects/GT_SidedTexture.java53
-rw-r--r--src/main/java/gregtech/api/objects/ItemData.java2
-rw-r--r--src/main/java/gregtech/api/objects/MaterialStack.java12
-rw-r--r--src/main/java/gregtech/api/util/GT_LanguageManager.java4
-rw-r--r--src/main/java/gregtech/api/util/GT_ModHandler.java42
-rw-r--r--src/main/java/gregtech/api/util/GT_OreDictUnificator.java12
-rw-r--r--src/main/java/gregtech/api/util/GT_RecipeRegistrator.java4
-rw-r--r--src/main/java/gregtech/api/util/GT_Utility.java18
-rw-r--r--src/main/java/gregtech/common/GT_Client.java82
-rw-r--r--src/main/java/gregtech/common/GT_Proxy.java424
-rw-r--r--src/main/java/gregtech/common/GT_RecipeAdder.java2
-rw-r--r--src/main/java/gregtech/common/GT_Worldgenerator.java3
-rw-r--r--src/main/java/gregtech/common/blocks/GT_Item_Machines.java57
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java2
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Drain.java2
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java4
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_Pump.java4
-rw-r--r--src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java4
-rw-r--r--src/main/java/gregtech/common/gui/GT_Container_Boiler.java2
-rw-r--r--src/main/java/gregtech/common/gui/GT_Container_Regulator.java4
-rw-r--r--src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java2
-rw-r--r--src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java4
-rw-r--r--src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java18
-rw-r--r--src/main/java/gregtech/common/items/GT_SensorCard_Item.java2
-rw-r--r--src/main/java/gregtech/common/items/armor/ArmorCalculation.java5
-rw-r--r--src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java3
-rw-r--r--src/main/java/gregtech/common/render/GT_CapeRenderer.java50
-rw-r--r--src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java3
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java1
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java2
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java8
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java1
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java7
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java55
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java5
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java12
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java9
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java9
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java9
-rw-r--r--src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java9
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Axe.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_File.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Plow.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Plunger.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Sense.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java2
-rw-r--r--src/main/java/gregtech/common/tools/GT_Tool_Wrench.java2
-rw-r--r--src/main/java/gregtech/loaders/misc/GT_Achievements.java64
-rw-r--r--src/main/java/gregtech/loaders/misc/OreProcessingConfiguration.java24
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingBattery.java8
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java10
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java8
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java8
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java55
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java32
-rw-r--r--src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java6
-rw-r--r--src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java6
-rw-r--r--src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java3
86 files changed, 956 insertions, 1215 deletions
diff --git a/src/main/java/gregtech/GT_Mod.java b/src/main/java/gregtech/GT_Mod.java
index c24414d1d5..7bc9a9be67 100644
--- a/src/main/java/gregtech/GT_Mod.java
+++ b/src/main/java/gregtech/GT_Mod.java
@@ -73,6 +73,8 @@ public class GT_Mod
public static int MAX_IC2 = 2147483647;
public static GT_Achievements achievements;
+ private static final String aTextGeneral = "general";
+
static {
if ((509 != GregTech_API.VERSION) || (509 != GT_ModHandler.VERSION) || (509 != GT_OreDictUnificator.VERSION) || (509 != GT_Recipe.VERSION) || (509 != GT_Utility.VERSION) || (509 != GT_RecipeRegistrator.VERSION) || (509 != Element.VERSION) || (509 != Materials.VERSION) || (509 != OrePrefixes.VERSION)) {
throw new GT_ItsNotMyFaultException("One of your Mods included GregTech-API Files inside it's download, mention this to the Mod Author, who does this bad thing, and tell him/her to use reflection. I have added a Version check, to prevent Authors from breaking my Mod that way.");
@@ -81,15 +83,15 @@ public class GT_Mod
public GT_Mod() {
try {
- Class.forName("ic2.core.IC2").getField("enableOreDictCircuit").set(null, Boolean.valueOf(true));
+ Class.forName("ic2.core.IC2").getField("enableOreDictCircuit").set(null, Boolean.FALSE);
} catch (Throwable e) {
}
try {
- Class.forName("ic2.core.IC2").getField("enableCraftingBucket").set(null, Boolean.valueOf(false));
+ Class.forName("ic2.core.IC2").getField("enableCraftingBucket").set(null, Boolean.FALSE);
} catch (Throwable e) {
}
try {
- Class.forName("ic2.core.IC2").getField("enableEnergyInStorageBlockItems").set(null, Boolean.valueOf(false));
+ Class.forName("ic2.core.IC2").getField("enableEnergyInStorageBlockItems").set(null, Boolean.FALSE);
} catch (Throwable e) {
}
GT_Values.GT = this;
@@ -103,6 +105,7 @@ public class GT_Mod
@Mod.EventHandler
public void onPreLoad(FMLPreInitializationEvent aEvent) {
+ Locale.setDefault(Locale.ENGLISH);
if (GregTech_API.sPreloadStarted) {
return;
}
@@ -203,37 +206,39 @@ public class GT_Mod
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);
+ 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);
GregTech_API.mOutputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "OutputRF", true);
GregTech_API.mInputRF = GregTech_API.sOPStuff.get(ConfigCategories.general, "InputRF", false);
@@ -252,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()) {
@@ -686,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;
diff --git a/src/main/java/gregtech/api/GregTech_API.java b/src/main/java/gregtech/api/GregTech_API.java
index 3fe74662dd..5b152d7408 100644
--- a/src/main/java/gregtech/api/GregTech_API.java
+++ b/src/main/java/gregtech/api/GregTech_API.java
@@ -190,6 +190,7 @@ public class GregTech_API {
public static int mRFtoEU = 20;
public static boolean mRFExplosions = true;
public static boolean mServerStarted = false;
+ private static final String aTextIC2Lower = MOD_ID_IC2.toLowerCase(Locale.ENGLISH);
/**
* Getting assigned by the Mod loading
*/
@@ -215,29 +216,29 @@ public class GregTech_API {
sSoundList.put(5, "random.explode");
sSoundList.put(6, "fire.ignite");
- sSoundList.put(100, MOD_ID_IC2.toLowerCase() + ":" + "tools.Wrench");
- sSoundList.put(101, MOD_ID_IC2.toLowerCase() + ":" + "tools.RubberTrampoline");
- sSoundList.put(102, MOD_ID_IC2.toLowerCase() + ":" + "tools.Painter");
- sSoundList.put(103, MOD_ID_IC2.toLowerCase() + ":" + "tools.BatteryUse");
- sSoundList.put(104, MOD_ID_IC2.toLowerCase() + ":" + "tools.chainsaw.ChainsawUseOne");
- sSoundList.put(105, MOD_ID_IC2.toLowerCase() + ":" + "tools.chainsaw.ChainsawUseTwo");
- sSoundList.put(106, MOD_ID_IC2.toLowerCase() + ":" + "tools.drill.DrillSoft");
- sSoundList.put(107, MOD_ID_IC2.toLowerCase() + ":" + "tools.drill.DrillHard");
- sSoundList.put(108, MOD_ID_IC2.toLowerCase() + ":" + "tools.ODScanner");
-
- sSoundList.put(200, MOD_ID_IC2.toLowerCase() + ":" + "machines.ExtractorOp");
- sSoundList.put(201, MOD_ID_IC2.toLowerCase() + ":" + "machines.MaceratorOp");
- sSoundList.put(202, MOD_ID_IC2.toLowerCase() + ":" + "machines.InductionLoop");
- sSoundList.put(203, MOD_ID_IC2.toLowerCase() + ":" + "machines.CompressorOp");
- sSoundList.put(204, MOD_ID_IC2.toLowerCase() + ":" + "machines.RecyclerOp");
- sSoundList.put(205, MOD_ID_IC2.toLowerCase() + ":" + "machines.MinerOp");
- sSoundList.put(206, MOD_ID_IC2.toLowerCase() + ":" + "machines.PumpOp");
- sSoundList.put(207, MOD_ID_IC2.toLowerCase() + ":" + "machines.ElectroFurnaceLoop");
- sSoundList.put(208, MOD_ID_IC2.toLowerCase() + ":" + "machines.InductionLoop");
- sSoundList.put(209, MOD_ID_IC2.toLowerCase() + ":" + "machines.MachineOverload");
- sSoundList.put(210, MOD_ID_IC2.toLowerCase() + ":" + "machines.InterruptOne");
- sSoundList.put(211, MOD_ID_IC2.toLowerCase() + ":" + "machines.KaChing");
- sSoundList.put(212, MOD_ID_IC2.toLowerCase() + ":" + "machines.MagnetizerLoop");
+ sSoundList.put(100, aTextIC2Lower + ":" + "tools.Wrench");
+ sSoundList.put(101, aTextIC2Lower + ":" + "tools.RubberTrampoline");
+ sSoundList.put(102, aTextIC2Lower + ":" + "tools.Painter");
+ sSoundList.put(103, aTextIC2Lower + ":" + "tools.BatteryUse");
+ sSoundList.put(104, aTextIC2Lower + ":" + "tools.chainsaw.ChainsawUseOne");
+ sSoundList.put(105, aTextIC2Lower + ":" + "tools.chainsaw.ChainsawUseTwo");
+ sSoundList.put(106, aTextIC2Lower + ":" + "tools.drill.DrillSoft");
+ sSoundList.put(107, aTextIC2Lower + ":" + "tools.drill.DrillHard");
+ sSoundList.put(108, aTextIC2Lower + ":" + "tools.ODScanner");
+
+ sSoundList.put(200, aTextIC2Lower + ":" + "machines.ExtractorOp");
+ sSoundList.put(201, aTextIC2Lower + ":" + "machines.MaceratorOp");
+ sSoundList.put(202, aTextIC2Lower + ":" + "machines.InductionLoop");
+ sSoundList.put(203, aTextIC2Lower + ":" + "machines.CompressorOp");
+ sSoundList.put(204, aTextIC2Lower + ":" + "machines.RecyclerOp");
+ sSoundList.put(205, aTextIC2Lower + ":" + "machines.MinerOp");
+ sSoundList.put(206, aTextIC2Lower + ":" + "machines.PumpOp");
+ sSoundList.put(207, aTextIC2Lower + ":" + "machines.ElectroFurnaceLoop");
+ sSoundList.put(208, aTextIC2Lower + ":" + "machines.InductionLoop");
+ sSoundList.put(209, aTextIC2Lower + ":" + "machines.MachineOverload");
+ sSoundList.put(210, aTextIC2Lower + ":" + "machines.InterruptOne");
+ sSoundList.put(211, aTextIC2Lower + ":" + "machines.KaChing");
+ sSoundList.put(212, aTextIC2Lower + ":" + "machines.MagnetizerLoop");
}
/**
@@ -302,7 +303,7 @@ public class GregTech_API {
if (GregTech_API.sThaumcraftCompat != null)
GregTech_API.sThaumcraftCompat.registerPortholeBlacklistedBlock(aBlock);
int rMeta = 0;
- for (byte i = 0; i < aMeta.length && i < 16; i++) if (aMeta[i]) rMeta |= B[i];
+ for (byte i = 0; i < 16 && i < aMeta.length; i++) if (aMeta[i]) rMeta |= B[i];
sMachineIDs.put(aBlock, rMeta);
return true;
}
diff --git a/src/main/java/gregtech/api/enums/GT_Values.java b/src/main/java/gregtech/api/enums/GT_Values.java
index 93c7ef73e6..af2ec92195 100644
--- a/src/main/java/gregtech/api/enums/GT_Values.java
+++ b/src/main/java/gregtech/api/enums/GT_Values.java
@@ -8,6 +8,8 @@ import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.oredict.OreDictionary;
+import java.util.Locale;
+
/**
* Made for static imports, this Class is just a Helper.
* <p/>
@@ -89,7 +91,7 @@ public class GT_Values {
* File Paths and Resource Paths
*/
public static final String
- TEX_DIR = "textures/", TEX_DIR_GUI = TEX_DIR + "gui/", TEX_DIR_ITEM = TEX_DIR + "items/", TEX_DIR_BLOCK = TEX_DIR + "blocks/", TEX_DIR_ENTITY = TEX_DIR + "entity/", TEX_DIR_ASPECTS = TEX_DIR + "aspects/", RES_PATH = MOD_ID + ":" + TEX_DIR, RES_PATH_GUI = MOD_ID + ":" + TEX_DIR_GUI, RES_PATH_ITEM = MOD_ID + ":", RES_PATH_BLOCK = MOD_ID + ":", RES_PATH_ENTITY = MOD_ID + ":" + TEX_DIR_ENTITY, RES_PATH_ASPECTS = MOD_ID + ":" + TEX_DIR_ASPECTS, RES_PATH_IC2 = MOD_ID_IC2.toLowerCase() + ":", RES_PATH_MODEL = MOD_ID + ":" + TEX_DIR + "models/";
+ TEX_DIR = "textures/", TEX_DIR_GUI = TEX_DIR + "gui/", TEX_DIR_ITEM = TEX_DIR + "items/", TEX_DIR_BLOCK = TEX_DIR + "blocks/", TEX_DIR_ENTITY = TEX_DIR + "entity/", TEX_DIR_ASPECTS = TEX_DIR + "aspects/", RES_PATH = MOD_ID + ":" + TEX_DIR, RES_PATH_GUI = MOD_ID + ":" + TEX_DIR_GUI, RES_PATH_ITEM = MOD_ID + ":", RES_PATH_BLOCK = MOD_ID + ":", RES_PATH_ENTITY = MOD_ID + ":" + TEX_DIR_ENTITY, RES_PATH_ASPECTS = MOD_ID + ":" + TEX_DIR_ASPECTS, RES_PATH_IC2 = MOD_ID_IC2.toLowerCase(Locale.ENGLISH) + ":", RES_PATH_MODEL = MOD_ID + ":" + TEX_DIR + "models/";
/**
* The Mod Object itself. That is the GT_Mod-Object. It's needed to open GUI's and similar.
*/
diff --git a/src/main/java/gregtech/api/enums/Materials.java b/src/main/java/gregtech/api/enums/Materials.java
index 20022aa267..ee26337ede 100644
--- a/src/main/java/gregtech/api/enums/Materials.java
+++ b/src/main/java/gregtech/api/enums/Materials.java
@@ -1408,7 +1408,7 @@ public enum Materials implements IColorModulationContainer, ISubTagContainer {
*/
public static void init(GT_Config aConfiguration) {
for (Materials tMaterial : VALUES) {
- String tString = tMaterial.toString().toLowerCase();
+ String tString = tMaterial.toString().toLowerCase(Locale.ENGLISH);
tMaterial.mHeatDamage = (float) aConfiguration.get(ConfigCategories.Materials.heatdamage, tString, tMaterial.mHeatDamage);
if (tMaterial.mBlastFurnaceRequired)
tMaterial.mBlastFurnaceRequired = aConfiguration.get(ConfigCategories.Materials.blastfurnacerequirements, tString, true);
diff --git a/src/main/java/gregtech/api/gui/GT_Container.java b/src/main/java/gregtech/api/gui/GT_Container.java
index 614d459cb9..8eb908ecae 100644
--- a/src/main/java/gregtech/api/gui/GT_Container.java
+++ b/src/main/java/gregtech/api/gui/GT_Container.java
@@ -124,7 +124,7 @@ public class GT_Container extends Container {
if ((aShifthold == 0 || aShifthold == 1) && (aMouseclick == 0 || aMouseclick == 1)) {
if (aSlotIndex == -999) {
- if (aPlayerInventory.getItemStack() != null && aSlotIndex == -999) {
+ if (aPlayerInventory.getItemStack() != null) {
if (aMouseclick == 0) {
aPlayer.dropPlayerItemWithRandomChoice(aPlayerInventory.getItemStack(), true);
aPlayerInventory.setItemStack(null);
@@ -228,11 +228,11 @@ public class GT_Container extends Container {
var9 |= tTempStackSize > -1;
}
- if (aSlot.getHasStack() && var9) {
+ if (var9 && aSlot.getHasStack()) {
aHoldStack = aSlot.getStack();
aPlayerInventory.setInventorySlotContents(aMouseclick, aHoldStack);
- if ((aSlot.inventory != aPlayerInventory || !aSlot.isItemValid(tTempStack)) && tTempStack != null) {
+ if (tTempStack != null && (aSlot.inventory != aPlayerInventory || !aSlot.isItemValid(tTempStack))) {
if (tTempStackSize > -1) {
aPlayerInventory.addItemStackToInventory(tTempStack);
aSlot.decrStackSize(aHoldStack.stackSize);
@@ -244,7 +244,7 @@ public class GT_Container extends Container {
aSlot.putStack(tTempStack);
aSlot.onPickupFromSlot(aPlayer, aHoldStack);
}
- } else if (!aSlot.getHasStack() && tTempStack != null && aSlot.isItemValid(tTempStack)) {
+ } else if (tTempStack != null && !aSlot.getHasStack() && aSlot.isItemValid(tTempStack)) {
aPlayerInventory.setInventorySlotContents(aMouseclick, (ItemStack) null);
aSlot.putStack(tTempStack);
}
@@ -267,8 +267,7 @@ public class GT_Container extends Container {
mTileEntity.markDirty();
- //null checks and checks if the item can be stacked (maxStackSize > 1)
- if (getSlotCount() > 0 && slotObject != null && slotObject.getHasStack() && !(slotObject instanceof GT_Slot_Holo)) {
+ if (getSlotCount() > 0 && !(slotObject instanceof GT_Slot_Holo) && slotObject.getHasStack()) {
ItemStack stackInSlot = slotObject.getStack();
stack = GT_Utility.copy(stackInSlot);
diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java b/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java
index 4c20715e68..b9cae3e0b3 100644
--- a/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java
+++ b/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java
@@ -29,7 +29,7 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer {
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
if (GregTech_API.sColoredGUI && mContainer != null && mContainer.mTileEntity != null) {
int tColor = mContainer.mTileEntity.getColorization() & 15;
- if (tColor >= 0 && tColor < ItemDye.field_150922_c.length) {
+ if (tColor < ItemDye.field_150922_c.length) {
tColor = ItemDye.field_150922_c[tColor];
GL11.glColor4f(((tColor >> 16) & 255) / 255.0F, ((tColor >> 8) & 255) / 255.0F, (tColor & 255) / 255.0F, 1.0F);
} else GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
diff --git a/src/main/java/gregtech/api/items/GT_EnergyArmor_Item.java b/src/main/java/gregtech/api/items/GT_EnergyArmor_Item.java
index 6e3c6df6e1..6d57ae8753 100644
--- a/src/main/java/gregtech/api/items/GT_EnergyArmor_Item.java
+++ b/src/main/java/gregtech/api/items/GT_EnergyArmor_Item.java
@@ -200,9 +200,6 @@ public class GT_EnergyArmor_Item extends ItemArmor implements ISpecialArmor {
if (tTargetChargeItem == null || !GT_ModHandler.isElectricItem(tTargetChargeItem)) {
tTargetChargeItem = null;
}
- if (tTargetDechargeItem == null || !GT_ModHandler.isElectricItem(tTargetChargeItem) || !(aStack == tTargetDechargeItem || GT_ModHandler.isChargerItem(tTargetDechargeItem))) {
- tTargetDechargeItem = null;
- }
if (aPlayer.worldObj.isDaytime() && aPlayer.worldObj.canBlockSeeTheSky(MathHelper.floor_double(aPlayer.posX), MathHelper.floor_double(aPlayer.posY + 1), MathHelper.floor_double(aPlayer.posZ))) {
if ((mSpecials & 32) != 0 && tTargetChargeItem != null) {
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 a921377a2e..e39d223830 100644
--- a/src/main/java/gregtech/api/items/GT_MetaBase_Item.java
+++ b/src/main/java/gregtech/api/items/GT_MetaBase_Item.java
@@ -294,7 +294,7 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci
chargeFromArmor(aStack, aPlayer);
if (aPlayer instanceof EntityPlayer && ((EntityPlayer) aPlayer).capabilities.isCreativeMode) return true;
double tTransfer = discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, true);
- if (tTransfer == aAmount) {
+ if (Math.abs(tTransfer - aAmount) < .0000001) {
discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false);
chargeFromArmor(aStack, aPlayer);
return true;
diff --git a/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java b/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java
index cfbf9deb7f..9dd688f70e 100644
--- a/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java
+++ b/src/main/java/gregtech/api/items/GT_MetaGenerated_Tool.java
@@ -600,7 +600,7 @@ public abstract class GT_MetaGenerated_Tool extends GT_MetaBase_Item implements
@Override
public boolean isItemStackUsable(ItemStack aStack) {
IToolStats tStats = getToolStatsInternal(aStack);
- if (aStack.getItemDamage() % 2 == 1 || tStats == null) {
+ if (aStack.getItemDamage() % 2 != 0 || tStats == null) {
NBTTagCompound aNBT = aStack.getTagCompound();
if (aNBT != null) aNBT.removeTag("ench");
return false;
diff --git a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java
index 455cfb14a5..9304068159 100644
--- a/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java
+++ b/src/main/java/gregtech/api/items/GT_RadioactiveCellIC_Item.java
@@ -1,7 +1,6 @@
package gregtech.api.items;
-import gregtech.api.enums.ItemList;
import ic2.api.reactor.IReactor;
import ic2.api.reactor.IReactorComponent;
import ic2.core.IC2Potion;
@@ -54,7 +53,7 @@ public class GT_RadioactiveCellIC_Item extends GT_RadioactiveCell_Item implement
for (int i = 0; i < pulses; i++) {
acceptUraniumPulse(reactor, yourStack, yourStack, x, y, x, y, heatrun);
}
- pulses += checkPulseable(reactor, x - 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x + 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y - 1, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y + 1, yourStack, x, y, heatrun);
+ checkPulseable(reactor, x - 1, y, yourStack, x, y, heatrun);checkPulseable(reactor, x + 1, y, yourStack, x, y, heatrun);checkPulseable(reactor, x, y - 1, yourStack, x, y, heatrun);checkPulseable(reactor, x, y + 1, yourStack, x, y, heatrun);
} else {
pulses += checkPulseable(reactor, x - 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x + 1, y, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y - 1, yourStack, x, y, heatrun) + checkPulseable(reactor, x, y + 1, yourStack, x, y, heatrun);
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
index 91201a2a8d..686286d7d8 100644
--- a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java
@@ -1,5 +1,6 @@
package gregtech.api.metatileentity;
+import cpw.mods.fml.common.FMLLog;
import gregtech.api.GregTech_API;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
@@ -158,13 +159,11 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
if (aID <= 0 || aID >= GregTech_API.METATILEENTITIES.length || GregTech_API.METATILEENTITIES[aID] == null) {
GT_Log.err.println("MetaID " + aID + " not loadable => locking TileEntity!");
} else {
- if (aID != 0) {
- if (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null);
- GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this);
- mTickTimer = 0;
- mID = aID;
- return true;
- }
+ if (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null);
+ GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this);
+ mTickTimer = 0;
+ mID = aID;
+ return true;
}
return false;
}
@@ -179,125 +178,124 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
}
long tTime = System.currentTimeMillis();
+ int tCode = 0;
- for (int tCode = 0; hasValidMetaTileEntity() && tCode >= 0; ) {
- try {
- switch (tCode) {
- case 0:
- tCode++;
- if (mTickTimer++ == 0) {
- oX = xCoord;
- oY = yCoord;
- oZ = zCoord;
- if (isServerSide()) for (byte i = 0; i < 6; i++)
- if (getCoverIDAtSide(i) != 0)
- if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i))))
- dropCover(i, i, true);
- worldObj.markTileEntityChunkModified(xCoord, yCoord, zCoord, this);
- mMetaTileEntity.onFirstTick(this);
- if (!hasValidMetaTileEntity()) return;
+ try { for (tCode = 0; hasValidMetaTileEntity() && tCode >= 0; ) {
+ switch (tCode) {
+ case 0:
+ tCode++;
+ if (mTickTimer++ == 0) {
+ oX = xCoord;
+ oY = yCoord;
+ oZ = zCoord;
+ if (isServerSide()) for (byte i = 0; i < 6; i++)
+ if (getCoverIDAtSide(i) != 0)
+ if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i))))
+ dropCover(i, i, true);
+ worldObj.markTileEntityChunkModified(xCoord, yCoord, zCoord, this);
+ mMetaTileEntity.onFirstTick(this);
+ if (!hasValidMetaTileEntity()) return;
+ }
+ case 1:
+ tCode++;
+ if (isClientSide()) {
+ if (mColor != oColor) {
+ mMetaTileEntity.onColorChangeClient(oColor = mColor);
+ issueTextureUpdate();
}
- case 1:
- tCode++;
- if (isClientSide()) {
- if (mColor != oColor) {
- mMetaTileEntity.onColorChangeClient(oColor = mColor);
- issueTextureUpdate();
- }
- if (mNeedsUpdate) {
- worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
- //worldObj.func_147479_m(xCoord, yCoord, zCoord);
- mNeedsUpdate = false;
- }
+ if (mNeedsUpdate) {
+ worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
+ //worldObj.func_147479_m(xCoord, yCoord, zCoord);
+ mNeedsUpdate = false;
}
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- if (isServerSide() && mTickTimer > 10) {
- for (byte i = (byte) (tCode - 2); i < 6; i++)
- if (getCoverIDAtSide(i) != 0) {
- tCode++;
- GT_CoverBehavior tCover = getCoverBehaviorAtSide(i);
- int tCoverTickRate = tCover.getTickRate(i, getCoverIDAtSide(i), mCoverData[i], this);
- if (tCoverTickRate > 0 && mTickTimer % tCoverTickRate == 0) {
- mCoverData[i] = tCover.doCoverThings(i, getInputRedstoneSignal(i), getCoverIDAtSide(i), mCoverData[i], this, mTickTimer);
- if (!hasValidMetaTileEntity()) return;
- }
+ }
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ if (isServerSide() && mTickTimer > 10) {
+ for (byte i = (byte) (tCode - 2); i < 6; i++)
+ if (getCoverIDAtSide(i) != 0) {
+ tCode++;
+ GT_CoverBehavior tCover = getCoverBehaviorAtSide(i);
+ int tCoverTickRate = tCover.getTickRate(i, getCoverIDAtSide(i), mCoverData[i], this);
+ if (tCoverTickRate > 0 && mTickTimer % tCoverTickRate == 0) {
+ mCoverData[i] = tCover.doCoverThings(i, getInputRedstoneSignal(i), getCoverIDAtSide(i), mCoverData[i], this, mTickTimer);
+ if (!hasValidMetaTileEntity()) return;
}
- mConnections = (byte) (mMetaTileEntity.mConnections | (mConnections & ~63));
- if ((mConnections & -64) == 64 && getRandomNumber(1000) == 0) {
- mConnections = (byte) ((mConnections & ~64) | -128);
}
+ mConnections = (byte) (mMetaTileEntity.mConnections | (mConnections & ~63));
+ if ((mConnections & -64) == 64 && getRandomNumber(1000) == 0) {
+ mConnections = (byte) ((mConnections & ~64) | -128);
+ }
+ }
+ case 8:
+ tCode = 9;
+ mMetaTileEntity.onPreTick(this, mTickTimer);
+ if (!hasValidMetaTileEntity()) return;
+ case 9:
+ tCode++;
+ if (isServerSide()) {
+ if (mTickTimer == 10) {
+ for (byte i = 0; i < 6; i++)
+ mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
+ issueBlockUpdate();
}
- case 8:
- tCode = 9;
- mMetaTileEntity.onPreTick(this, mTickTimer);
- if (!hasValidMetaTileEntity()) return;
- case 9:
- tCode++;
- if (isServerSide()) {
- if (mTickTimer == 10) {
- for (byte i = 0; i < 6; i++)
- mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
- issueBlockUpdate();
- }
- if (xCoord != oX || yCoord != oY || zCoord != oZ) {
- oX = xCoord;
- oY = yCoord;
- oZ = zCoord;
- issueClientUpdate();
- clearTileEntityBuffer();
- }
+ if (xCoord != oX || yCoord != oY || zCoord != oZ) {
+ oX = xCoord;
+ oY = yCoord;
+ oZ = zCoord;
+ issueClientUpdate();
+ clearTileEntityBuffer();
}
- case 10:
- tCode++;
- mMetaTileEntity.onPostTick(this, mTickTimer);
- if (!hasValidMetaTileEntity()) return;
- case 11:
- tCode++;
- if (isServerSide()) {
- if (mTickTimer % 10 == 0) {
- if (mSendClientData) {
- NW.sendPacketToAllPlayersInRange(worldObj, new GT_Packet_TileEntity(xCoord, (short) yCoord, zCoord, mID, mCoverSides[0], mCoverSides[1], mCoverSides[2], mCoverSides[3], mCoverSides[4], mCoverSides[5], oTextureData = mConnections, oUpdateData = hasValidMetaTileEntity() ? mMetaTileEntity.getUpdateData() : 0, oRedstoneData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0)), oColor = mColor), xCoord, zCoord);
- mSendClientData = false;
- }
+ }
+ case 10:
+ tCode++;
+ mMetaTileEntity.onPostTick(this, mTickTimer);
+ if (!hasValidMetaTileEntity()) return;
+ case 11:
+ tCode++;
+ if (isServerSide()) {
+ if (mTickTimer % 10 == 0) {
+ if (mSendClientData) {
+ NW.sendPacketToAllPlayersInRange(worldObj, new GT_Packet_TileEntity(xCoord, (short) yCoord, zCoord, mID, mCoverSides[0], mCoverSides[1], mCoverSides[2], mCoverSides[3], mCoverSides[4], mCoverSides[5], oTextureData = mConnections, oUpdateData = hasValidMetaTileEntity() ? mMetaTileEntity.getUpdateData() : 0, oRedstoneData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0)), oColor = mColor), xCoord, zCoord);
+ mSendClientData = false;
}
+ }
- if (mTickTimer > 10) {
- if (mConnections != oTextureData) sendBlockEvent((byte) 0, oTextureData = mConnections);
- byte tData = mMetaTileEntity.getUpdateData();
- if (tData != oUpdateData) sendBlockEvent((byte) 1, oUpdateData = tData);
- if (mColor != oColor) sendBlockEvent((byte) 2, oColor = mColor);
- tData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0));
- if (tData != oRedstoneData) sendBlockEvent((byte) 3, oRedstoneData = tData);
- }
+ if (mTickTimer > 10) {
+ if (mConnections != oTextureData) sendBlockEvent((byte) 0, oTextureData = mConnections);
+ byte tData = mMetaTileEntity.getUpdateData();
+ if (tData != oUpdateData) sendBlockEvent((byte) 1, oUpdateData = tData);
+ if (mColor != oColor) sendBlockEvent((byte) 2, oColor = mColor);
+ tData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0));
+ if (tData != oRedstoneData) sendBlockEvent((byte) 3, oRedstoneData = tData);
+ }
- if (mNeedsBlockUpdate) {
- worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockOffset(0, 0, 0));
- mNeedsBlockUpdate = false;
- }
+ if (mNeedsBlockUpdate) {
+ worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockOffset(0, 0, 0));
+ mNeedsBlockUpdate = false;
}
- default:
- tCode = -1;
- break;
- }
- } catch (Throwable e) {
- 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);
+ }
+ default:
+ tCode = -1;
}
}
+ } 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);
+ }
if (isServerSide() && hasValidMetaTileEntity()) {
tTime = System.currentTimeMillis() - tTime;
if (mTimeStatistics.length > 0)
mTimeStatistics[mTimeStatisticsIndex = (mTimeStatisticsIndex + 1) % mTimeStatistics.length] = (int) tTime;
if (tTime > 0 && tTime > GregTech_API.MILLISECOND_THRESHOLD_UNTIL_LAG_WARNING && mTickTimer > 1000 && getMetaTileEntity().doTickProfilingMessageDuringThisTick() && mLagWarningCount++ < 10)
- System.out.println("WARNING: Possible Lag Source at [" + xCoord + ", " + yCoord + ", " + zCoord + "] in Dimension " + worldObj.provider.dimensionId + " with " + tTime + "ms caused by an instance of " + getMetaTileEntity().getClass());
+ FMLLog.warning("WARNING: Possible Lag Source at [%s,%s,%s] in Dimension %s with %s ms caused by an instance of %s", xCoord, yCoord, zCoord, worldObj.provider.dimensionId, tTime, getMetaTileEntity().getClass());
}
mWorkUpdate = mInventoryChanged = false;
@@ -311,7 +309,7 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
public final void receiveMetaTileEntityData(short aID, int aCover0, int aCover1, int aCover2, int aCover3, int aCover4, int aCover5, byte aTextureData, byte aUpdateData, byte aRedstoneData, byte aColorData) {
issueTextureUpdate();
- if (mID != aID && aID > 0) {
+ if (aID > 0 && mID != aID) {
mID = aID;
createNewMetatileEntity(mID);
}
@@ -357,13 +355,13 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
if (aValue > 16 || aValue < 0) aValue = 0;
mColor = (byte) aValue;
break;
- case 3:
- mSidedRedstone[0] = (byte) ((aValue & 1) > 0 ? 15 : 0);
- mSidedRedstone[1] = (byte) ((aValue & 2) > 0 ? 15 : 0);
- mSidedRedstone[2] = (byte) ((aValue & 4) > 0 ? 15 : 0);
- mSidedRedstone[3] = (byte) ((aValue & 8) > 0 ? 15 : 0);
- mSidedRedstone[4] = (byte) ((aValue & 16) > 0 ? 15 : 0);
- mSidedRedstone[5] = (byte) ((aValue & 32) > 0 ? 15 : 0);
+ case 3: //int X & Y = 0 or Y; Y -> {1,2,4,8,16,32}; byte type analogy
+ mSidedRedstone[0] = (byte) ((aValue & 1) == 1 ? 15 : 0);
+ mSidedRedstone[1] = (byte) ((aValue & 2) == 2 ? 15 : 0);
+ mSidedRedstone[2] = (byte) ((aValue & 4) == 4 ? 15 : 0);
+ mSidedRedstone[3] = (byte) ((aValue & 8) == 8 ? 15 : 0);
+ mSidedRedstone[4] = (byte) ((aValue & 16) == 16 ? 15 : 0);
+ mSidedRedstone[5] = (byte) ((aValue & 32) == 32 ? 15 : 0);
break;
case 4:
if (hasValidMetaTileEntity() && mTickTimer > 20)
@@ -731,7 +729,7 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
}
protected boolean canAccessData() {
- return !isDead && hasValidMetaTileEntity();
+ return hasValidMetaTileEntity() && !isDead;
}
@Override
diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
index 9917ca62d7..bc18ff6909 100644
--- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java
@@ -206,13 +206,11 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
if (aID <= 0 || aID >= GregTech_API.METATILEENTITIES.length || GregTech_API.METATILEENTITIES[aID] == null) {
GT_Log.err.println("MetaID " + aID + " not loadable => locking TileEntity!");
} else {
- if (aID != 0) {
- if (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null);
- GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this);
- mTickTimer = 0;
- mID = aID;
- return true;
- }
+ if (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null);
+ GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this);
+ mTickTimer = 0;
+ mID = aID;
+ return true;
}
return false;
}
@@ -250,293 +248,280 @@ 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;
- for (int tCode = 0; hasValidMetaTileEntity() && tCode >= 0; ) {
- try {
- switch (tCode) {
- case 0:
- tCode++;
- if (mTickTimer++ == 0) {
- oX = xCoord;
- oY = yCoord;
- oZ = zCoord;
- if (isServerSide()) for (byte i = 0; i < 6; i++)
- if (getCoverIDAtSide(i) != 0)
- if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i))))
- dropCover(i, i, true);
-
- worldObj.markTileEntityChunkModified(xCoord, yCoord, zCoord, this);
-
- mMetaTileEntity.onFirstTick(this);
- if (!hasValidMetaTileEntity()) {
- mRunningThroughTick = false;
- return;
- }
+ try { for (tCode = 0; hasValidMetaTileEntity() && tCode >= 0; ) {
+ switch (tCode) {
+ case 0:
+ tCode++;
+ if (mTickTimer++ == 0) {
+ oX = xCoord;
+ oY = yCoord;
+ oZ = zCoord;
+ if (sidetypeS) for (byte i = 0; i < 6; i++)
+ if (getCoverIDAtSide(i) != 0)
+ if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i))))
+ dropCover(i, i, true);
+ worldObj.markTileEntityChunkModified(xCoord, yCoord, zCoord, this);
+ mMetaTileEntity.onFirstTick(this);
+ if (!hasValidMetaTileEntity()) {
+ mRunningThroughTick = false;
+ return;
+ }
+ }
+ case 1:
+ tCode++;
+ if (isClientSide()) {
+ if (mColor != oColor) {
+ mMetaTileEntity.onColorChangeClient(oColor = mColor);
+ issueTextureUpdate();
}
- case 1:
- tCode++;
- if (isClientSide()) {
- if (mColor != oColor) {
- mMetaTileEntity.onColorChangeClient(oColor = mColor);
- issueTextureUpdate();
- }
- if (mLightValue != oLightValueClient) {
- worldObj.setLightValue(EnumSkyBlock.Block, xCoord, yCoord, zCoord, mLightValue);
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord);
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord + 1, yCoord, zCoord);
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord - 1, yCoord, zCoord);
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord + 1, zCoord);
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord - 1, zCoord);
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord + 1);
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord - 1);
- oLightValueClient = mLightValue;
- issueTextureUpdate();
- }
+ if (mLightValue != oLightValueClient) {
+ worldObj.setLightValue(EnumSkyBlock.Block, xCoord, yCoord, zCoord, mLightValue);
+ worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord);
+ worldObj.updateLightByType(EnumSkyBlock.Block, xCoord + 1, yCoord, zCoord);
+ worldObj.updateLightByType(EnumSkyBlock.Block, xCoord - 1, yCoord, zCoord);
+ worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord + 1, zCoord);
+ worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord - 1, zCoord);
+ worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord + 1);
+ worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord - 1);
+ oLightValueClient = mLightValue;
+ issueTextureUpdate();
+ }
- if (mNeedsUpdate) {
- worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
- //worldObj.func_147479_m(xCoord, yCoord, zCoord);
- mNeedsUpdate = false;
- }
+ if (mNeedsUpdate) {
+ worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
+ //worldObj.func_147479_m(xCoord, yCoord, zCoord);
+ mNeedsUpdate = false;
}
- case 2:
- case 3:
- case 4:
- case 5:
- case 6:
- case 7:
- if (isServerSide() && mTickTimer > 10) {
- for (byte i = (byte) (tCode - 2); i < 6; i++)
- if (getCoverIDAtSide(i) != 0) {
- tCode++;
- GT_CoverBehavior tCover = getCoverBehaviorAtSide(i);
- int tCoverTickRate = tCover.getTickRate(i, getCoverIDAtSide(i), mCoverData[i], this);
- if (tCoverTickRate > 0 && mTickTimer % tCoverTickRate == 0) {
- mCoverData[i] = tCover.doCoverThings(i, getInputRedstoneSignal(i), getCoverIDAtSide(i), mCoverData[i], this, mTickTimer);
- if (!hasValidMetaTileEntity()) {
- mRunningThroughTick = false;
- return;
- }
+ }
+ case 2:
+ case 3:
+ case 4:
+ case 5:
+ case 6:
+ case 7:
+ if (sidetypeS && mTickTimer > 10) {
+ for (byte i = (byte) (tCode - 2); i < 6; i++)
+ if (getCoverIDAtSide(i) != 0) {
+ tCode++;
+ GT_CoverBehavior tCover = getCoverBehaviorAtSide(i);
+ int tCoverTickRate = tCover.getTickRate(i, getCoverIDAtSide(i), mCoverData[i], this);
+ if (tCoverTickRate > 0 && mTickTimer % tCoverTickRate == 0) {
+ mCoverData[i] = tCover.doCoverThings(i, getInputRedstoneSignal(i), getCoverIDAtSide(i), mCoverData[i], this, mTickTimer);
+ if (!hasValidMetaTileEntity()) {
+ mRunningThroughTick = false;
+ return;
}
}
+ }
+ }
+ case 8:
+ tCode = 9;
+ if (sidetypeS) {
+ if (++mAverageEUInputIndex >= mAverageEUInput.length) mAverageEUInputIndex = 0;
+ if (++mAverageEUOutputIndex >= mAverageEUOutput.length) mAverageEUOutputIndex = 0;
+
+ mAverageEUInput[mAverageEUInputIndex] = 0;
+ mAverageEUOutput[mAverageEUOutputIndex] = 0;
+ }
+ case 9:
+ tCode++;
+ mMetaTileEntity.onPreTick(this, mTickTimer);
+ if (!hasValidMetaTileEntity()) {
+ mRunningThroughTick = false;
+ return;
+ }
+ case 10:
+ tCode++;
+ if (sidetypeS) {
+ if (mRedstone != oRedstone || mTickTimer == 10) {
+ for (byte i = 0; i < 6; i++)
+ mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
+ oRedstone = mRedstone;
+ issueBlockUpdate();
}
- case 8:
- tCode = 9;
- if (isServerSide()) {
- if (++mAverageEUInputIndex >= mAverageEUInput.length) mAverageEUInputIndex = 0;
- if (++mAverageEUOutputIndex >= mAverageEUOutput.length) mAverageEUOutputIndex = 0;
-
- mAverageEUInput[mAverageEUInputIndex] = 0;
- mAverageEUOutput[mAverageEUOutputIndex] = 0;
+
+ if (xCoord != oX || yCoord != oY || zCoord != oZ) {
+ oX = xCoord;
+ oY = yCoord;
+ oZ = zCoord;
+ issueClientUpdate();
+ clearTileEntityBuffer();
}
- case 9:
- tCode++;
- mMetaTileEntity.onPreTick(this, mTickTimer);
- if (!hasValidMetaTileEntity()) {
- mRunningThroughTick = false;
- return;
+
+ if (mFacing != oFacing) {
+ oFacing = mFacing;
+ for (byte i = 0; i < 6; i++)
+ if (getCoverIDAtSide(i) != 0)
+ if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i))))
+ dropCover(i, i, true);
+ issueBlockUpdate();
}
- case 10:
- tCode++;
- if (isServerSide()) {
- if (mRedstone != oRedstone || mTickTimer == 10) {
- for (byte i = 0; i < 6; i++)
- mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
- oRedstone = mRedstone;
- issueBlockUpdate();
- }
- if (xCoord != oX || yCoord != oY || zCoord != oZ) {
- oX = xCoord;
- oY = yCoord;
- oZ = zCoord;
- issueClientUpdate();
- clearTileEntityBuffer();
- }
+ if (mTickTimer > 20 && mMetaTileEntity.isElectric()) {
+ mAcceptedAmperes = 0;
- if (mFacing != oFacing) {
- oFacing = mFacing;
- for (byte i = 0; i < 6; i++)
- if (getCoverIDAtSide(i) != 0)
- if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i))))
- dropCover(i, i, true);
- issueBlockUpdate();
+ if (getOutputVoltage() != oOutput) {
+ oOutput = getOutputVoltage();
}
- if (mTickTimer > 20 && mMetaTileEntity.isElectric()) {
- mAcceptedAmperes = 0;
-
- if (getOutputVoltage() != oOutput) {
- oOutput = getOutputVoltage();
- }
-
- if (mMetaTileEntity.isEnetOutput() || mMetaTileEntity.isEnetInput()) {
- for (byte i = 0; i < 6; i++) {
- boolean
- temp = isEnergyInputSide(i);
- if (temp != mActiveEUInputs[i]) {
- mActiveEUInputs[i] = temp;
- }
- temp = isEnergyOutputSide(i);
- if (temp != mActiveEUOutputs[i]) {
- mActiveEUOutputs[i] = temp;
- }
+ if (mMetaTileEntity.isEnetOutput() || mMetaTileEntity.isEnetInput()) {
+ for (byte i = 0; i < 6; i++) {
+ boolean
+ temp = isEnergyInputSide(i);
+ if (temp != mActiveEUInputs[i]) {
+ mActiveEUInputs[i] = temp;
+ }
+ temp = isEnergyOutputSide(i);
+ if (temp != mActiveEUOutputs[i]) {
+ mActiveEUOutputs[i] = temp;
}
}
+ }
- if (mMetaTileEntity.isEnetOutput() && oOutput > 0) {
- long tOutputVoltage = Math.max(oOutput, oOutput + (1 << GT_Utility.getTier(oOutput))), tUsableAmperage = Math.min(getOutputAmperage(), (getStoredEU() - mMetaTileEntity.getMinimumStoredEU()) / tOutputVoltage);
- if (tUsableAmperage > 0) {
- long tEU = tOutputVoltage * IEnergyConnected.Util.emitEnergyToNetwork(oOutput, tUsableAmperage, this);
- mAverageEUOutput[mAverageEUOutputIndex] += tEU;
- decreaseStoredEU(tEU, true);
- }
+ if (mMetaTileEntity.isEnetOutput() && oOutput > 0) {
+ long tOutputVoltage = Math.max(oOutput, oOutput + (1 << GT_Utility.getTier(oOutput))), tUsableAmperage = Math.min(getOutputAmperage(), (getStoredEU() - mMetaTileEntity.getMinimumStoredEU()) / tOutputVoltage);
+ if (tUsableAmperage > 0) {
+ long tEU = tOutputVoltage * IEnergyConnected.Util.emitEnergyToNetwork(oOutput, tUsableAmperage, this);
+ mAverageEUOutput[mAverageEUOutputIndex] += tEU;
+ decreaseStoredEU(tEU, true);
+ }
+ }
+ if (getEUCapacity() > 0) {
+ if (GregTech_API.sMachineFireExplosions && getRandomNumber(1000) == 0) {
+ Block tBlock = getBlockAtSide((byte) getRandomNumber(6));
+ if (tBlock instanceof BlockFire) doEnergyExplosion();
}
- if (getEUCapacity() > 0) {
- if (GregTech_API.sMachineFireExplosions && getRandomNumber(1000) == 0) {
- Block tBlock = getBlockAtSide((byte) getRandomNumber(6));
- if (tBlock != null && tBlock instanceof BlockFire) doEnergyExplosion();
- }
- if (!hasValidMetaTileEntity()) {
- mRunningThroughTick = false;
- return;
- }
+ if (!hasValidMetaTileEntity()) {
+ mRunningThroughTick = false;
+ return;
+ }
- if (getRandomNumber(1000) == 0) {
- if ((getCoverIDAtSide((byte) 1) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord) - 2 < yCoord)
- || (getCoverIDAtSide((byte) 2) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord - 1) - 1 < yCoord)
- || (getCoverIDAtSide((byte) 3) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord + 1) - 1 < yCoord)
- || (getCoverIDAtSide((byte) 4) == 0 && worldObj.getPrecipitationHeight(xCoord - 1, zCoord) - 1 < yCoord)
- || (getCoverIDAtSide((byte) 5) == 0 && worldObj.getPrecipitationHeight(xCoord + 1, zCoord) - 1 < yCoord)) {
- if (GregTech_API.sMachineRainExplosions && worldObj.isRaining() && getBiome().rainfall > 0) {
- if (getRandomNumber(10) == 0) {
- try {
- GT_Mod.instance.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather");
- } catch (Exception e) {
- }
- doEnergyExplosion();
- } else setOnFire();
- }
- if (!hasValidMetaTileEntity()) {
- mRunningThroughTick = false;
- return;
- }
- if (GregTech_API.sMachineThunderExplosions && worldObj.isThundering() && getBiome().rainfall > 0 && getRandomNumber(3) == 0) {
- try {
- GT_Mod.instance.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather");
- } catch (Exception e) {
- }
+ if (getRandomNumber(1000) == 0) {
+ if ((getCoverIDAtSide((byte) 1) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord) - 2 < yCoord)
+ || (getCoverIDAtSide((byte) 2) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord - 1) - 1 < yCoord)
+ || (getCoverIDAtSide((byte) 3) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord + 1) - 1 < yCoord)
+ || (getCoverIDAtSide((byte) 4) == 0 && worldObj.getPrecipitationHeight(xCoord - 1, zCoord) - 1 < yCoord)
+ || (getCoverIDAtSide((byte) 5) == 0 && worldObj.getPrecipitationHeight(xCoord + 1, zCoord) - 1 < yCoord)) {
+ if (GregTech_API.sMachineRainExplosions && worldObj.isRaining() && getBiome().rainfall > 0) {
+ if (getRandomNumber(10) == 0) {
+ GT_Mod.instance.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather");
doEnergyExplosion();
- }
+ } else setOnFire();
}
- }
- }
- }
-
- if (!hasValidMetaTileEntity()) {
- mRunningThroughTick = false;
- return;
- }
- }
- case 11:
- tCode++;
- if (isServerSide()) {
- if (mMetaTileEntity.dechargerSlotCount() > 0 && getStoredEU() < getEUCapacity()) {
- for (int i = mMetaTileEntity.dechargerSlotStartIndex(), k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) {
- if (mMetaTileEntity.mInventory[i] != null && getStoredEU() < getEUCapacity()) {
- dischargeItem(mMetaTileEntity.mInventory[i]);
- if(ic2.api.info.Info.itemEnergy.getEnergyValue(mMetaTileEntity.mInventory[i])>0){
- if((getStoredEU() + ic2.api.info.Info.itemEnergy.getEnergyValue(mMetaTileEntity.mInventory[i]))<getEUCapacity()){
- increaseStoredEnergyUnits((long)ic2.api.info.Info.itemEnergy.getEnergyValue(mMetaTileEntity.mInventory[i]),false);
- mMetaTileEntity.mInventory[i].stackSize--;
- }
+ if (!hasValidMetaTileEntity()) {
+ mRunningThroughTick = false;
+ return;
+ }
+ if (GregTech_API.sMachineThunderExplosions && worldObj.isThundering() && getBiome().rainfall > 0 && getRandomNumber(3) == 0) {
+ GT_Mod.instance.achievements.issueAchievement(this.getWorldObj().getPlayerEntityByName(mOwnerName), "badweather");
+ doEnergyExplosion();
}
- if (mMetaTileEntity.mInventory[i].stackSize <= 0)
- mMetaTileEntity.mInventory[i] = null;
- mInventoryChanged = true;
- }
- }
- }
- }
- case 12:
- tCode++;
- if (isServerSide()) {
- if (mMetaTileEntity.rechargerSlotCount() > 0 && getStoredEU() > 0) {
- for (int i = mMetaTileEntity.rechargerSlotStartIndex(), k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) {
- if (getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) {
- chargeItem(mMetaTileEntity.mInventory[i]);
- if (mMetaTileEntity.mInventory[i].stackSize <= 0)
- mMetaTileEntity.mInventory[i] = null;
- mInventoryChanged = true;
}
}
}
}
- case 13:
- tCode++;
- updateStatus();
- if (!hasValidMetaTileEntity()) {
- mRunningThroughTick = false;
- return;
- }
- case 14:
- tCode++;
- mMetaTileEntity.onPostTick(this, mTickTimer);
+
if (!hasValidMetaTileEntity()) {
mRunningThroughTick = false;
return;
}
- case 15:
- tCode++;
- if (isServerSide()) {
- if (mTickTimer % 10 == 0) {
- if (mSendClientData) {
- NW.sendPacketToAllPlayersInRange(worldObj, new GT_Packet_TileEntity(xCoord, (short) yCoord, zCoord, mID, mCoverSides[0], mCoverSides[1], mCoverSides[2], mCoverSides[3], mCoverSides[4], mCoverSides[5], oTextureData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0)), oUpdateData = hasValidMetaTileEntity() ? mMetaTileEntity.getUpdateData() : 0, oRedstoneData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0)), oColor = mColor), xCoord, zCoord);
- mSendClientData = false;
+ }
+ case 11:
+ tCode++;
+ if (sidetypeS) {
+ if (mMetaTileEntity.dechargerSlotCount() > 0 && getStoredEU() < getEUCapacity()) {
+ for (int i = mMetaTileEntity.dechargerSlotStartIndex(), k = mMetaTileEntity.dechargerSlotCount() + i; i < k; i++) {
+ if (mMetaTileEntity.mInventory[i] != null && getStoredEU() < getEUCapacity()) {
+ dischargeItem(mMetaTileEntity.mInventory[i]);
+ if (mMetaTileEntity.mInventory[i].stackSize <= 0)
+ mMetaTileEntity.mInventory[i] = null;
+ mInventoryChanged = true;
}
}
-
- if (mTickTimer > 10) {
- byte tData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0));
- if (tData != oTextureData) sendBlockEvent((byte) 0, oTextureData = tData);
- tData = mMetaTileEntity.getUpdateData();
- if (tData != oUpdateData) sendBlockEvent((byte) 1, oUpdateData = tData);
- if (mColor != oColor) sendBlockEvent((byte) 2, oColor = mColor);
- tData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0));
- if (tData != oRedstoneData) sendBlockEvent((byte) 3, oRedstoneData = tData);
- if (mLightValue != oLightValue) {
- worldObj.setLightValue(EnumSkyBlock.Block, xCoord, yCoord, zCoord, mLightValue);
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord);
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord + 1, yCoord, zCoord);
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord - 1, yCoord, zCoord);
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord + 1, zCoord);
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord - 1, zCoord);
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord + 1);
- worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord - 1);
- issueTextureUpdate();
- sendBlockEvent((byte) 7, oLightValue = mLightValue);
+ }
+ }
+ case 12:
+ tCode++;
+ if (sidetypeS) {
+ if (mMetaTileEntity.rechargerSlotCount() > 0 && getStoredEU() > 0) {
+ for (int i = mMetaTileEntity.rechargerSlotStartIndex(), k = mMetaTileEntity.rechargerSlotCount() + i; i < k; i++) {
+ if (getStoredEU() > 0 && mMetaTileEntity.mInventory[i] != null) {
+ chargeItem(mMetaTileEntity.mInventory[i]);
+ if (mMetaTileEntity.mInventory[i].stackSize <= 0)
+ mMetaTileEntity.mInventory[i] = null;
+ mInventoryChanged = true;
}
}
+ }
+ }
+ case 13:
+ tCode++;
+ updateStatus();
+ if (!hasValidMetaTileEntity()) {
+ mRunningThroughTick = false;
+ return;
+ }
+ case 14:
+ tCode++;
+ mMetaTileEntity.onPostTick(this, mTickTimer);
+ if (!hasValidMetaTileEntity()) {
+ mRunningThroughTick = false;
+ return;
+ }
+ case 15:
+ tCode++;
+ if (sidetypeS) {
+ if (mTickTimer % 10 == 0) {
+ if (mSendClientData) {
+ NW.sendPacketToAllPlayersInRange(worldObj, new GT_Packet_TileEntity(xCoord, (short) yCoord, zCoord, mID, mCoverSides[0], mCoverSides[1], mCoverSides[2], mCoverSides[3], mCoverSides[4], mCoverSides[5], oTextureData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0)), oUpdateData = hasValidMetaTileEntity() ? mMetaTileEntity.getUpdateData() : 0, oRedstoneData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0)), oColor = mColor), xCoord, zCoord);
+ mSendClientData = false;
+ }
+ }
- if (mNeedsBlockUpdate) {
- worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockOffset(0, 0, 0));
- mNeedsBlockUpdate = false;
+ if (mTickTimer > 10) {
+ byte tData = (byte) ((mFacing & 7) | (mActive ? 8 : 0) | (mRedstone ? 16 : 0) | (mLockUpgrade ? 32 : 0));
+ if (tData != oTextureData) sendBlockEvent((byte) 0, oTextureData = tData);
+ tData = mMetaTileEntity.getUpdateData();
+ if (tData != oUpdateData) sendBlockEvent((byte) 1, oUpdateData = tData);
+ if (mColor != oColor) sendBlockEvent((byte) 2, oColor = mColor);
+ tData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0));
+ if (tData != oRedstoneData) sendBlockEvent((byte) 3, oRedstoneData = tData);
+ if (mLightValue != oLightValue) {
+ worldObj.setLightValue(EnumSkyBlock.Block, xCoord, yCoord, zCoord, mLightValue);
+ worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord);
+ worldObj.updateLightByType(EnumSkyBlock.Block, xCoord + 1, yCoord, zCoord);
+ worldObj.updateLightByType(EnumSkyBlock.Block, xCoord - 1, yCoord, zCoord);
+ worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord + 1, zCoord);
+ worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord - 1, zCoord);
+ worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord + 1);
+ worldObj.updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord - 1);
+ issueTextureUpdate();
+ sendBlockEvent((byte) 7, oLightValue = mLightValue);
}
}
- default:
- tCode = -1;
- break;
- }
- } catch (Throwable e) {
- 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 (mNeedsBlockUpdate) {
+ worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockOffset(0, 0, 0));
+ mNeedsBlockUpdate = false;
+ }
+ }
+ default:
+ tCode = -1;
}
}
+ } 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);
+ }
- if (isServerSide() && hasValidMetaTileEntity()) {
+ if (sidetypeS && hasValidMetaTileEntity()) {
tTime = System.currentTimeMillis() - tTime;
if (mTimeStatistics.length > 0)
mTimeStatistics[mTimeStatisticsIndex = (mTimeStatisticsIndex + 1) % mTimeStatistics.length] = (int) tTime;
@@ -595,7 +580,7 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
mFacing = (byte) (aValue & 7);
mActive = ((aValue & 8) != 0);
mRedstone = ((aValue & 16) != 0);
-// mLockUpgrade = ((aValue&32) != 0);
+ //mLockUpgrade = ((aValue&32) != 0);
break;
case 1:
if (hasValidMetaTileEntity()) mMetaTileEntity.onValueUpdate((byte) aValue);
@@ -604,13 +589,13 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
if (aValue > 16 || aValue < 0) aValue = 0;
mColor = (byte) aValue;
break;
- case 3:
- mSidedRedstone[0] = (byte) ((aValue & 1) > 0 ? 15 : 0);
- mSidedRedstone[1] = (byte) ((aValue & 2) > 0 ? 15 : 0);
- mSidedRedstone[2] = (byte) ((aValue & 4) > 0 ? 15 : 0);
- mSidedRedstone[3] = (byte) ((aValue & 8) > 0 ? 15 : 0);
- mSidedRedstone[4] = (byte) ((aValue & 16) > 0 ? 15 : 0);
- mSidedRedstone[5] = (byte) ((aValue & 32) > 0 ? 15 : 0);
+ case 3: //int X & Y = 0 or Y; Y -> {1,2,4,8,16,32}; byte type analogy
+ mSidedRedstone[0] = (byte) ((aValue & 1) == 1 ? 15 : 0);
+ mSidedRedstone[1] = (byte) ((aValue & 2) == 2 ? 15 : 0);
+ mSidedRedstone[2] = (byte) ((aValue & 4) == 4 ? 15 : 0);
+ mSidedRedstone[3] = (byte) ((aValue & 8) == 8 ? 15 : 0);
+ mSidedRedstone[4] = (byte) ((aValue & 16) == 16 ? 15 : 0);
+ mSidedRedstone[5] = (byte) ((aValue & 32) == 32 ? 15 : 0);
break;
case 4:
if (hasValidMetaTileEntity() && mTickTimer > 20)
@@ -1083,8 +1068,8 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
public boolean playerOwnsThis(EntityPlayer aPlayer, boolean aCheckPrecicely) {
if (!canAccessData()) return false;
- if (aCheckPrecicely || privateAccess() || mOwnerName.equals(""))
- if (mOwnerName.equals("") && isServerSide()) setOwnerName(aPlayer.getDisplayName());
+ if (aCheckPrecicely || privateAccess() || (mOwnerName.length() == 0))
+ if ((mOwnerName.length() == 0) && isServerSide()) setOwnerName(aPlayer.getDisplayName());
else if (privateAccess() && !aPlayer.getDisplayName().equals("Player") && !mOwnerName.equals("Player") && !mOwnerName.equals(aPlayer.getDisplayName()))
return false;
return true;
@@ -1110,7 +1095,10 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE
try {
mReleaseEnergy = true;
IEnergyConnected.Util.emitEnergyToNetwork(V[5], Math.max(1, getStoredEU() / V[5]), this);
- } catch (Exception e) {/* Fun Fact: all these "do nothing" Comments you see in my Code, are just there to let Eclipse shut up about the intended empty Brackets, but I need eclipse to yell at me in some of the regular Cases where I forget to add Code */}
+ } catch (Exception e) {
+ /* Fun Fact: all these "do nothing" Comments you see in my Code, are just there to let Eclipse shut up about the intended empty Brackets, but I need eclipse to yell at me in some of the regular Cases where I forget to add Code */
+ GT_Log.out.println("mReleaseEnergy = true;\nIEnergyConnected.Util.emitEnergyToNetwork(V[5], Math.max(1, getStoredEU() / V[5]), this);");
+ }
}
mReleaseEnergy = false;
// Normal Explosion Code
diff --git a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java
index ac3da1a60a..b34483c31b 100644
--- a/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/MetaPipeEntity.java
@@ -30,6 +30,7 @@ import net.minecraftforge.fluids.FluidTankInfo;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
+import java.util.Locale;
import static gregtech.api.enums.GT_Values.GT;
import static gregtech.api.enums.GT_Values.V;
@@ -83,7 +84,7 @@ public abstract class MetaPipeEntity implements IMetaTileEntity {
} else {
throw new IllegalArgumentException("MetaMachine-Slot Nr. " + aID + " is already occupied!");
}
- mName = aBasicName.replaceAll(" ", "_").toLowerCase();
+ mName = aBasicName.replaceAll(" ", "_").toLowerCase(Locale.ENGLISH);
setBaseMetaTileEntity(new BaseMetaPipeEntity());
getBaseMetaTileEntity().setMetaTileID((short) aID);
GT_LanguageManager.addStringLocalization("gt.blockmachines." + mName + ".name", aRegionalName);
diff --git a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java
index e410c3cf12..662dc59d80 100644
--- a/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java
+++ b/src/main/java/gregtech/api/metatileentity/MetaTileEntity.java
@@ -30,6 +30,7 @@ import net.minecraftforge.fluids.FluidTankInfo;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
+import java.util.Locale;
import static gregtech.api.enums.GT_Values.GT;
import static gregtech.api.enums.GT_Values.V;
@@ -79,7 +80,7 @@ public abstract class MetaTileEntity implements IMetaTileEntity {
} else {
throw new IllegalArgumentException("MetaMachine-Slot Nr. " + aID + " is already occupied!");
}
- mName = aBasicName.replaceAll(" ", "_").toLowerCase();
+ mName = aBasicName.replaceAll(" ", "_").toLowerCase(Locale.ENGLISH);
setBaseMetaTileEntity(GregTech_API.constructBaseMetaTileEntity());
getBaseMetaTileEntity().setMetaTileID((short) aID);
GT_LanguageManager.addStringLocalization("gt.blockmachines." + mName + ".name", aRegionalName);
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java
index fb863ef37a..9b0e386df4 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_BasicMachine_GT_Recipe.java
@@ -1,7 +1,5 @@
package gregtech.api.metatileentity.implementations;
-import java.util.Random;
-
import gregtech.api.enums.*;
import gregtech.api.gui.GT_Container_BasicMachine;
import gregtech.api.gui.GT_GUIContainer_BasicMachine;
@@ -19,6 +17,9 @@ import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
+import java.util.Locale;
+import java.util.Random;
+
import static gregtech.api.enums.GT_Values.V;
import static gregtech.api.enums.GT_Values.W;
@@ -35,7 +36,7 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_
private final boolean mSharedTank, mRequiresFluidForFiltering;
private final byte mGUIParameterA, mGUIParameterB;
public GT_MetaTileEntity_BasicMachine_GT_Recipe(int aID, String aName, String aNameRegional, int aTier, String aDescription, GT_Recipe_Map aRecipes, int aInputSlots, int aOutputSlots, int aTankCapacity, int aGUIParameterA, int aGUIParameterB, String aGUIName, String aSound, boolean aSharedTank, boolean aRequiresFluidForFiltering, int aSpecialEffect, String aOverlays, Object[] aRecipe) {
- super(aID, aName, aNameRegional, aTier, aRecipes.mAmperage, aDescription, aInputSlots, aOutputSlots, aGUIName, aRecipes.mNEIName, new ITexture[]{new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase() + "/OVERLAY_SIDE_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase() + "/OVERLAY_SIDE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase() + "/OVERLAY_FRONT_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase() + "/OVERLAY_FRONT")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase() + "/OVERLAY_TOP_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase() + "/OVERLAY_TOP")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase() + "/OVERLAY_BOTTOM_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase() + "/OVERLAY_BOTTOM"))});
+ super(aID, aName, aNameRegional, aTier, aRecipes.mAmperage, aDescription, aInputSlots, aOutputSlots, aGUIName, aRecipes.mNEIName, new ITexture[]{new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_SIDE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_FRONT")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_TOP")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM_ACTIVE")), new GT_RenderedTexture(new Textures.BlockIcons.CustomIcon("basicmachines/" + aOverlays.toLowerCase(Locale.ENGLISH) + "/OVERLAY_BOTTOM"))});
mSharedTank = aSharedTank;
mTankCapacity = aTankCapacity;
mSpecialEffect = aSpecialEffect;
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java
index ee45c536b5..552d98f50b 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Maintenance.java
@@ -112,10 +112,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
}
if (mSolderingTool && aPlayer instanceof EntityPlayerMP) {
EntityPlayerMP tPlayer = (EntityPlayerMP) aPlayer;
- try {
- GT_Mod.instance.achievements.issueAchievement(tPlayer, "maintainance");
- } catch (Exception e) {
- }
+ GT_Mod.instance.achievements.issueAchievement(tPlayer, "maintainance");
}
}
diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
index 9003e441f5..be55b18b83 100644
--- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
+++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java
@@ -25,8 +25,6 @@ import net.minecraftforge.fluids.FluidStack;
import java.util.ArrayList;
-import org.apache.commons.lang3.ArrayUtils;
-
import static gregtech.api.enums.GT_Values.V;
public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
@@ -240,10 +238,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) {
if (mOutputItems != null) for (ItemStack tStack : mOutputItems)
if (tStack != null) {
- try {
- GT_Mod.instance.achievements.issueAchivementHatch(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), tStack);
- } catch (Exception e) {
- }
+ GT_Mod.instance.achievements.issueAchivementHatch(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), tStack);
addOutput(tStack);
}
if (mOutputFluids != null && mOutputFluids.length == 1) {
@@ -416,7 +411,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
if (mInventory[1].getItem() instanceof GT_MetaGenerated_Tool_01) {
NBTTagCompound tNBT = mInventory[1].getTagCompound();
if (tNBT != null) {
- NBTTagCompound tNBT2 = tNBT.getCompoundTag("GT.CraftingComponents");
+ NBTTagCompound tNBT2 = tNBT.getCompoundTag("GT.CraftingComponents");//tNBT2 dont use out if
if (!tNBT.getBoolean("mDis")) {
tNBT2 = new NBTTagCompound();
Materials tMaterial = GT_MetaGenerated_Tool.getPrimaryMaterial(mInventory[1]);
@@ -793,7 +788,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
@Override
public String[] getInfoData() {
- return new String[]{"Progress:", (mProgresstime / 20) + "secs", (mMaxProgresstime / 20) + "secs", "Efficiency:", (mEfficiency / 100.0F) + "%", "Problems:", "" + (getIdealStatus() - getRepairStatus())};
+ return new String[]{"Progress:", (mProgresstime / 20) + "secs", (mMaxProgresstime / 20) + "secs", "Efficiency:", (mEfficiency / 100.0F) + "%", "Problems:", String.valueOf((getIdealStatus() - getRepairStatus()))};
}
@Override
diff --git a/src/main/java/gregtech/api/objects/ElementStack.java b/src/main/java/gregtech/api/objects/ElementStack.java
index f3e1543614..773700f057 100644
--- a/src/main/java/gregtech/api/objects/ElementStack.java
+++ b/src/main/java/gregtech/api/objects/ElementStack.java
@@ -17,14 +17,14 @@ public class ElementStack implements Cloneable {
@Override
public ElementStack clone() {
- return new ElementStack(mElement, mAmount);
+ try { return (ElementStack) super.clone(); } catch (Exception e) { return new ElementStack(mElement, mAmount); }
}
@Override
public boolean equals(Object aObject) {
if (aObject == this) return true;
if (aObject == null) return false;
- if (aObject instanceof Element) return aObject == mElement;
+ if (aObject instanceof Element) {return aObject == mElement;}
if (aObject instanceof ElementStack)
return ((ElementStack) aObject).mElement == mElement && (mAmount < 0 || ((ElementStack) aObject).mAmount < 0 || ((ElementStack) aObject).mAmount == mAmount);
return false;
diff --git a/src/main/java/gregtech/api/objects/GT_FluidStack.java b/src/main/java/gregtech/api/objects/GT_FluidStack.java
index 3f9e52818c..bc1dd8f077 100644
--- a/src/main/java/gregtech/api/objects/GT_FluidStack.java
+++ b/src/main/java/gregtech/api/objects/GT_FluidStack.java
@@ -49,6 +49,7 @@ public class GT_FluidStack extends FluidStack {
}
}
+ @Deprecated
public void fixFluidIDForFucksSake() {
if (ForgeVersion.getBuildVersion() < 1355) {
int fluidID;
diff --git a/src/main/java/gregtech/api/objects/GT_RenderedTexture.java b/src/main/java/gregtech/api/objects/GT_RenderedTexture.java
index e1627da287..70b71cf125 100644
--- a/src/main/java/gregtech/api/objects/GT_RenderedTexture.java
+++ b/src/main/java/gregtech/api/objects/GT_RenderedTexture.java
@@ -70,10 +70,11 @@ public class GT_RenderedTexture implements ITexture, IColorModulationContainer {
Tessellator.instance.setColorRGBA((int) (mRGBa[0] * 0.5F), (int) (mRGBa[1] * 0.5F), (int) (mRGBa[2] * 0.5F), mAllowAlpha ? 255 - mRGBa[3] : 255);
IIcon aIcon = mIconContainer.getIcon();
- double d3 = aIcon.getInterpolatedU(aRenderer.renderMaxX * 16.0D);
- double d4 = aIcon.getInterpolatedU(aRenderer.renderMinX * 16.0D);
- double d5 = aIcon.getInterpolatedV(aRenderer.renderMinZ * 16.0D);
- double d6 = aIcon.getInterpolatedV(aRenderer.renderMaxZ * 16.0D);
+ float d_16 = 16.0F;
+ float d3 = (float)aIcon.getInterpolatedU(aRenderer.renderMaxX * d_16);
+ float d4 = (float)aIcon.getInterpolatedU(aRenderer.renderMinX * d_16);
+ float d5 = (float)aIcon.getInterpolatedV(aRenderer.renderMinZ * d_16);
+ float d6 = (float)aIcon.getInterpolatedV(aRenderer.renderMaxZ * d_16);
if (aRenderer.renderMinX < 0.0D || aRenderer.renderMaxX > 1.0D) {
d3 = aIcon.getMaxU();
@@ -85,24 +86,24 @@ public class GT_RenderedTexture implements ITexture, IColorModulationContainer {
d6 = aIcon.getMaxV();
}
- double d11 = aX + aRenderer.renderMinX;
- double d12 = aX + aRenderer.renderMaxX;
- double d13 = aY + aRenderer.renderMinY;
- double d14 = aZ + aRenderer.renderMinZ;
- double d15 = aZ + aRenderer.renderMaxZ;
+ float d11 = aX + (float)aRenderer.renderMinX;
+ float d12 = aX + (float)aRenderer.renderMaxX;
+ float d13 = aY + (float)aRenderer.renderMinY;
+ float d14 = aZ + (float)aRenderer.renderMinZ;
+ float d15 = aZ + (float)aRenderer.renderMaxZ;
- Tessellator.instance.addVertexWithUV(d11, d13, d15, d3, d6);
- Tessellator.instance.addVertexWithUV(d11, d13, d14, d3, d5);
- Tessellator.instance.addVertexWithUV(d12, d13, d14, d4, d5);
- Tessellator.instance.addVertexWithUV(d12, d13, d15, d4, d6);
+ Tessellator.instance.addVertexWithUV((double)d11, (double)d13, (double)d15, (double)d3, (double)d6);
+ Tessellator.instance.addVertexWithUV((double)d11, (double)d13, (double)d14, (double)d3, (double)d5);
+ Tessellator.instance.addVertexWithUV((double)d12, (double)d13, (double)d14, (double)d4, (double)d5);
+ Tessellator.instance.addVertexWithUV((double)d12, (double)d13, (double)d15, (double)d4, (double)d6);
if ((aIcon = mIconContainer.getOverlayIcon()) != null) {
Tessellator.instance.setColorRGBA(128, 128, 128, 255);
- Tessellator.instance.addVertexWithUV(d11, d13, d15, d3, d6);
- Tessellator.instance.addVertexWithUV(d11, d13, d14, d3, d5);
- Tessellator.instance.addVertexWithUV(d12, d13, d14, d4, d5);
- Tessellator.instance.addVertexWithUV(d12, d13, d15, d4, d6);
+ Tessellator.instance.addVertexWithUV((double)d11, (double)d13, (double)d15, (double)d3, (double)d6);
+ Tessellator.instance.addVertexWithUV((double)d11, (double)d13, (double)d14, (double)d3, (double)d5);
+ Tessellator.instance.addVertexWithUV((double)d12, (double)d13, (double)d14, (double)d4, (double)d5);
+ Tessellator.instance.addVertexWithUV((double)d12, (double)d13, (double)d15, (double)d4, (double)d6);
}
}
diff --git a/src/main/java/gregtech/api/objects/GT_SidedTexture.java b/src/main/java/gregtech/api/objects/GT_SidedTexture.java
index 2d27ecbc25..2b4f144393 100644
--- a/src/main/java/gregtech/api/objects/GT_SidedTexture.java
+++ b/src/main/java/gregtech/api/objects/GT_SidedTexture.java
@@ -78,10 +78,11 @@ public class GT_SidedTexture implements ITexture, IColorModulationContainer {
Tessellator.instance.setColorRGBA((int) (mRGBa[0] * 0.5F), (int) (mRGBa[1] * 0.5F), (int) (mRGBa[2] * 0.5F), mAllowAlpha ? 255 - mRGBa[3] : 255);
IIcon aIcon = mIconContainer[0].getIcon();
- double d3 = aIcon.getInterpolatedU(aRenderer.renderMaxX * 16.0D);
- double d4 = aIcon.getInterpolatedU(aRenderer.renderMinX * 16.0D);
- double d5 = aIcon.getInterpolatedV(aRenderer.renderMinZ * 16.0D);
- double d6 = aIcon.getInterpolatedV(aRenderer.renderMaxZ * 16.0D);
+ float d_16 = 16.0F;
+ float d3 = (float)aIcon.getInterpolatedU(aRenderer.renderMaxX * d_16);
+ float d4 = (float)aIcon.getInterpolatedU(aRenderer.renderMinX * d_16);
+ float d5 = (float)aIcon.getInterpolatedV(aRenderer.renderMinZ * d_16);
+ float d6 = (float)aIcon.getInterpolatedV(aRenderer.renderMaxZ * d_16);
if (aRenderer.renderMinX < 0.0D || aRenderer.renderMaxX > 1.0D) {
d3 = aIcon.getMaxU();
@@ -93,24 +94,24 @@ public class GT_SidedTexture implements ITexture, IColorModulationContainer {
d6 = aIcon.getMaxV();
}
- double d11 = aX + aRenderer.renderMinX;
- double d12 = aX + aRenderer.renderMaxX;
- double d13 = aY + aRenderer.renderMinY;
- double d14 = aZ + aRenderer.renderMinZ;
- double d15 = aZ + aRenderer.renderMaxZ;
+ float d11 = aX + (float)aRenderer.renderMinX;
+ float d12 = aX + (float)aRenderer.renderMaxX;
+ float d13 = aY + (float)aRenderer.renderMinY;
+ float d14 = aZ + (float)aRenderer.renderMinZ;
+ float d15 = aZ + (float)aRenderer.renderMaxZ;
- Tessellator.instance.addVertexWithUV(d11, d13, d15, d3, d6);
- Tessellator.instance.addVertexWithUV(d11, d13, d14, d3, d5);
- Tessellator.instance.addVertexWithUV(d12, d13, d14, d4, d5);
- Tessellator.instance.addVertexWithUV(d12, d13, d15, d4, d6);
+ Tessellator.instance.addVertexWithUV((double)d11, (double)d13, (double)d15, (double)d3, (double)d6);
+ Tessellator.instance.addVertexWithUV((double)d11, (double)d13, (double)d14, (double)d3, (double)d5);
+ Tessellator.instance.addVertexWithUV((double)d12, (double)d13, (double)d14, (double)d4, (double)d5);
+ Tessellator.instance.addVertexWithUV((double)d12, (double)d13, (double)d15, (double)d4, (double)d6);
if ((aIcon = mIconContainer[0].getOverlayIcon()) != null) {
Tessellator.instance.setColorRGBA(128, 128, 128, 255);
- d3 = aIcon.getInterpolatedU(aRenderer.renderMaxX * 16.0D);
- d4 = aIcon.getInterpolatedU(aRenderer.renderMinX * 16.0D);
- d5 = aIcon.getInterpolatedV(aRenderer.renderMinZ * 16.0D);
- d6 = aIcon.getInterpolatedV(aRenderer.renderMaxZ * 16.0D);
+ d3 = (float)aIcon.getInterpolatedU(aRenderer.renderMaxX * d_16);
+ d4 = (float)aIcon.getInterpolatedU(aRenderer.renderMinX * d_16);
+ d5 = (float)aIcon.getInterpolatedV(aRenderer.renderMinZ * d_16);
+ d6 = (float)aIcon.getInterpolatedV(aRenderer.renderMaxZ * d_16);
if (aRenderer.renderMinX < 0.0D || aRenderer.renderMaxX > 1.0D) {
d3 = aIcon.getMaxU();
@@ -122,16 +123,16 @@ public class GT_SidedTexture implements ITexture, IColorModulationContainer {
d6 = aIcon.getMaxV();
}
- d11 = aX + aRenderer.renderMinX;
- d12 = aX + aRenderer.renderMaxX;
- d13 = aY + aRenderer.renderMinY;
- d14 = aZ + aRenderer.renderMinZ;
- d15 = aZ + aRenderer.renderMaxZ;
+ d11 = aX + (float)aRenderer.renderMinX;
+ d12 = aX + (float)aRenderer.renderMaxX;
+ d13 = aY + (float)aRenderer.renderMinY;
+ d14 = aZ + (float)aRenderer.renderMinZ;
+ d15 = aZ + (float)aRenderer.renderMaxZ;
- Tessellator.instance.addVertexWithUV(d11, d13, d15, d3, d6);
- Tessellator.instance.addVertexWithUV(d11, d13, d14, d3, d5);
- Tessellator.instance.addVertexWithUV(d12, d13, d14, d4, d5);
- Tessellator.instance.addVertexWithUV(d12, d13, d15, d4, d6);
+ Tessellator.instance.addVertexWithUV((double)d11, (double)d13, (double)d15, (double)d3, (double)d6);
+ Tessellator.instance.addVertexWithUV((double)d11, (double)d13, (double)d14, (double)d3, (double)d5);
+ Tessellator.instance.addVertexWithUV((double)d12, (double)d13, (double)d14, (double)d4, (double)d5);
+ Tessellator.instance.addVertexWithUV((double)d12, (double)d13, (double)d15, (double)d4, (double)d6);
}
}
diff --git a/src/main/java/gregtech/api/objects/ItemData.java b/src/main/java/gregtech/api/objects/ItemData.java
index aedc48db5a..c9c978d7ee 100644
--- a/src/main/java/gregtech/api/objects/ItemData.java
+++ b/src/main/java/gregtech/api/objects/ItemData.java
@@ -119,6 +119,6 @@ public class ItemData {
@Override
public String toString() {
if (mPrefix == null || mMaterial == null || mMaterial.mMaterial == null) return "";
- return mPrefix.name() + mMaterial.mMaterial.name();
+ return String.valueOf(new StringBuilder().append(mPrefix.name()).append(mMaterial.mMaterial.name()));
}
} \ No newline at end of file
diff --git a/src/main/java/gregtech/api/objects/MaterialStack.java b/src/main/java/gregtech/api/objects/MaterialStack.java
index 5ddb88423a..6066d3cf23 100644
--- a/src/main/java/gregtech/api/objects/MaterialStack.java
+++ b/src/main/java/gregtech/api/objects/MaterialStack.java
@@ -17,7 +17,7 @@ public class MaterialStack implements Cloneable {
@Override
public MaterialStack clone() {
- return new MaterialStack(mMaterial, mAmount);
+ try { return (MaterialStack) super.clone(); } catch (Exception e) { return new MaterialStack(mMaterial, mAmount); }
}
@Override
@@ -32,7 +32,15 @@ public class MaterialStack implements Cloneable {
@Override
public String toString() {
- return (mMaterial.mMaterialList.size() > 1 && mAmount > 1 ? "(" : "") + mMaterial.getToolTip(true) + (mMaterial.mMaterialList.size() > 1 && mAmount > 1 ? ")" : "") + (mAmount > 1 ? mAmount : "");
+ String temp1 = "", temp2 = mMaterial.getToolTip(true), temp3 = "", temp4 = "";
+ if (mAmount > 1) {
+ temp4 = String.valueOf(mAmount);
+ if (mMaterial.mMaterialList.size() > 1) {
+ temp1 = "(";
+ temp3 = ")";
+ }
+ }
+ return String.valueOf(new StringBuilder().append(temp1).append(temp2).append(temp3).append(temp4));
}
@Override
diff --git a/src/main/java/gregtech/api/util/GT_LanguageManager.java b/src/main/java/gregtech/api/util/GT_LanguageManager.java
index a60189ea71..9937d0c069 100644
--- a/src/main/java/gregtech/api/util/GT_LanguageManager.java
+++ b/src/main/java/gregtech/api/util/GT_LanguageManager.java
@@ -75,9 +75,11 @@ public class GT_LanguageManager {
public static String getTranslation(String aKey, String aSeperator) {
if (aKey == null) return E;
String rTranslation = E;
+ StringBuilder rTranslationSB = new StringBuilder(rTranslation);
for (String tString : aKey.split(aSeperator)) {
- rTranslation += getTranslation(tString);
+ rTranslationSB.append(getTranslation(tString));
}
+ rTranslation = String.valueOf(rTranslationSB);
return rTranslation;
}
diff --git a/src/main/java/gregtech/api/util/GT_ModHandler.java b/src/main/java/gregtech/api/util/GT_ModHandler.java
index be85ca29ce..25992d2739 100644
--- a/src/main/java/gregtech/api/util/GT_ModHandler.java
+++ b/src/main/java/gregtech/api/util/GT_ModHandler.java
@@ -1267,33 +1267,31 @@ public class GT_ModHandler {
for (IRecipe tRecipe : (ArrayList<IRecipe>) CraftingManager.getInstance().getRecipeList()) {
ItemStack tStack = tRecipe.getRecipeOutput();
if (GT_Utility.isStackValid(tStack) && tStack.getMaxStackSize() == 1 && tStack.getMaxDamage() > 0 && !(tStack.getItem() instanceof ItemBlock) && !(tStack.getItem() instanceof IReactorComponent) && !isElectricItem(tStack) && !GT_Utility.isStackInList(tStack, sNonReplaceableItems)) {
- if (!(tRecipe instanceof ShapelessRecipes || tRecipe instanceof ShapelessOreRecipe)) {
- if (tRecipe instanceof ShapedOreRecipe) {
- boolean temp = true;
- for (Object tObject : ((ShapedOreRecipe) tRecipe).getInput())
- if (tObject != null) {
- if (tObject instanceof ItemStack && (((ItemStack) tObject).getItem() == null || ((ItemStack) tObject).getMaxStackSize() < 2 || ((ItemStack) tObject).getMaxDamage() > 0 || ((ItemStack) tObject).getItem() instanceof ItemBlock)) {
- temp = false;
- break;
- }
- if (tObject instanceof List && ((List) tObject).isEmpty()) {
- temp = false;
- break;
- }
+ if (tRecipe instanceof ShapedOreRecipe) {
+ boolean temp = true;
+ for (Object tObject : ((ShapedOreRecipe) tRecipe).getInput())
+ if (tObject != null) {
+ if (tObject instanceof ItemStack && (((ItemStack) tObject).getItem() == null || ((ItemStack) tObject).getMaxStackSize() < 2 || ((ItemStack) tObject).getMaxDamage() > 0 || ((ItemStack) tObject).getItem() instanceof ItemBlock)) {
+ temp = false;
+ break;
}
- if (temp) sSingleNonBlockDamagableRecipeList.add(tRecipe);
- } else if (tRecipe instanceof ShapedRecipes) {
- boolean temp = true;
- for (ItemStack tObject : ((ShapedRecipes) tRecipe).recipeItems) {
- if (tObject != null && (tObject.getItem() == null || tObject.getMaxStackSize() < 2 || tObject.getMaxDamage() > 0 || tObject.getItem() instanceof ItemBlock)) {
+ if (tObject instanceof List && ((List) tObject).isEmpty()) {
temp = false;
break;
}
}
- if (temp) sSingleNonBlockDamagableRecipeList.add(tRecipe);
- } else {
- sSingleNonBlockDamagableRecipeList.add(tRecipe);
+ if (temp) sSingleNonBlockDamagableRecipeList.add(tRecipe);
+ } else if (tRecipe instanceof ShapedRecipes) {
+ boolean temp = true;
+ for (ItemStack tObject : ((ShapedRecipes) tRecipe).recipeItems) {
+ if (tObject != null && (tObject.getItem() == null || tObject.getMaxStackSize() < 2 || tObject.getMaxDamage() > 0 || tObject.getItem() instanceof ItemBlock)) {
+ temp = false;
+ break;
+ }
}
+ if (temp) sSingleNonBlockDamagableRecipeList.add(tRecipe);
+ } else {
+ sSingleNonBlockDamagableRecipeList.add(tRecipe);
}
}
}
@@ -1403,7 +1401,7 @@ public class GT_ModHandler {
for (Entry<IRecipeInput, RecipeOutput> tEntry : aRecipeList.entrySet()) {
if (tEntry.getKey().matches(aInput)) {
if (tEntry.getKey().getAmount() <= aInput.stackSize) {
- ItemStack[] tList = (ItemStack[]) tEntry.getValue().items.toArray();
+ ItemStack[] tList = (ItemStack[]) tEntry.getValue().items.toArray(new ItemStack[tEntry.getValue().items.size()]);
if (tList.length == 0) break;
ItemStack[] rList = new ItemStack[aOutputSlots.length];
rRecipeMetaData.setTag("return", tEntry.getValue().metadata);
diff --git a/src/main/java/gregtech/api/util/GT_OreDictUnificator.java b/src/main/java/gregtech/api/util/GT_OreDictUnificator.java
index b404299fad..44ae527d28 100644
--- a/src/main/java/gregtech/api/util/GT_OreDictUnificator.java
+++ b/src/main/java/gregtech/api/util/GT_OreDictUnificator.java
@@ -259,12 +259,14 @@ public class GT_OreDictUnificator {
public static ItemStack getGem(Materials aMaterial, long aMaterialAmount) {
ItemStack rStack = null;
- if (((aMaterialAmount >= M) || aMaterialAmount >= M * 32))
+ if (((aMaterialAmount >= M)))
rStack = get(OrePrefixes.gem, aMaterial, aMaterialAmount / M);
- if (rStack == null && (((aMaterialAmount * 2) % M == 0) || aMaterialAmount >= M * 16))
- rStack = get(OrePrefixes.gemFlawed, aMaterial, (aMaterialAmount * 2) / M);
- if (rStack == null && (((aMaterialAmount * 4) >= M)))
- rStack = get(OrePrefixes.gemChipped, aMaterial, (aMaterialAmount * 4) / M);
+ if (rStack == null) {
+ if ((((aMaterialAmount * 2) % M == 0) || aMaterialAmount >= M * 16))
+ rStack = get(OrePrefixes.gemFlawed, aMaterial, (aMaterialAmount * 2) / M);
+ if ((((aMaterialAmount * 4) >= M)))
+ rStack = get(OrePrefixes.gemChipped, aMaterial, (aMaterialAmount * 4) / M);
+ }
return rStack;
}
diff --git a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java
index 611c8d34e2..5227959bae 100644
--- a/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java
+++ b/src/main/java/gregtech/api/util/GT_RecipeRegistrator.java
@@ -176,7 +176,7 @@ public class GT_RecipeRegistrator {
}
public static void registerReverseArcSmelting(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByProduct01, MaterialStack aByProduct02, MaterialStack aByProduct03) {
- registerReverseArcSmelting(aStack, new ItemData(aMaterial == null ? null : new MaterialStack(aMaterial, aMaterialAmount), aByProduct01, aByProduct02, aByProduct03));
+ registerReverseArcSmelting(aStack, new ItemData(new MaterialStack(aMaterial, aMaterialAmount), aByProduct01, aByProduct02, aByProduct03));
}
public static void registerReverseArcSmelting(ItemStack aStack, ItemData aData) {
@@ -234,7 +234,7 @@ public class GT_RecipeRegistrator {
}
public static void registerReverseMacerating(ItemStack aStack, Materials aMaterial, long aMaterialAmount, MaterialStack aByProduct01, MaterialStack aByProduct02, MaterialStack aByProduct03, boolean aAllowHammer) {
- registerReverseMacerating(aStack, new ItemData(aMaterial == null ? null : new MaterialStack(aMaterial, aMaterialAmount), aByProduct01, aByProduct02, aByProduct03), aAllowHammer);
+ registerReverseMacerating(aStack, new ItemData(new MaterialStack(aMaterial, aMaterialAmount), aByProduct01, aByProduct02, aByProduct03), aAllowHammer);
}
public static void registerReverseMacerating(ItemStack aStack, ItemData aData, boolean aAllowHammer) {
diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java
index 29c5ab2c8b..32c02afae4 100644
--- a/src/main/java/gregtech/api/util/GT_Utility.java
+++ b/src/main/java/gregtech/api/util/GT_Utility.java
@@ -20,7 +20,6 @@ import gregtech.api.objects.GT_ItemStack;
import gregtech.api.objects.ItemData;
import gregtech.api.threads.GT_Runnable_Sound;
import gregtech.common.GT_Proxy;
-import ic2.api.recipe.ICannerBottleRecipeManager;
import ic2.api.recipe.IRecipeInput;
import ic2.api.recipe.RecipeInputItemStack;
import ic2.api.recipe.RecipeInputOreDict;
@@ -921,7 +920,7 @@ public class GT_Utility {
}
public static boolean doSoundAtClient(String aSoundName, int aTimeUntilNextSound, float aSoundStrength, double aX, double aY, double aZ) {
- return doSoundAtClient(aSoundName, aTimeUntilNextSound, aSoundStrength, 0.9F + new Random().nextFloat() * 0.2F, aX, aY, aZ);
+ return doSoundAtClient(aSoundName, aTimeUntilNextSound, aSoundStrength, 1.01818028F, aX, aY, aZ);
}
public static boolean doSoundAtClient(String aSoundName, int aTimeUntilNextSound, float aSoundStrength, float aSoundModulation, double aX, double aY, double aZ) {
@@ -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;
@@ -1410,7 +1411,7 @@ public class GT_Utility {
Collections.sort(tEntrySet, new Comparator<Map.Entry<X, Y>>() {
@Override
public int compare(Entry<X, Y> aValue1, Entry<X, Y> aValue2) {
- return -aValue1.getValue().compareTo(aValue2.getValue());
+ return aValue2.getValue().compareTo(aValue1.getValue());//FB: RV - RV_NEGATING_RESULT_OF_COMPARETO
}
});
LinkedHashMap<X, Y> rMap = new LinkedHashMap<X, Y>();
@@ -1722,10 +1723,11 @@ public class GT_Utility {
+ " Humidity: " + ((ic2.api.crops.ICropTile) tTileEntity).getHumidity()
+ " Air-Quality: " + ((ic2.api.crops.ICropTile) tTileEntity).getAirQuality()
);
- String tString = E;
+ StringBuilder tStringB = new StringBuilder();
for (String tAttribute : ic2.api.crops.Crops.instance.getCropList()[((ic2.api.crops.ICropTile) tTileEntity).getID()].attributes()) {
- tString += ", " + tAttribute;
+ tStringB.append(", ").append(tAttribute);
}
+ String tString = tStringB.toString();
tList.add("Attributes:" + tString.replaceFirst(",", E));
tList.add("Discovered by: " + ic2.api.crops.Crops.instance.getCropList()[((ic2.api.crops.ICropTile) tTileEntity).getID()].discoveredBy());
}
diff --git a/src/main/java/gregtech/common/GT_Client.java b/src/main/java/gregtech/common/GT_Client.java
index 6e6864e716..7c86d3d283 100644
--- a/src/main/java/gregtech/common/GT_Client.java
+++ b/src/main/java/gregtech/common/GT_Client.java
@@ -9,15 +9,12 @@ import codechicken.lib.vec.Rotation;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent;
-import gregtech.GT_Mod;
import gregtech.api.GregTech_API;
-import gregtech.api.enums.ConfigCategories;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.Materials;
import gregtech.api.interfaces.tileentity.ICoverable;
import gregtech.api.interfaces.tileentity.ITurnable;
import gregtech.api.metatileentity.BaseMetaPipeEntity;
-import gregtech.api.objects.GT_FluidStack;
import gregtech.api.util.GT_Log;
import gregtech.api.util.GT_PlayedSound;
import gregtech.api.util.GT_Utility;
@@ -31,12 +28,10 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
-import net.minecraft.util.ChatComponentText;
import net.minecraft.world.World;
import net.minecraftforge.client.event.DrawBlockHighlightEvent;
import org.lwjgl.opengl.GL11;
-import java.net.URL;
import java.util.*;
// Referenced classes of package gregtech.common:
@@ -54,8 +49,6 @@ public class GT_Client extends GT_Proxy
});
}
- private final HashSet mCapeList = new HashSet();
- private final GT_CapeRenderer mCapeRenderer;
private final List mPosR;
private final List mPosG;
private final List mPosB;
@@ -74,14 +67,9 @@ public class GT_Client extends GT_Proxy
private final List mMoltenNegA = Arrays.asList(new Object[0]);
private long mAnimationTick;
private boolean mAnimationDirection;
- private boolean isFirstClientPlayerTick;
- private String mMessage;
public GT_Client() {
- mCapeRenderer = new GT_CapeRenderer(mCapeList);
mAnimationTick = 0L;
mAnimationDirection = false;
- isFirstClientPlayerTick = true;
- mMessage = "";
mPosR = Arrays.asList(new Materials[]{
/**Materials.ChargedCertusQuartz, **/Materials.Enderium, Materials.Vinteum, Materials.Uranium235, Materials.InfusedGold, Materials.Plutonium241, Materials.NaquadahEnriched, Materials.Naquadria, Materials.InfusedOrder, Materials.Force,
Materials.Pyrotheum, Materials.Sunnarium, Materials.Glowstone, Materials.Thaumium, Materials.InfusedVis, Materials.InfusedAir, Materials.InfusedFire, Materials.FierySteel, Materials.Firestone
@@ -169,27 +157,6 @@ public class GT_Client extends GT_Proxy
public void onPreLoad() {
super.onPreLoad();
- String arr$[] = {
- "renadi", "hanakocz", "MysteryDump", "Flaver4", "x_Fame", "Peluche321", "Goshen_Ithilien", "manf", "Bimgo", "leagris",
- "IAmMinecrafter02", "Cerous", "Devilin_Pixy", "Bkarlsson87", "BadAlchemy", "CaballoCraft", "melanclock", "Resursator", "demanzke", "AndrewAmmerlaan",
- "Deathlycraft", "Jirajha", "Axlegear", "kei_kouma", "Dracion", "dungi", "Dorfschwein", "Zero Tw0", "mattiagraz85", "sebastiank30",
- "Plem", "invultri", "grillo126", "malcanteth", "Malevolence_", "Nicholas_Manuel", "Sirbab", "kehaan", "bpgames123", "semig0d",
- "9000bowser", "Sovereignty89", "Kris1432", "xander_cage_", "samuraijp", "bsaa", "SpwnX", "tworf", "Kadah", "kanni",
- "Stute", "Hegik", "Onlyme", "t3hero", "Hotchi", "jagoly", "Nullav", "BH5432", "Sibmer", "inceee",
- "foxxx0", "Hartok", "TMSama", "Shlnen", "Carsso", "zessirb", "meep310", "Seldron", "yttr1um", "hohounk",
- "freebug", "Sylphio", "jmarler", "Saberawr", "r00teniy", "Neonbeta", "yinscape", "voooon24", "Quintine", "peach774",
- "lepthymo", "bildeman", "Kremnari", "Aerosalo", "OndraSter", "oscares91", "mr10movie", "Daxx367x2", "EGERTRONx", "aka13_404",
- "Abouttabs", "Johnstaal", "djshiny99", "megatronp", "DZCreeper", "Kane_Hart", "Truculent", "vidplace7", "simon6689", "MomoNasty",
- "UnknownXLV", "goreacraft", "Fluttermine", "Daddy_Cecil", "MrMaleficus", "TigersFangs", "cublikefoot", "chainman564", "NikitaBuker", "Misha999777",
- "25FiveDetail", "AntiCivilBoy", "michaelbrady", "xXxIceFirexXx", "Speedynutty68", "GarretSidzaka", "HallowCharm977", "mastermind1919", "The_Hypersonic", "diamondguy2798",
- "zF4ll3nPr3d4t0r", "CrafterOfMines57", "XxELIT3xSNIP3RxX", "SuterusuKusanagi", "xavier0014", "adamros", "alexbegt"
- };
- int len$ = arr$.length;
- for (int i$ = 0; i$ < len$; i$++) {
- String tName = arr$[i$];
- mCapeList.add(tName.toLowerCase());
- }
-
(new Thread(this)).start();
}
@@ -231,45 +198,47 @@ public class GT_Client extends GT_Proxy
}
public void run() {
+ //skip - dead code, rly, txt files on server is now empty
try {
- GT_Log.out.println("GT_Mod: Downloading Cape List.");
- @SuppressWarnings("resource")
- Scanner tScanner = new Scanner(new URL("http://gregtech.overminddl1.com/com/gregoriust/gregtech/supporterlist.txt").openStream());
- while (tScanner.hasNextLine()) {
- String tName = tScanner.nextLine();
- if (!this.mCapeList.contains(tName.toLowerCase())) {
- this.mCapeList.add(tName.toLowerCase());
- }
- }
+ GT_Log.out.println("Skip: GT_Mod: Downloading Cape List.");
+ /*@*//*SuppressWarnings("resource")*/
+ //Scanner tScanner = new Scanner(new URL("http://gregtech.overminddl1.com/com/gregoriust/gregtech/supporterlist.txt").openStream());
+ //while (tScanner.hasNextLine()) {
+ //String tName = tScanner.nextLine();
+ //if (!this.mCapeList.contains(tName.toLowerCase())) {
+ //this.mCapeList.add(tName.toLowerCase());
+ //}
+ //}
} catch (Throwable e) {
}
try {
- GT_Log.out.println("GT_Mod: Downloading News.");
- @SuppressWarnings("resource")
- Scanner tScanner = new Scanner(new URL("http://files.minecraftforge.net/maven/com/gregoriust/gregtech/message.txt").openStream());
- while (tScanner.hasNextLine()) {
- this.mMessage = (this.mMessage + tScanner.nextLine() + " ");
- }
+ GT_Log.out.println("Skip: GT_Mod: Downloading News.");
+ /*@*//*SuppressWarnings("resource")*/
+ //Scanner tScanner = new Scanner(new URL("http://files.minecraftforge.net/maven/com/gregoriust/gregtech/message.txt").openStream());
+ //while (tScanner.hasNextLine()) {
+ //this.mMessage = (this.mMessage + tScanner.nextLine() + " ");
+ //}
} catch (Throwable e) {
}
}
@SubscribeEvent
public void onPlayerTickEventClient(TickEvent.PlayerTickEvent aEvent) {
- if ((!aEvent.player.isDead) && (aEvent.phase == TickEvent.Phase.END) && (aEvent.side.isClient())) {
+ if ((aEvent.side.isClient()) && (aEvent.phase == TickEvent.Phase.END) && (!aEvent.player.isDead)) {
ArrayList<GT_PlayedSound> tList = new ArrayList();
for (Map.Entry<GT_PlayedSound, Integer> tEntry : GT_Utility.sPlayedSoundMap.entrySet()) {
- if (((Integer) tEntry.getValue()).intValue() < 0) {
+ if (tEntry.getValue().intValue() < 0) {//Integer -> Integer -> int? >_<, fix
tList.add(tEntry.getKey());
} else {
- tEntry.setValue(Integer.valueOf(((Integer) tEntry.getValue()).intValue() - 1));
+ tEntry.setValue(Integer.valueOf(tEntry.getValue().intValue() - 1));
}
}
GT_PlayedSound tKey;
for (Iterator i$ = tList.iterator(); i$.hasNext(); GT_Utility.sPlayedSoundMap.remove(tKey)) {
tKey = (GT_PlayedSound) i$.next();
}
- if ((this.isFirstClientPlayerTick) && (aEvent.player == GT_Values.GT.getThePlayer())) {
+ //wut, every tick? baaad, not need (and other) -> dead code
+ /*if ((this.isFirstClientPlayerTick) && (aEvent.player == GT_Values.GT.getThePlayer())) {
this.isFirstClientPlayerTick = false;
GT_FluidStack.fixAllThoseFuckingFluidIDs();
if ((this.mMessage.length() > 5) && (GregTech_API.sSpecialFile.get(ConfigCategories.news, this.mMessage, true))) {
@@ -291,7 +260,7 @@ public class GT_Client extends GT_Proxy
aEvent.player.addChatComponentMessage(new ChatComponentText("GregTech: Please get the recommended Version of IndustrialCraft here:"));
aEvent.player.addChatComponentMessage(new ChatComponentText("ic2api.player.to:8080/job/IC2_experimental/" + (GT_Mod.MAX_IC2 < Integer.MAX_VALUE ? GT_Mod.MAX_IC2 : 624) + "/"));
}
- }
+ }*/
}
}
@@ -329,16 +298,11 @@ public class GT_Client extends GT_Proxy
}
@SubscribeEvent
- public void receiveRenderSpecialsEvent(net.minecraftforge.client.event.RenderPlayerEvent.Specials.Pre aEvent) {
- mCapeRenderer.receiveRenderSpecialsEvent(aEvent);
- }
-
- @SubscribeEvent
public void onClientTickEvent(cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent aEvent) {
if (aEvent.phase == cpw.mods.fml.common.gameevent.TickEvent.Phase.END) {
mAnimationTick++;
if (mAnimationTick % 50L == 0L)
- mAnimationDirection = !mAnimationDirection;
+ {mAnimationDirection = !mAnimationDirection;}
int tDirection = mAnimationDirection ? 1 : -1;
for (Iterator i$ = mPosR.iterator(); i$.hasNext(); ) {
Materials tMaterial = (Materials) i$.next();
diff --git a/src/main/java/gregtech/common/GT_Proxy.java b/src/main/java/gregtech/common/GT_Proxy.java
index f9cf4f9750..93371c2f27 100644
--- a/src/main/java/gregtech/common/GT_Proxy.java
+++ b/src/main/java/gregtech/common/GT_Proxy.java
@@ -175,12 +175,14 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
for (FluidContainerRegistry.FluidContainerData tData : FluidContainerRegistry.getRegisteredFluidContainerData()) {
onFluidContainerRegistration(new FluidContainerRegistry.FluidContainerRegisterEvent(tData));
}
- for (String tOreName : OreDictionary.getOreNames()) {
- ItemStack tOreStack;
- for (Iterator i$ = OreDictionary.getOres(tOreName).iterator(); i$.hasNext(); registerOre(new OreDictionary.OreRegisterEvent(tOreName, tOreStack))) {
- tOreStack = (ItemStack) i$.next();
+ try {
+ for (String tOreName : OreDictionary.getOreNames()) {
+ ItemStack tOreStack;
+ for (Iterator i$ = OreDictionary.getOres(tOreName).iterator(); i$.hasNext(); registerOre(new OreDictionary.OreRegisterEvent(tOreName, tOreStack))) {
+ tOreStack = (ItemStack) i$.next();
+ }
}
- }
+ } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
}
private static final void registerRecipes(OreDictEventContainer aOre) {
@@ -836,7 +838,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
}
aEvent.bow.damageItem(1, aEvent.entityPlayer);
aEvent.bow.getItem();
- aEvent.entityPlayer.worldObj.playSoundAtEntity(aEvent.entityPlayer, "random.bow", 1.0F, 1.0F / (new Random().nextFloat() * 0.4F + 1.2F) + tSpeed
+ aEvent.entityPlayer.worldObj.playSoundAtEntity(aEvent.entityPlayer, "random.bow", 1.0F, 0.64893958288F + tSpeed
* 0.5F);
tArrowEntity.canBePickedUp = 1;
@@ -892,7 +894,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
if ((aEvent.entityPlayer == null) || (aEvent.entityPlayer.worldObj == null) || (aEvent.action == null) || (aEvent.world.provider == null)) {
return;
}
- if ((!aEvent.entityPlayer.worldObj.isRemote) && (aEvent.action != null) && (aEvent.action != PlayerInteractEvent.Action.RIGHT_CLICK_AIR)
+ if ((!aEvent.entityPlayer.worldObj.isRemote) && (aEvent.action != PlayerInteractEvent.Action.RIGHT_CLICK_AIR)
&& (GT_Log.pal != null)) {
this.mBufferedPlayerActivity.add(getDataAndTime() + ";" + aEvent.action.name() + ";" + aEvent.entityPlayer.getDisplayName() + ";DIM:"
+ aEvent.world.provider.dimensionId + ";" + aEvent.x + ";" + aEvent.y + ";" + aEvent.z + ";|;" + aEvent.x / 10 + ";" + aEvent.y / 10 + ";"
@@ -929,14 +931,16 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
aEvent.z, (byte) aEvent.blockMetadata, aEvent.fortuneLevel, aEvent.isSilkTouching, aEvent);
}
if (EnchantmentHelper.getEnchantmentLevel(Enchantment.fireAspect.effectId, aStack) > 2) {
- for (ItemStack tDrop : aEvent.drops) {
- ItemStack tSmeltingOutput = GT_ModHandler.getSmeltingOutput(tDrop, false, null);
- if (tSmeltingOutput != null) {
- tDrop.stackSize *= tSmeltingOutput.stackSize;
- tSmeltingOutput.stackSize = tDrop.stackSize;
- GT_Utility.setStack(tDrop, tSmeltingOutput);
+ try {
+ for (ItemStack tDrop : aEvent.drops) {
+ ItemStack tSmeltingOutput = GT_ModHandler.getSmeltingOutput(tDrop, false, null);
+ if (tSmeltingOutput != null) {
+ tDrop.stackSize *= tSmeltingOutput.stackSize;
+ tSmeltingOutput.stackSize = tDrop.stackSize;
+ GT_Utility.setStack(tDrop, tSmeltingOutput);
+ }
}
- }
+ } catch (Throwable e) {e.printStackTrace(GT_Log.err);}
}
}
}
@@ -967,8 +971,8 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
try {
aEvent.Ore.stackSize = 1;
if (this.mIgnoreTcon || aEvent.Ore.getUnlocalizedName().startsWith("item.oreberry")) {
- if ((aOriginalMod.toLowerCase().contains("xycraft")) || (aOriginalMod.toLowerCase().contains("tconstruct"))
- || ((aOriginalMod.toLowerCase().contains("natura")) && (!aOriginalMod.toLowerCase().contains("natural")))) {
+ if ((aOriginalMod.toLowerCase(Locale.ENGLISH).contains("xycraft")) || (aOriginalMod.toLowerCase(Locale.ENGLISH).contains("tconstruct"))
+ || ((aOriginalMod.toLowerCase(Locale.ENGLISH).contains("natura")) && (!aOriginalMod.toLowerCase(Locale.ENGLISH).contains("natural")))) {
if (GT_Values.D1) {
GT_Log.ore.println(aMod + " -> " + aEvent.Name + " is getting ignored, because of racism. :P");
}
@@ -983,79 +987,64 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
}
this.mRegisteredOres.add(aEvent.Ore);
- if ((aEvent.Name.startsWith("item")) && (this.mIgnoredItems.contains(aEvent.Name))) {
- GT_Log.ore.println(tModToName);
- if (aEvent.Name.equals("itemCopperWire")) {
- GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore);
- }
- if (aEvent.Name.equals("itemRubber")) {
- GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Rubber, aEvent.Ore);
+ if ((this.mIgnoredItems.contains(aEvent.Name))) {
+ if ((aEvent.Name.startsWith("item"))) {
+ GT_Log.ore.println(tModToName);
+ if (aEvent.Name.equals("itemCopperWire")) {
+ GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore);
+ } else if (aEvent.Name.equals("itemRubber")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Rubber, aEvent.Ore);
+ }
+ return;
}
- return;
- }
- if (this.mIgnoredNames.contains(aEvent.Name)) {
GT_Log.ore.println(tModToName + " is getting ignored via hardcode.");
return;
- }
- if (aEvent.Name.equals("stone")) {
+ } else if (aEvent.Name.equals("stone")) {
GT_OreDictUnificator.registerOre("stoneSmooth", aEvent.Ore);
return;
- }
- if (aEvent.Name.equals("cobblestone")) {
+ } else if (aEvent.Name.equals("cobblestone")) {
GT_OreDictUnificator.registerOre("stoneCobble", aEvent.Ore);
return;
- }
- if ((aEvent.Name.contains("|")) || (aEvent.Name.contains("*")) || (aEvent.Name.contains(":")) || (aEvent.Name.contains("."))
+ } else if ((aEvent.Name.contains("|")) || (aEvent.Name.contains("*")) || (aEvent.Name.contains(":")) || (aEvent.Name.contains("."))
|| (aEvent.Name.contains("$"))) {
GT_Log.ore.println(tModToName + " is using a private Prefix and is therefor getting ignored properly.");
return;
- }
- if (aEvent.Name.equals("copperWire")) {
+ } else if (aEvent.Name.equals("copperWire")) {
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore);
- }
- if (aEvent.Name.equals("oreHeeEndrium")) {
+ } else if (aEvent.Name.equals("oreHeeEndrium")) {
GT_OreDictUnificator.registerOre(OrePrefixes.ore, Materials.Endium, aEvent.Ore);
- }
- if (aEvent.Name.equals("sheetPlastic")) {
+ } else if (aEvent.Name.equals("sheetPlastic")) {
GT_OreDictUnificator.registerOre(OrePrefixes.plate, Materials.Plastic, aEvent.Ore);
- }
- if (aEvent.Name.equals("shardAir")) {
- GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedAir, aEvent.Ore);
- return;
- }
- if (aEvent.Name.equals("shardWater")) {
- GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedWater, aEvent.Ore);
- return;
- }
- if (aEvent.Name.equals("shardFire")) {
- GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedFire, aEvent.Ore);
- return;
- }
- if (aEvent.Name.equals("shardEarth")) {
- GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedEarth, aEvent.Ore);
- return;
- }
- if (aEvent.Name.equals("shardOrder")) {
- GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedOrder, aEvent.Ore);
- return;
- }
- if (aEvent.Name.equals("shardEntropy")) {
- GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedEntropy, aEvent.Ore);
- return;
- }
- if (aEvent.Name.equals("fieryIngot")) {
+ } else if (aEvent.Name.startsWith("shard")) {
+ if (aEvent.Name.equals("shardAir")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedAir, aEvent.Ore);
+ return;
+ } else if (aEvent.Name.equals("shardWater")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedWater, aEvent.Ore);
+ return;
+ } else if (aEvent.Name.equals("shardFire")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedFire, aEvent.Ore);
+ return;
+ } else if (aEvent.Name.equals("shardEarth")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedEarth, aEvent.Ore);
+ return;
+ } else if (aEvent.Name.equals("shardOrder")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedOrder, aEvent.Ore);
+ return;
+ } else if (aEvent.Name.equals("shardEntropy")) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.gem, Materials.InfusedEntropy, aEvent.Ore);
+ return;
+ }
+ } else if (aEvent.Name.equals("fieryIngot")) {
GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.FierySteel, aEvent.Ore);
return;
- }
- if (aEvent.Name.equals("ironwood")) {
+ } else if (aEvent.Name.equals("ironwood")) {
GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.IronWood, aEvent.Ore);
return;
- }
- if (aEvent.Name.equals("steeleaf")) {
+ } else if (aEvent.Name.equals("steeleaf")) {
GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Steeleaf, aEvent.Ore);
return;
- }
- if (aEvent.Name.equals("knightmetal")) {
+ } else if (aEvent.Name.equals("knightmetal")) {
GT_OreDictUnificator.registerOre(OrePrefixes.ingot, Materials.Knightmetal, aEvent.Ore);
return;
}
@@ -1079,12 +1068,10 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
if (aEvent.Name.toLowerCase().equals(aEvent.Name)) {
GT_Log.ore.println(tModToName + " is invalid due to being solely lowercased.");
return;
- }
- if (aEvent.Name.toUpperCase().equals(aEvent.Name)) {
+ } else if (aEvent.Name.toUpperCase().equals(aEvent.Name)) {
GT_Log.ore.println(tModToName + " is invalid due to being solely uppercased.");
return;
- }
- if (Character.isUpperCase(aEvent.Name.charAt(0))) {
+ } else if (Character.isUpperCase(aEvent.Name.charAt(0))) {
GT_Log.ore.println(tModToName + " is invalid due to the first character being uppercased.");
}
} else {
@@ -1138,48 +1125,32 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
}
break;
case gem:
- switch (aMaterial) {
- case Lapis:
- case Sodalite:
- GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
- break;
- case Lazurite:
- GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore);
- break;
- case InfusedAir:
- case InfusedWater:
- case InfusedFire:
- case InfusedEarth:
- case InfusedOrder:
- case InfusedEntropy:
- GT_OreDictUnificator.registerOre(aMaterial.name().replaceFirst("Infused", "shard"), aEvent.Ore);
- break;
- case Chocolate:
- GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
- break;
- case CertusQuartz:
- case NetherQuartz:
- GT_OreDictUnificator.registerOre(OrePrefixes.item.get(aMaterial), aEvent.Ore);
- case Fluix:
- case Quartz:
- case Quartzite:
- GT_OreDictUnificator.registerOre(OrePrefixes.crystal, aMaterial, aEvent.Ore);
- GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, aEvent.Ore);
- default:
- break;
+ if (aMaterial == Materials.Lapis || aMaterial == Materials.Sodalite) {
+ GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
+ } else if (aMaterial == Materials.Lazurite) {
+ GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore);
+ } else if (aMaterial == Materials.InfusedAir || aMaterial == Materials.InfusedWater || aMaterial == Materials.InfusedFire || aMaterial == Materials.InfusedEarth || aMaterial == Materials.InfusedOrder || aMaterial == Materials.InfusedEntropy) {
+ GT_OreDictUnificator.registerOre(aMaterial.name().replaceFirst("Infused", "shard"), aEvent.Ore);
+ } else if (aMaterial == Materials.Chocolate) {
+ GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
+ } else if (aMaterial == Materials.CertusQuartz || aMaterial == Materials.NetherQuartz) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.item.get(aMaterial), aEvent.Ore);
+ //Java (?) logic, redundant code
+ GT_OreDictUnificator.registerOre(OrePrefixes.crystal, aMaterial, aEvent.Ore);
+ GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, aEvent.Ore);
+ } else if (aMaterial == Materials.Fluix || aMaterial == Materials.Quartz || aMaterial == Materials.Quartzite) {
+ GT_OreDictUnificator.registerOre(OrePrefixes.crystal, aMaterial, aEvent.Ore);
+ GT_OreDictUnificator.registerOre(OreDictNames.craftingQuartz, aEvent.Ore);
}
break;
case cableGt01:
if (aMaterial == Materials.Tin) {
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireTin, aEvent.Ore);
- }
- if (aMaterial == Materials.AnyCopper) {
+ } else if (aMaterial == Materials.AnyCopper) {
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireCopper, aEvent.Ore);
- }
- if (aMaterial == Materials.Gold) {
+ } else if (aMaterial == Materials.Gold) {
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireGold, aEvent.Ore);
- }
- if (aMaterial == Materials.AnyIron) {
+ } else if (aMaterial == Materials.AnyIron) {
GT_OreDictUnificator.registerOre(OreDictNames.craftingWireIron, aEvent.Ore);
}
break;
@@ -1191,11 +1162,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
case plate:
if ((aMaterial == Materials.Plastic) || (aMaterial == Materials.Rubber)) {
GT_OreDictUnificator.registerOre(OrePrefixes.sheet, aMaterial, aEvent.Ore);
- }
- if (aMaterial == Materials.Silicon) {
+ } else if (aMaterial == Materials.Silicon) {
GT_OreDictUnificator.registerOre(OrePrefixes.item, aMaterial, aEvent.Ore);
- }
- if (aMaterial == Materials.Wood) {
+ } else if (aMaterial == Materials.Wood) {
GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
GT_OreDictUnificator.registerOre(OrePrefixes.plank, aMaterial, aEvent.Ore);
}
@@ -1211,64 +1180,48 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
case stick:
if (!GT_RecipeRegistrator.sRodMaterialList.contains(aMaterial)) {
GT_RecipeRegistrator.sRodMaterialList.add(aMaterial);
- }
- if (aMaterial == Materials.Wood) {
+ } else if (aMaterial == Materials.Wood) {
GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
- }
- if ((aMaterial == Materials.Tin) || (aMaterial == Materials.Lead) || (aMaterial == Materials.SolderingAlloy)) {
+ } else if ((aMaterial == Materials.Tin) || (aMaterial == Materials.Lead) || (aMaterial == Materials.SolderingAlloy)) {
GT_OreDictUnificator.registerOre(ToolDictNames.craftingToolSolderingMetal, aEvent.Ore);
}
break;
case dust:
if (aMaterial == Materials.Salt) {
GT_OreDictUnificator.registerOre("itemSalt", aEvent.Ore);
- }
- if (aMaterial == Materials.Wood) {
+ } else if (aMaterial == Materials.Wood) {
GT_OreDictUnificator.registerOre("pulpWood", aEvent.Ore);
- }
- if (aMaterial == Materials.Wheat) {
+ } else if (aMaterial == Materials.Wheat) {
GT_OreDictUnificator.registerOre("foodFlour", aEvent.Ore);
- }
- if (aMaterial == Materials.Lapis) {
+ } else if (aMaterial == Materials.Lapis) {
GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
- }
- if (aMaterial == Materials.Lazurite) {
+ } else if (aMaterial == Materials.Lazurite) {
GT_OreDictUnificator.registerOre(Dyes.dyeCyan, aEvent.Ore);
- }
- if (aMaterial == Materials.Sodalite) {
+ } else if (aMaterial == Materials.Sodalite) {
GT_OreDictUnificator.registerOre(Dyes.dyeBlue, aEvent.Ore);
- }
- if (aMaterial == Materials.Cocoa) {
+ } else if (aMaterial == Materials.Cocoa) {
GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
GT_OreDictUnificator.registerOre("foodCocoapowder", aEvent.Ore);
- }
- if (aMaterial == Materials.Coffee) {
+ } else if (aMaterial == Materials.Coffee) {
GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
- }
- if (aMaterial == Materials.BrownLimonite) {
+ } else if (aMaterial == Materials.BrownLimonite) {
GT_OreDictUnificator.registerOre(Dyes.dyeBrown, aEvent.Ore);
- }
- if (aMaterial == Materials.YellowLimonite) {
+ } else if (aMaterial == Materials.YellowLimonite) {
GT_OreDictUnificator.registerOre(Dyes.dyeYellow, aEvent.Ore);
}
break;
case ingot:
if (aMaterial == Materials.Rubber) {
GT_OreDictUnificator.registerOre("itemRubber", aEvent.Ore);
- }
- if (aMaterial == Materials.FierySteel) {
+ } else if (aMaterial == Materials.FierySteel) {
GT_OreDictUnificator.registerOre("fieryIngot", aEvent.Ore);
- }
- if (aMaterial == Materials.IronWood) {
+ } else if (aMaterial == Materials.IronWood) {
GT_OreDictUnificator.registerOre("ironwood", aEvent.Ore);
- }
- if (aMaterial == Materials.Steeleaf) {
+ } else if (aMaterial == Materials.Steeleaf) {
GT_OreDictUnificator.registerOre("steeleaf", aEvent.Ore);
- }
- if (aMaterial == Materials.Knightmetal) {
+ } else if (aMaterial == Materials.Knightmetal) {
GT_OreDictUnificator.registerOre("knightmetal", aEvent.Ore);
- }
- if ((aMaterial == Materials.Brass) && (aEvent.Ore.getItemDamage() == 2)
+ } else if ((aMaterial == Materials.Brass) && (aEvent.Ore.getItemDamage() == 2)
&& (aEvent.Ore.getUnlocalizedName().equals("item.ingotBrass"))
&& (new ItemStack(aEvent.Ore.getItem(), 1, 0).getUnlocalizedName().contains("red"))) {
GT_OreDictUnificator.set(OrePrefixes.ingot, Materials.RedAlloy, new ItemStack(aEvent.Ore.getItem(), 1, 0));
@@ -1300,6 +1253,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
}
// System.out.println("Material Name: "+aEvent.Name+ " !!!Unknown Material detected!!! Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, an Issue nor a Lag Source, it is just an Information, which you should pass to me.");
// GT_Log.ore.println(tModToName + " uses an unknown Material. Report this to GregTech.");
+ GT_Log.ore.println(tModToName + " uses an unknown Material.");
return;
}
} else {
@@ -1346,11 +1300,9 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
case crafting:
if (tName.equals("ToolSolderingMetal")) {
GregTech_API.registerSolderingMetal(aEvent.Ore);
- }
- if (tName.equals("IndustrialDiamond")) {
+ } else if (tName.equals("IndustrialDiamond")) {
GT_OreDictUnificator.addToBlacklist(aEvent.Ore);
- }
- if (tName.equals("WireCopper")) {
+ } else if (tName.equals("WireCopper")) {
GT_OreDictUnificator.registerOre(OrePrefixes.wire, Materials.Copper, aEvent.Ore);
}
break;
@@ -1451,7 +1403,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
@SubscribeEvent
public void onPlayerTickEventServer(TickEvent.PlayerTickEvent aEvent) {
- if ((!aEvent.player.isDead) && (aEvent.phase == TickEvent.Phase.END) && (aEvent.side.isServer())) {
+ if ((aEvent.side.isServer()) && (aEvent.phase == TickEvent.Phase.END) && (!aEvent.player.isDead)) {
if ((aEvent.player.ticksExisted % 200 == 0) && (aEvent.player.capabilities.allowEdit) && (!aEvent.player.capabilities.isCreativeMode)
&& (this.mSurvivalIntoAdventure)) {
aEvent.player.setGameType(GameType.ADVENTURE);
@@ -1611,159 +1563,111 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
}
if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemSodium")) {
rFuelValue = (short) Math.max(rFuelValue, 4000);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedSodium")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedSodium")) {
rFuelValue = (short) Math.max(rFuelValue, 4000);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureSodium")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureSodium")) {
rFuelValue = (short) Math.max(rFuelValue, 4000);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSodium")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSodium")) {
rFuelValue = (short) Math.max(rFuelValue, 4000);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallSodium")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallSodium")) {
rFuelValue = (short) Math.max(rFuelValue, 1000);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinySodium")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinySodium")) {
rFuelValue = (short) Math.max(rFuelValue, 444);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemLithium")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemLithium")) {
rFuelValue = (short) Math.max(rFuelValue, 6000);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedLithium")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedLithium")) {
rFuelValue = (short) Math.max(rFuelValue, 6000);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureLithium")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureLithium")) {
rFuelValue = (short) Math.max(rFuelValue, 6000);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustLithium")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustLithium")) {
rFuelValue = (short) Math.max(rFuelValue, 6000);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallLithium")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallLithium")) {
rFuelValue = (short) Math.max(rFuelValue, 2000);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyLithium")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyLithium")) {
rFuelValue = (short) Math.max(rFuelValue, 888);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCaesium")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCaesium")) {
rFuelValue = (short) Math.max(rFuelValue, 6000);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedCaesium")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedCaesium")) {
rFuelValue = (short) Math.max(rFuelValue, 6000);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureCaesium")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureCaesium")) {
rFuelValue = (short) Math.max(rFuelValue, 6000);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustCaesium")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustCaesium")) {
rFuelValue = (short) Math.max(rFuelValue, 6000);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallCaesium")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallCaesium")) {
rFuelValue = (short) Math.max(rFuelValue, 2000);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCaesium")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCaesium")) {
rFuelValue = (short) Math.max(rFuelValue, 888);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemLignite")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemLignite")) {
rFuelValue = (short) Math.max(rFuelValue, 1200);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedLignite")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedLignite")) {
rFuelValue = (short) Math.max(rFuelValue, 1200);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureLignite")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureLignite")) {
rFuelValue = (short) Math.max(rFuelValue, 1200);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustLignite")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustLignite")) {
rFuelValue = (short) Math.max(rFuelValue, 1200);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallLignite")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallLignite")) {
rFuelValue = (short) Math.max(rFuelValue, 375);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyLignite")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyLignite")) {
rFuelValue = (short) Math.max(rFuelValue, 166);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCoal")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCoal")) {
rFuelValue = (short) Math.max(rFuelValue, 1600);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedCoal")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedCoal")) {
rFuelValue = (short) Math.max(rFuelValue, 1600);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureCoal")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureCoal")) {
rFuelValue = (short) Math.max(rFuelValue, 1600);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustCoal")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustCoal")) {
rFuelValue = (short) Math.max(rFuelValue, 1600);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallCoal")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallCoal")) {
rFuelValue = (short) Math.max(rFuelValue, 400);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCoal")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCoal")) {
rFuelValue = (short) Math.max(rFuelValue, 177);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCharcoal")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "gemCharcoal")) {
rFuelValue = (short) Math.max(rFuelValue, 1600);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedCharcoal")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "crushedCharcoal")) {
rFuelValue = (short) Math.max(rFuelValue, 1600);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureCharcoal")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustImpureCharcoal")) {
rFuelValue = (short) Math.max(rFuelValue, 1600);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustCharcoal")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustCharcoal")) {
rFuelValue = (short) Math.max(rFuelValue, 1600);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallCharcoal")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallCharcoal")) {
rFuelValue = (short) Math.max(rFuelValue, 400);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCharcoal")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyCharcoal")) {
rFuelValue = (short) Math.max(rFuelValue, 177);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustWood")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustWood")) {
rFuelValue = (short) Math.max(rFuelValue, 100);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallWood")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustSmallWood")) {
rFuelValue = (short) Math.max(rFuelValue, 25);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyWood")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "dustTinyWood")) {
rFuelValue = (short) Math.max(rFuelValue, 11);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "plateWood")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "plateWood")) {
rFuelValue = (short) Math.min(rFuelValue, 300);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "blockLignite")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "blockLignite")) {
rFuelValue = (short) Math.max(rFuelValue, 12000);
- }
- if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "blockCharcoal")) {
+ } else if (GT_OreDictUnificator.isItemStackInstanceOf(aFuel, "blockCharcoal")) {
rFuelValue = (short) Math.max(rFuelValue, 16000);
- }
- if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.wooden_button, 1))) {
+ } else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.wooden_button, 1))) {
rFuelValue = (short) Math.max(rFuelValue, 150);
- }
- if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.ladder, 1))) {
+ } else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Blocks.ladder, 1))) {
rFuelValue = (short) Math.max(rFuelValue, 100);
- }
- if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.sign, 1))) {
+ } else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.sign, 1))) {
rFuelValue = (short) Math.max(rFuelValue, 600);
- }
- if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.wooden_door, 1))) {
+ } else if (GT_Utility.areStacksEqual(aFuel, new ItemStack(Items.wooden_door, 1))) {
rFuelValue = (short) Math.max(rFuelValue, 600);
- }
- if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_MSSFUEL.get(1, new Object[0]))) {
+ } else if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_MSSFUEL.get(1, new Object[0]))) {
rFuelValue = Math.max(rFuelValue, 150000);
- }
- if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_SSFUEL.get(1, new Object[0]))) {
+ } else if (GT_Utility.areStacksEqual(aFuel, ItemList.Block_SSFUEL.get(1, new Object[0]))) {
rFuelValue = Math.max(rFuelValue, 100000);
}
-
return rFuelValue;
}
public Fluid addAutogeneratedMoltenFluid(Materials aMaterial) {
- return addFluid("molten." + aMaterial.name().toLowerCase(), "molten.autogenerated", "Molten " + aMaterial.mDefaultLocalName, aMaterial,
+ return addFluid("molten." + aMaterial.name().toLowerCase(Locale.ENGLISH), "molten.autogenerated", "Molten " + aMaterial.mDefaultLocalName, aMaterial,
aMaterial.mMoltenRGBa, 4, aMaterial.mMeltingPoint <= 0 ? 1000 : aMaterial.mMeltingPoint, null, null, 0);
}
public Fluid addAutogeneratedPlasmaFluid(Materials aMaterial) {
- return addFluid("plasma." + aMaterial.name().toLowerCase(), "plasma.autogenerated", aMaterial.mDefaultLocalName + " Plasma", aMaterial,
+ return addFluid("plasma." + aMaterial.name().toLowerCase(Locale.ENGLISH), "plasma.autogenerated", aMaterial.mDefaultLocalName + " Plasma", aMaterial,
aMaterial.mMoltenRGBa, 3, 10000, GT_OreDictUnificator.get(OrePrefixes.cellPlasma, aMaterial, 1L), ItemList.Cell_Empty.get(1L, new Object[0]),
1000);
}
@@ -1774,7 +1678,7 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
public Fluid addFluid(String aName, String aLocalized, Materials aMaterial, int aState, int aTemperatureK, ItemStack aFullContainer,
ItemStack aEmptyContainer, int aFluidAmount) {
- return addFluid(aName, aName.toLowerCase(), aLocalized, aMaterial, null, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount);
+ return addFluid(aName, aName.toLowerCase(Locale.ENGLISH), aLocalized, aMaterial, null, aState, aTemperatureK, aFullContainer, aEmptyContainer, aFluidAmount);
}
public Fluid addFluid(String aName, String aTexture, String aLocalized, Materials aMaterial, short[] aRGBa, int aState, int aTemperatureK,
@@ -1848,40 +1752,40 @@ public abstract class GT_Proxy implements IGT_Mod, IGuiHandler, IFuelHandler {
&& (tOre.mMaterial != null)) {
if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("enderio") && tOre.mPrefix == OrePrefixes.ingot && tOre.mMaterial == Materials.DarkSteel) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
+ GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
} else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("thermalfoundation") && tOre.mPrefix == OrePrefixes.dust && tOre.mMaterial == Materials.Blizz) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
+ GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
} else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("thermalfoundation") && tOre.mPrefix == OrePrefixes.dust && tOre.mMaterial == Materials.Pyrotheum) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
+ GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
} else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("arsmagica2") && tOre.mPrefix == OrePrefixes.dust && tOre.mMaterial == Materials.Vinteum) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
+ GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
} else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("arsmagica2") && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.BlueTopaz) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
+ GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
} else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("arsmagica2") && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.Chimerite) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
+ GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
} else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("arsmagica2") && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.Moonstone) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
+ GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
} else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("arsmagica2") && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.Sunstone) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
+ GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
} else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("rotarycraft") && tOre.mPrefix == OrePrefixes.ingot && tOre.mMaterial == Materials.HSLA) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
+ GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
} else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("appliedenergistics2") && tOre.mPrefix == OrePrefixes.gem && tOre.mMaterial == Materials.CertusQuartz) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
+ GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
} else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals("appliedenergistics2") && tOre.mPrefix == OrePrefixes.dust && tOre.mMaterial == Materials.CertusQuartz) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
+ GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
} else if (tOre.mModID != null && tOre.mModID.toLowerCase().equals(GT_Values.MOD_ID_TC) && tOre.mPrefix == OrePrefixes.block && tOre.mMaterial == Materials.Thaumium) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, false);
- GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (tOre.mModID != null) && (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
+ GT_OreDictUnificator.set(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, (GregTech_API.sUnification.get(ConfigCategories.specialunificationtargets + "." + tOre.mModID, tOre.mEvent.Name, true)), true);
} else if (GT_OreDictUnificator.isBlacklisted(tOre.mEvent.Ore)) {
GT_OreDictUnificator.addAssociation(tOre.mPrefix, tOre.mMaterial, tOre.mEvent.Ore, true);
} else {
diff --git a/src/main/java/gregtech/common/GT_RecipeAdder.java b/src/main/java/gregtech/common/GT_RecipeAdder.java
index 2030d12c94..5b8ac5e7ce 100644
--- a/src/main/java/gregtech/common/GT_RecipeAdder.java
+++ b/src/main/java/gregtech/common/GT_RecipeAdder.java
@@ -142,7 +142,7 @@ public class GT_RecipeAdder
if ((aInput1 == null) || (aOutput1 == null)) {
return false;
}
- if ((aDuration = GregTech_API.sRecipeFile.get("cnc", aOutput1, aDuration)) <= 0) {
+ if ((GregTech_API.sRecipeFile.get("cnc", aOutput1, aDuration)) <= 0) {
return false;
}
return true;
diff --git a/src/main/java/gregtech/common/GT_Worldgenerator.java b/src/main/java/gregtech/common/GT_Worldgenerator.java
index 84e3ad9687..aadbf31847 100644
--- a/src/main/java/gregtech/common/GT_Worldgenerator.java
+++ b/src/main/java/gregtech/common/GT_Worldgenerator.java
@@ -107,9 +107,6 @@ public class GT_Worldgenerator
int j = 0;
for (int tZ = this.mZ - 16; j < 3; tZ += 16) {
String tBiome = this.mWorld.getBiomeGenForCoords(tX + 8, tZ + 8).biomeName;
- if (tBiome == null) {
- tBiome = BiomeGenBase.plains.biomeName;
- }
for (GT_Worldgen tWorldGen : GregTech_API.sWorldgenList) {
try {
tWorldGen.executeWorldgen(this.mWorld, this.mRandom, this.mBiome, this.mDimensionType, tX, tZ, this.mChunkGenerator, this.mChunkProvider);
diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
index e03cabe783..ddc89ecf49 100644
--- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
+++ b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java
@@ -33,41 +33,34 @@ public class GT_Item_Machines
if ((tDamage <= 0) || (tDamage >= GregTech_API.METATILEENTITIES.length)) {
return;
}
- if (tDamage == 0) {
- aList.add("WARNING, THE EXISTENCE OF THIS ITEM IS A BUG");
- aList.add("IF YOU GOT IT IN SURVIVAL THEN PLEASE REPORT IT");
- } else {
- TileEntity temp = GregTech_API.sBlockMachines.createTileEntity(aPlayer == null ? GT_Values.DW : aPlayer.worldObj, GregTech_API.METATILEENTITIES[tDamage] == null ? 0 : GregTech_API.METATILEENTITIES[tDamage].getTileEntityBaseType());
- if (temp != null) {
- temp.setWorldObj(aPlayer == null ? GT_Values.DW : aPlayer.worldObj);
- temp.xCoord = 0;
- temp.yCoord = 0;
- temp.zCoord = 0;
- if ((temp instanceof IGregTechTileEntity)) {
- IGregTechTileEntity tTileEntity = (IGregTechTileEntity) temp;
- tTileEntity.setInitialValuesAsNBT(new NBTTagCompound(), (short) tDamage);
- if (tTileEntity.getDescription() != null) {
- int i = 0;
- for (String tDescription : tTileEntity.getDescription()) {
- if (GT_Utility.isStringValid(tDescription)) {
- aList.add(GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tDescription, !GregTech_API.sPostloadFinished));
- }
- }
- }
- if (tTileEntity.getEUCapacity() > 0L) {
- if (tTileEntity.getInputVoltage() > 0L) {
- aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_IN", "Voltage IN: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN + tTileEntity.getInputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getInputVoltage())] + ")" + EnumChatFormatting.GRAY);
- }
- if (tTileEntity.getOutputVoltage() > 0L) {
- aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_OUT", "Voltage OUT: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN + tTileEntity.getOutputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getOutputVoltage())] + ")" + EnumChatFormatting.GRAY);
- }
- if (tTileEntity.getOutputAmperage() > 1L) {
- aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_AMOUNT", "Amperage: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.YELLOW + tTileEntity.getOutputAmperage() + EnumChatFormatting.GRAY);
- }
- aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE", "Capacity: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.BLUE + tTileEntity.getEUCapacity() + EnumChatFormatting.GRAY);
+ TileEntity temp = GregTech_API.sBlockMachines.createTileEntity(aPlayer == null ? GT_Values.DW : aPlayer.worldObj, GregTech_API.METATILEENTITIES[tDamage] == null ? 0 : GregTech_API.METATILEENTITIES[tDamage].getTileEntityBaseType());
+ temp.setWorldObj(aPlayer == null ? GT_Values.DW : aPlayer.worldObj);
+ temp.xCoord = 0;
+ temp.yCoord = 0;
+ temp.zCoord = 0;
+ if ((temp instanceof IGregTechTileEntity)) {
+ IGregTechTileEntity tTileEntity = (IGregTechTileEntity) temp;
+ tTileEntity.setInitialValuesAsNBT(new NBTTagCompound(), (short) tDamage);
+ if (tTileEntity.getDescription() != null) {
+ int i = 0;
+ for (String tDescription : tTileEntity.getDescription()) {
+ if (GT_Utility.isStringValid(tDescription)) {
+ aList.add(GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tDescription, !GregTech_API.sPostloadFinished));
}
}
}
+ if (tTileEntity.getEUCapacity() > 0L) {
+ if (tTileEntity.getInputVoltage() > 0L) {
+ aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_IN", "Voltage IN: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN + tTileEntity.getInputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getInputVoltage())] + ")" + EnumChatFormatting.GRAY);
+ }
+ if (tTileEntity.getOutputVoltage() > 0L) {
+ aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_OUT", "Voltage OUT: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN + tTileEntity.getOutputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getOutputVoltage())] + ")" + EnumChatFormatting.GRAY);
+ }
+ if (tTileEntity.getOutputAmperage() > 1L) {
+ aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_AMOUNT", "Amperage: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.YELLOW + tTileEntity.getOutputAmperage() + EnumChatFormatting.GRAY);
+ }
+ aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE", "Capacity: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.BLUE + tTileEntity.getEUCapacity() + EnumChatFormatting.GRAY);
+ }
}
NBTTagCompound aNBT = aStack.getTagCompound();
if (aNBT != null) {
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
index 489381873e..0168228bc5 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Conveyor.java
@@ -24,7 +24,7 @@ public class GT_Cover_Conveyor
}
TileEntity tTileEntity = aTileEntity.getTileEntityAtSide(aSide);
//aTileEntity.decreaseStoredEnergyUnits(1L, true);
- if (((aCoverVariable % 2 != 1) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (aTileEntity.getUniversalEnergyCapacity() >= 128L)) {
+ if (((aCoverVariable % 2 == 0) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (aTileEntity.getUniversalEnergyCapacity() >= 128L)) {
if (aTileEntity.isUniversalEnergyStored(256L)) {
aTileEntity.decreaseStoredEnergyUnits(4 * GT_Utility.moveOneItemStack(aCoverVariable % 2 == 0 ? aTileEntity : tTileEntity, aCoverVariable % 2 != 0 ? aTileEntity : tTileEntity, aCoverVariable % 2 != 0 ? GT_Utility.getOppositeSide(aSide) : aSide, aCoverVariable % 2 == 0 ? GT_Utility.getOppositeSide(aSide) : aSide, null, false, (byte) 64, (byte) 1, (byte) 64, (byte) 1), true);
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java
index 1a369dc2a2..09a7a9a36b 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java
@@ -72,8 +72,6 @@ public class GT_Cover_Drain
}
public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
- if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
- }
return ((IMachineProgress) aTileEntity).isAllowedToWork() == aCoverVariable < 2;
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java b/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java
index 49d2e09ac9..2ab40531f3 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java
@@ -33,7 +33,7 @@ public class GT_Cover_EnergyOnly
public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
- if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable < 2) {
+ if (((IMachineProgress) aTileEntity).isAllowedToWork()) {
return false;
}
}
@@ -42,7 +42,7 @@ public class GT_Cover_EnergyOnly
public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
- if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable < 2) {
+ if (((IMachineProgress) aTileEntity).isAllowedToWork()) {
return false;
}
}
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
index 570d73e601..2bae554b76 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java
@@ -35,7 +35,7 @@ public class GT_Cover_Pump
tLiquid = tLiquid.copy();
tLiquid.amount = tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid, false);
if (tLiquid.amount > 0) {
- if (((aCoverVariable % 2 != 1) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (aTileEntity.getUniversalEnergyCapacity() >= Math.min(1, tLiquid.amount / 10))) {
+ if (((aCoverVariable % 2 == 0) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (aTileEntity.getUniversalEnergyCapacity() >= Math.min(1, tLiquid.amount / 10))) {
if (aTileEntity.isUniversalEnergyStored(Math.min(1, tLiquid.amount / 10))) {
aTileEntity.decreaseStoredEnergyUnits(Math.min(1, tLiquid.amount / 10), true);
tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tTank1.drain(ForgeDirection.getOrientation(aSide), tLiquid.amount, true), true);
@@ -51,7 +51,7 @@ public class GT_Cover_Pump
tLiquid = tLiquid.copy();
tLiquid.amount = tTank1.fill(ForgeDirection.getOrientation(aSide), tLiquid, false);
if (tLiquid.amount > 0) {
- if (((aCoverVariable % 2 != 1) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (aTileEntity.getUniversalEnergyCapacity() >= Math.min(1, tLiquid.amount / 10))) {
+ if (((aCoverVariable % 2 == 0) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (aTileEntity.getUniversalEnergyCapacity() >= Math.min(1, tLiquid.amount / 10))) {
if (aTileEntity.isUniversalEnergyStored(Math.min(1, tLiquid.amount / 10))) {
aTileEntity.decreaseStoredEnergyUnits(Math.min(1, tLiquid.amount / 10), true);
tTank1.fill(ForgeDirection.getOrientation(aSide), tTank2.drain(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid.amount, true), true);
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java
index 7bca9a1d13..490cfe05a2 100644
--- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java
+++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java
@@ -15,7 +15,7 @@ public abstract class GT_Cover_RedstoneWirelessBase
}
public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if (((aX > 0.375D) && (aX < 0.625D)) || ((aSide > 3) && (((aY > 0.375D) && (aY < 0.625D)) || ((aSide < 2) && (((aZ > 0.375D) && (aZ < 0.625D)) || (aSide == 2) || (aSide == 3)))))) {
+ if (((aX > 0.375D) && (aX < 0.625D)) || ((aSide > 3) && ((aY > 0.375D) && (aY < 0.625D)))) {
GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf((byte) 0));
aCoverVariable = GT_Utility.stackToInt(aPlayer.inventory.getCurrentItem());
aTileEntity.setCoverDataAtSide(aSide, aCoverVariable);
@@ -26,7 +26,7 @@ public abstract class GT_Cover_RedstoneWirelessBase
}
public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) {
- if (((aX > 0.375D) && (aX < 0.625D)) || ((aSide <= 3) || (((aY > 0.375D) && (aY < 0.625D)) || ((aSide >= 2) || (((aZ <= 0.375D) || (aZ >= 0.625D)) && (aSide != 2) && (aSide != 3)))))) {
+ if (((aX > 0.375D) && (aX < 0.625D)) || ((aSide <= 3) || (((aY > 0.375D) && (aY < 0.625D)) || ((((aZ <= 0.375D) || (aZ >= 0.625D))))))) {
GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf((byte) 0));
float[] tCoords = GT_Utility.getClickedFacingCoords(aSide, aX, aY, aZ);
switch ((byte) ((byte) (int) (tCoords[0] * 2.0F) + 2 * (byte) (int) (tCoords[1] * 2.0F))) {
diff --git a/src/main/java/gregtech/common/gui/GT_Container_Boiler.java b/src/main/java/gregtech/common/gui/GT_Container_Boiler.java
index 4a74a43fca..758ccd8d83 100644
--- a/src/main/java/gregtech/common/gui/GT_Container_Boiler.java
+++ b/src/main/java/gregtech/common/gui/GT_Container_Boiler.java
@@ -13,7 +13,7 @@ import java.util.Iterator;
public class GT_Container_Boiler
extends GT_ContainerMetaTile_Machine {
- private final int mSteamCapacity;
+ private int mSteamCapacity = 0;//FB: UR - UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR
public int mWaterAmount = 0;
public int mSteamAmount = 0;
public int mProcessingEnergy = 0;
diff --git a/src/main/java/gregtech/common/gui/GT_Container_Regulator.java b/src/main/java/gregtech/common/gui/GT_Container_Regulator.java
index b2aefe011b..3e8f9402ca 100644
--- a/src/main/java/gregtech/common/gui/GT_Container_Regulator.java
+++ b/src/main/java/gregtech/common/gui/GT_Container_Regulator.java
@@ -77,7 +77,7 @@ public class GT_Container_Regulator
}
return null;
}
- if ((aSlotIndex >= 9) && (aSlotIndex < 18)) {
+ if ((aSlotIndex < 18)) {
ItemStack tStack = aPlayer.inventory.getItemStack();
if (tStack != null) {
tSlot.putStack(GT_Utility.copy(new Object[]{tStack}));
@@ -96,7 +96,7 @@ public class GT_Container_Regulator
}
return null;
}
- if ((aSlotIndex >= 18) && (aSlotIndex < 27)) {
+ if ((aSlotIndex < 27)) {
((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).mTargetSlots[(aSlotIndex - 18)] = Math.min(99, Math.max(0, ((GT_MetaTileEntity_Regulator) this.mTileEntity.getMetaTileEntity()).mTargetSlots[(aSlotIndex - 18)] + (aMouseclick == 0 ? -1 : 1) * (aShifthold == 0 ? 1 : 16)));
return null;
}
diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java
index 613c082b34..805a7a8f2a 100644
--- a/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java
+++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java
@@ -21,7 +21,7 @@ public class GT_GUIContainer_BronzeBlastFurnace
drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
if ((this.mContainer != null) &&
(this.mContainer.mProgressTime > 0)) {
- drawTexturedModalRect(x + 58, y + 28, 176, 0, Math.max(0, Math.min(20, (this.mContainer.mProgressTime > 0 ? 1 : 0) + this.mContainer.mProgressTime * 20 / (this.mContainer.mMaxProgressTime < 1 ? 1 : this.mContainer.mMaxProgressTime))), 11);
+ drawTexturedModalRect(x + 58, y + 28, 176, 0, Math.max(0, Math.min(20, (1) + this.mContainer.mProgressTime * 20 / (this.mContainer.mMaxProgressTime < 1 ? 1 : this.mContainer.mMaxProgressTime))), 11);
}
}
}
diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java
index 6d5b1721d8..ec1a53c0ec 100644
--- a/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java
+++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_FusionReactor.java
@@ -34,9 +34,7 @@ public class GT_GUIContainer_FusionReactor extends GT_GUIContainerMetaTile_Machi
fontRendererObj.drawString("Running perfectly.", 10, 170, 16448255);
}
}
- if (this.mContainer != null) {
- fontRendererObj.drawString(GT_Utility.formatNumbers(this.mContainer.mEnergy) + " EU", 50, 155, 0x00ff0000);
- }
+ fontRendererObj.drawString(GT_Utility.formatNumbers(this.mContainer.mEnergy) + " EU", 50, 155, 0x00ff0000);
}
}
diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java
index d02592f54c..7a2c21d87c 100644
--- a/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java
+++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_Regulator.java
@@ -11,15 +11,15 @@ public class GT_GUIContainer_Regulator
}
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- this.fontRendererObj.drawString("" + ((GT_Container_Regulator) this.mContainer).mTargetSlots[0], 120, 9, 16448255);
- this.fontRendererObj.drawString("" + ((GT_Container_Regulator) this.mContainer).mTargetSlots[1], 137, 9, 16448255);
- this.fontRendererObj.drawString("" + ((GT_Container_Regulator) this.mContainer).mTargetSlots[2], 155, 9, 16448255);
- this.fontRendererObj.drawString("" + ((GT_Container_Regulator) this.mContainer).mTargetSlots[3], 120, 26, 16448255);
- this.fontRendererObj.drawString("" + ((GT_Container_Regulator) this.mContainer).mTargetSlots[4], 137, 26, 16448255);
- this.fontRendererObj.drawString("" + ((GT_Container_Regulator) this.mContainer).mTargetSlots[5], 155, 26, 16448255);
- this.fontRendererObj.drawString("" + ((GT_Container_Regulator) this.mContainer).mTargetSlots[6], 120, 43, 16448255);
- this.fontRendererObj.drawString("" + ((GT_Container_Regulator) this.mContainer).mTargetSlots[7], 137, 43, 16448255);
- this.fontRendererObj.drawString("" + ((GT_Container_Regulator) this.mContainer).mTargetSlots[8], 155, 43, 16448255);
+ this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[0]), 120, 9, 16448255);
+ this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[1]), 137, 9, 16448255);
+ this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[2]), 155, 9, 16448255);
+ this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[3]), 120, 26, 16448255);
+ this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[4]), 137, 26, 16448255);
+ this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[5]), 155, 26, 16448255);
+ this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[6]), 120, 43, 16448255);
+ this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[7]), 137, 43, 16448255);
+ this.fontRendererObj.drawString(String.valueOf(((GT_Container_Regulator) this.mContainer).mTargetSlots[8]), 155, 43, 16448255);
}
protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
diff --git a/src/main/java/gregtech/common/items/GT_SensorCard_Item.java b/src/main/java/gregtech/common/items/GT_SensorCard_Item.java
index 28472ed445..410da7ebe1 100644
--- a/src/main/java/gregtech/common/items/GT_SensorCard_Item.java
+++ b/src/main/java/gregtech/common/items/GT_SensorCard_Item.java
@@ -78,7 +78,7 @@ public class GT_SensorCard_Item
public List<PanelSetting> getSettingsList() {
List<PanelSetting> rList = new ArrayList(30);
for (int i = 0; i < 8; i++) {
- rList.add(new PanelSetting("" + (i + 1), 1 << i, getCardType()));
+ rList.add(new PanelSetting(String.valueOf((i + 1)), 1 << i, getCardType()));
}
return rList;
}
diff --git a/src/main/java/gregtech/common/items/armor/ArmorCalculation.java b/src/main/java/gregtech/common/items/armor/ArmorCalculation.java
index 8915ce6f52..440d6aaef9 100644
--- a/src/main/java/gregtech/common/items/armor/ArmorCalculation.java
+++ b/src/main/java/gregtech/common/items/armor/ArmorCalculation.java
@@ -1,8 +1,5 @@
package gregtech.common.items.armor;
-import java.util.List;
-
-import thaumcraft.api.nodes.IRevealer;
import cpw.mods.fml.common.Loader;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
@@ -12,8 +9,8 @@ import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
-import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
+import thaumcraft.api.nodes.IRevealer;
public class ArmorCalculation {
public static float[] calculateArmor(ItemStack[] parts) {
diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java
index 90daed57dd..f256f036ca 100644
--- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java
+++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java
@@ -1,6 +1,5 @@
package gregtech.common.items.behaviors;
-import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.interfaces.IItemBehaviour;
import gregtech.api.items.GT_MetaBase_Item;
@@ -98,8 +97,6 @@ public class Behaviour_Sonictron
}
public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- if ((!aWorld.isRemote) && (aWorld.getBlock(aX, aY, aZ) == GregTech_API.sBlockMachines) && (aWorld.getBlockMetadata(aX, aY, aZ) == 6)) {
- }
setCurrentIndex(aStack, -1);
return false;
}
diff --git a/src/main/java/gregtech/common/render/GT_CapeRenderer.java b/src/main/java/gregtech/common/render/GT_CapeRenderer.java
index 49ba9a72e8..68c95e9c4f 100644
--- a/src/main/java/gregtech/common/render/GT_CapeRenderer.java
+++ b/src/main/java/gregtech/common/render/GT_CapeRenderer.java
@@ -1,17 +1,8 @@
package gregtech.common.render;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.util.GT_Log;
-import gregtech.api.util.GT_Utility;
-import net.minecraft.client.entity.AbstractClientPlayer;
-import net.minecraft.client.model.ModelBiped;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.entity.RenderPlayer;
-import net.minecraft.potion.Potion;
-import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
-import net.minecraftforge.client.event.RenderPlayerEvent;
-import org.lwjgl.opengl.GL11;
import java.util.Collection;
@@ -19,13 +10,16 @@ public class GT_CapeRenderer
extends RenderPlayer {
private final ResourceLocation[] mCapes = {new ResourceLocation("gregtech:textures/BrainTechCape.png"), new ResourceLocation("gregtech:textures/GregTechCape.png"), new ResourceLocation("gregtech:textures/MrBrainCape.png"), new ResourceLocation("gregtech:textures/GregoriusCape.png")};
private final Collection<String> mCapeList;
+ private static final float glf0 = 0.0F;
+ private static final float glf1 = 1.0F;
public GT_CapeRenderer(Collection<String> aCapeList) {
this.mCapeList = aCapeList;
setRenderManager(RenderManager.instance);
}
- public void receiveRenderSpecialsEvent(RenderPlayerEvent.Specials.Pre aEvent) {
+ //always off in BMPL
+ /*public void receiveRenderSpecialsEvent(RenderPlayerEvent.Specials.Pre aEvent) {
AbstractClientPlayer aPlayer = (AbstractClientPlayer) aEvent.entityPlayer;
if (GT_Utility.getFullInvisibility(aPlayer)) {
aEvent.setCanceled(true);
@@ -55,34 +49,36 @@ public class GT_CapeRenderer
if ((tResource != null) && (!aPlayer.getHideCape())) {
bindTexture(tResource);
GL11.glPushMatrix();
- GL11.glTranslatef(0.0F, 0.0F, 0.125F);
- double d0 = aPlayer.field_71091_bM + (aPlayer.field_71094_bP - aPlayer.field_71091_bM) * aPartialTicks - (aPlayer.prevPosX + (aPlayer.posX - aPlayer.prevPosX) * aPartialTicks);
- double d1 = aPlayer.field_71096_bN + (aPlayer.field_71095_bQ - aPlayer.field_71096_bN) * aPartialTicks - (aPlayer.prevPosY + (aPlayer.posY - aPlayer.prevPosY) * aPartialTicks);
- double d2 = aPlayer.field_71097_bO + (aPlayer.field_71085_bR - aPlayer.field_71097_bO) * aPartialTicks - (aPlayer.prevPosZ + (aPlayer.posZ - aPlayer.prevPosZ) * aPartialTicks);
- float f6 = aPlayer.prevRenderYawOffset + (aPlayer.renderYawOffset - aPlayer.prevRenderYawOffset) * aPartialTicks;
- double d3 = MathHelper.sin(f6 * 3.141593F / 180.0F);
- double d4 = -MathHelper.cos(f6 * 3.141593F / 180.0F);
- float f7 = (float) d1 * 10.0F;
- float f8 = (float) (d0 * d3 + d2 * d4) * 100.0F;
- float f9 = (float) (d0 * d4 - d2 * d3) * 100.0F;
+ GL11.glTranslatef(glf0, glf0, 0.125F);
+ float var1f = (float) (aPlayer.prevPosX + (aPlayer.posX - aPlayer.prevPosX) * aPartialTicks);
+ float d0 = (float) aPlayer.field_71091_bM + var1f;
+ float d1 = (float) aPlayer.field_71096_bN + var1f;
+ float d2 = (float) aPlayer.field_71097_bO + var1f;
+ float f6 = (float) (aPlayer.prevRenderYawOffset + (aPlayer.renderYawOffset - aPlayer.prevRenderYawOffset) * aPartialTicks);
+ float var2f = f6 * 3.141593F / 180.0F;
+ float d3 = MathHelper.sin(var2f);
+ float d4 = -MathHelper.cos(var2f);
+ float f7 = d1 * 10.0F;
+ float f8 = (d0 * d3 + d2 * d4) * 100.0F;
+ float f9 = (d0 * d4 - d2 * d3) * 100.0F;
if (f7 < -6.0F) {
f7 = -6.0F;
}
if (f7 > 32.0F) {
f7 = 32.0F;
}
- if (f8 < 0.0F) {
- f8 = 0.0F;
+ if (f8 < glf0) {
+ f8 = glf0;
}
float f10 = aPlayer.prevCameraYaw + (aPlayer.cameraYaw - aPlayer.prevCameraYaw) * aPartialTicks;
f7 += MathHelper.sin((aPlayer.prevDistanceWalkedModified + (aPlayer.distanceWalkedModified - aPlayer.prevDistanceWalkedModified) * aPartialTicks) * 6.0F) * 32.0F * f10;
if (aPlayer.isSneaking()) {
f7 += 25.0F;
}
- GL11.glRotatef(6.0F + f8 / 2.0F + f7, 1.0F, 0.0F, 0.0F);
- GL11.glRotatef(f9 / 2.0F, 0.0F, 0.0F, 1.0F);
- GL11.glRotatef(-f9 / 2.0F, 0.0F, 1.0F, 0.0F);
- GL11.glRotatef(180.0F, 0.0F, 1.0F, 0.0F);
+ GL11.glRotatef(6.0F + f8 / 2.0F + f7, glf1, glf0, glf0);
+ GL11.glRotatef(f9 / 2.0F, glf0, glf0, glf1);
+ GL11.glRotatef(-f9 / 2.0F, glf0, glf1, glf0);
+ GL11.glRotatef(180.0F, glf0, glf1, glf0);
((ModelBiped) this.mainModel).renderCloak(0.0625F);
GL11.glPopMatrix();
}
@@ -91,5 +87,5 @@ public class GT_CapeRenderer
e.printStackTrace(GT_Log.err);
}
}
- }
+ }*/
}
diff --git a/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java b/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java
index 316b5542a5..0db9e8be6d 100644
--- a/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java
+++ b/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java
@@ -23,8 +23,6 @@ public class GT_MetaGenerated_Item_Renderer
GT_MetaGenerated_Item tItem;
for (Iterator i$ = GT_MetaGenerated_Item.sInstances.values().iterator(); i$.hasNext(); MinecraftForgeClient.registerItemRenderer(tItem, this)) {
tItem = (GT_MetaGenerated_Item) i$.next();
- if ((tItem == null) || (!tItem.useStandardMetaItemRenderer())) {
- }
}
}
diff --git a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
index d898647d0b..8e597eaf91 100644
--- a/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
+++ b/src/main/java/gregtech/common/tileentities/generators/GT_MetaTileEntity_MagicalEnergyAbsorber.java
@@ -28,6 +28,7 @@ import thaumcraft.api.aspects.IEssentiaContainerItem;
import thaumcraft.api.visnet.VisNetHandler;
import java.util.ArrayList;
+import java.util.Locale;
import static gregtech.api.enums.GT_Values.V;
@@ -163,7 +164,7 @@ public class GT_MetaTileEntity_MagicalEnergyAbsorber extends GT_MetaTileEntity_B
if ((this.mInventory[0] != null) && (this.mInventory[1] == null)) {
if (isThaumcraftLoaded && this.mInventory[0].getItem() instanceof IEssentiaContainerItem) {
AspectList tAspect = ((IEssentiaContainerItem) this.mInventory[0].getItem()).getAspects(this.mInventory[0]);
- TC_Aspects tValue = TC_Aspects.valueOf(tAspect.getAspects()[0].getTag().toUpperCase());
+ TC_Aspects tValue = TC_Aspects.valueOf(tAspect.getAspects()[0].getTag().toUpperCase(Locale.ENGLISH));
int tEU = (tValue.mValue * tAspect.getAmount((Aspect) tValue.mAspect) * 100);
getBaseMetaTileEntity().increaseStoredEnergyUnits(tEU * getEfficiency() / 100, true);
ItemStack tStack = this.mInventory[0].copy();
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
index 6aabea8286..260d5f100a 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Pump.java
@@ -154,6 +154,7 @@ public class GT_MetaTileEntity_Pump extends GT_MetaTileEntity_Hatch {
&& (!consumeFluid(((ChunkPosition) this.mPumpList.get(this.mPumpList.size() - 1)).chunkPosX,
((ChunkPosition) this.mPumpList.get(this.mPumpList.size() - 1)).chunkPosY,
((ChunkPosition) this.mPumpList.remove(this.mPumpList.size() - 1)).chunkPosZ))) {
+ //Should this be empty?
}
this.mPumpTimer = 160 / ((int) Math.pow(2, this.mTier));
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java
index 6f3818b47e..b5dab73442 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java
@@ -86,8 +86,6 @@ public class GT_MetaTileEntity_Replicator
Materials tMaterial;
for (Iterator i$ = Materials.VALUES.iterator(); i$.hasNext(); sHeaviestElementMass = Math.max(sHeaviestElementMass, (int) tMaterial.getMass())) {
tMaterial = (Materials) i$.next();
- if ((tMaterial.mElement == null) || (tMaterial.mElement.mIsIsotope)) {
- }
}
}
return sHeaviestElementMass;
diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java
index 50e60f00b3..88eabd2322 100644
--- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java
+++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Scanner.java
@@ -16,7 +16,6 @@ import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.common.items.behaviors.Behaviour_DataOrb;
-import gregtech.common.items.behaviors.Behaviour_DataStick;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -207,11 +206,8 @@ public class GT_MetaTileEntity_Scanner
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (mProgresstime >= (mMaxProgresstime - 1)) {
- try {
- if (this.mOutputItems[0].getUnlocalizedName().equals("gt.metaitem.01.32707")) {
- GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "scanning");
- }
- } catch (Exception e) {
+ if (this.mOutputItems[0].getUnlocalizedName().equals("gt.metaitem.01.32707")) {
+ GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "scanning");
}
}
super.onPostTick(aBaseMetaTileEntity, aTick);
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java
index a4ccb9b6d7..a6028b541b 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_AdvMiner2.java
@@ -32,7 +32,6 @@ import java.util.ArrayList;
public class GT_MetaTileEntity_AdvMiner2 extends GT_MetaTileEntity_MultiBlockBase {
private final ArrayList<ChunkPosition> mMineList = new ArrayList();
- private boolean completedCycle = false;
public GT_MetaTileEntity_AdvMiner2(int aID, String aName, String aNameRegional) {
super(aID, aName, aNameRegional);
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java
index dc7904a027..6877c4155a 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java
@@ -201,10 +201,7 @@ public class GT_MetaTileEntity_BronzeBlastFurnace
this.mOutputItem2 = null;
this.mProgresstime = 0;
this.mMaxProgresstime = 0;
- try {
- GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "steel");
- } catch (Exception e) {
- }
+ GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "steel");
}
} else if (aBaseMetaTileEntity.isAllowedToWork()) {
checkRecipe();
@@ -340,8 +337,6 @@ public class GT_MetaTileEntity_BronzeBlastFurnace
}
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- if (aIndex < 2) {
- }
return !GT_Utility.areStacksEqual(aStack, this.mInventory[0]);
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
index 7d950a490b..2b4f780e8a 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_FusionComputer.java
@@ -103,23 +103,17 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity
&& (addIfInjector(xCenter - 6, yCenter - 1, zCenter + 1, aBaseMetaTileEntity)) && (addIfInjector(xCenter + 6, yCenter - 1, zCenter + 1, aBaseMetaTileEntity))
&& (addIfInjector(xCenter - 6, yCenter - 1, zCenter - 1, aBaseMetaTileEntity)) && (addIfInjector(xCenter + 6, yCenter - 1, zCenter - 1, aBaseMetaTileEntity))
&& (this.mEnergyHatches.size() >= 1) && (this.mOutputHatches.size() >= 1) && (this.mInputHatches.size() >= 2)) {
- if (this.mEnergyHatches != null) {
- for (int i = 0; i < this.mEnergyHatches.size(); i++) {
- if (this.mEnergyHatches.get(i).mTier < tier())
- return false;
- }
+ for (int i = 0; i < this.mEnergyHatches.size(); i++) {
+ if (this.mEnergyHatches.get(i).mTier < tier())
+ return false;
}
- if (this.mOutputHatches != null) {
- for (int i = 0; i < this.mOutputHatches.size(); i++) {
- if (this.mOutputHatches.get(i).mTier < tier())
- return false;
- }
+ for (int i = 0; i < this.mOutputHatches.size(); i++) {
+ if (this.mOutputHatches.get(i).mTier < tier())
+ return false;
}
- if (this.mInputHatches != null) {
- for (int i = 0; i < this.mInputHatches.size(); i++) {
- if (this.mInputHatches.get(i).mTier < tier())
- return false;
- }
+ for (int i = 0; i < this.mInputHatches.size(); i++) {
+ if (this.mInputHatches.get(i).mTier < tier())
+ return false;
}
mWrench = true;
mScrewdriver = true;
@@ -132,17 +126,6 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity
return false;
}
- private boolean checkTier(byte tier, ArrayList<GT_MetaTileEntity_Hatch> list) {
- if (list != null) {
- for (int i = 0; i < list.size(); i++) {
- if (list.get(i).mTier < tier) {
- return false;
- }
- }
- }
- return true;
- }
-
private boolean checkCoils(int aX, int aY, int aZ) {
return (isFusionCoil(aX + 6, aY, aZ - 1)) && (isFusionCoil(aX + 6, aY, aZ)) && (isFusionCoil(aX + 6, aY, aZ + 1)) && (isFusionCoil(aX + 5, aY, aZ - 3)) && (isFusionCoil(aX + 5, aY, aZ - 2))
&& (isFusionCoil(aX + 5, aY, aZ + 2)) && (isFusionCoil(aX + 5, aY, aZ + 3)) && (isFusionCoil(aX + 4, aY, aZ - 4)) && (isFusionCoil(aX + 4, aY, aZ + 4))
@@ -265,21 +248,19 @@ public abstract class GT_MetaTileEntity_FusionComputer extends GT_MetaTileEntity
if (tFluidList.size() > 1) {
FluidStack[] tFluids = tFluidList.toArray(new FluidStack[tFluidList.size()]);
GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sFusionRecipes.findRecipe(this.getBaseMetaTileEntity(), this.mLastRecipe, false, GT_Values.V[8], tFluids, new ItemStack[]{});
- if (tRecipe == null && !mRunningOnLoad) {
+ if (mRunningOnLoad) {
turnCasingActive(false);
this.mLastRecipe = null;
return false;
}
- if (mRunningOnLoad || tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[]{})) {
- this.mLastRecipe = tRecipe;
- this.mEUt = (this.mLastRecipe.mEUt * overclock(this.mLastRecipe.mSpecialValue));
- this.mMaxProgresstime = this.mLastRecipe.mDuration / overclock(this.mLastRecipe.mSpecialValue);
- this.mEfficiencyIncrease = 10000;
- this.mOutputFluids = this.mLastRecipe.mFluidOutputs;
- turnCasingActive(true);
- mRunningOnLoad = false;
- return true;
- }
+ this.mLastRecipe = tRecipe;
+ this.mEUt = (this.mLastRecipe.mEUt * overclock(this.mLastRecipe.mSpecialValue));
+ this.mMaxProgresstime = this.mLastRecipe.mDuration / overclock(this.mLastRecipe.mSpecialValue);
+ this.mEfficiencyIncrease = 10000;
+ this.mOutputFluids = this.mLastRecipe.mFluidOutputs;
+ turnCasingActive(true);
+ mRunningOnLoad = false;
+ return true;
}
return false;
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
index 30a6dd1496..40a72f8165 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeBoiler.java
@@ -151,10 +151,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (mProgresstime > 0 && firstRun) {
firstRun = false;
- try {
- GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "extremepressure");
- } catch (Exception e) {
- }
+ GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "extremepressure");
}
super.onPostTick(aBaseMetaTileEntity, aTick);
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java
index aa1f46afb3..b9c1251453 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_HPSteam.java
@@ -86,10 +86,7 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La
remainingFlow -= flow; // track amount we're allowed to keep depleting from hatches
totalFlow += flow; // track total used
if (!achievement) {
- try {
- GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "efficientsteam");
- } catch (Exception e) {
- }
+ GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "efficientsteam");
achievement = true;
}
}else if(fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name")){
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
index 1023235c59..7fba8ac265 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Steam.java
@@ -95,10 +95,7 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg
remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches
totalFlow += flow; // track total input used
if (!achievement) {
- try {
- GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "muchsteam");
- } catch (Exception e) {
- }
+ GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "muchsteam");
achievement = true;
}
}
diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
index 7183aa30c1..04fab35f7e 100644
--- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
+++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_ProcessingArray.java
@@ -238,13 +238,11 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
List<ItemStack> overStacks = new ArrayList<ItemStack>();
for (int f = 0; f < tOut.length; f++) {
- if (tOut[f].getMaxStackSize() < tOut[f].stackSize) {
- while (tOut[f].getMaxStackSize() < tOut[f].stackSize) {
- ItemStack tmp = tOut[f].copy();
- tmp.stackSize = tmp.getMaxStackSize();
- tOut[f].stackSize = tOut[f].stackSize - tOut[f].getMaxStackSize();
- overStacks.add(tmp);
- }
+ while (tOut[f].getMaxStackSize() < tOut[f].stackSize) {
+ ItemStack tmp = tOut[f].copy();
+ tmp.stackSize = tmp.getMaxStackSize();
+ tOut[f].stackSize = tOut[f].stackSize - tOut[f].getMaxStackSize();
+ overStacks.add(tmp);
}
}
if (overStacks.size() > 0) {
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java
index c62b795adb..0635cb4255 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Bronze.java
@@ -34,13 +34,8 @@ public class GT_MetaTileEntity_AlloySmelter_Bronze
GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[1], null, getAllInputs());
if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) {
this.mOutputItems[0] = tRecipe.getOutput(0);
- if (tRecipe.mEUt <= 16) {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = (tRecipe.mDuration * 2);
- } else {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = (tRecipe.mDuration * 2);
- }
+ this.mEUt = tRecipe.mEUt;
+ this.mMaxProgresstime = (tRecipe.mDuration * 2);
return 2;
}
return 0;
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java
index fe32ca8bce..a93d1fbf8a 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_AlloySmelter_Steel.java
@@ -34,13 +34,8 @@ public class GT_MetaTileEntity_AlloySmelter_Steel
GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sAlloySmelterRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[2], null, getAllInputs());
if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) {
this.mOutputItems[0] = tRecipe.getOutput(0);
- if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * 3);
- this.mMaxProgresstime = tRecipe.mDuration;
- } else {
- this.mEUt = (tRecipe.mEUt * 3);
- this.mMaxProgresstime = tRecipe.mDuration;
- }
+ this.mEUt = (tRecipe.mEUt * 3);
+ this.mMaxProgresstime = tRecipe.mDuration;
return 2;
}
return 0;
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java
index 5b0877a3f1..9ea2efe69d 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Bronze.java
@@ -34,13 +34,8 @@ public class GT_MetaTileEntity_ForgeHammer_Bronze
GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[1], null, getAllInputs());
if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) {
this.mOutputItems[0] = tRecipe.getOutput(0);
- if (tRecipe.mEUt <= 16) {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = (tRecipe.mDuration * 2);
- } else {
- this.mEUt = tRecipe.mEUt;
- this.mMaxProgresstime = (tRecipe.mDuration * 2);
- }
+ this.mEUt = tRecipe.mEUt;
+ this.mMaxProgresstime = (tRecipe.mDuration * 2);
return 2;
}
return 0;
diff --git a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java
index 6d2c7d48a8..63f99c60b4 100644
--- a/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java
+++ b/src/main/java/gregtech/common/tileentities/machines/steam/GT_MetaTileEntity_ForgeHammer_Steel.java
@@ -34,13 +34,8 @@ public class GT_MetaTileEntity_ForgeHammer_Steel
GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sHammerRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[2], null, getAllInputs());
if ((tRecipe != null) && (canOutput(tRecipe.mOutputs)) && (tRecipe.isRecipeInputEqual(true, null, getAllInputs()))) {
this.mOutputItems[0] = tRecipe.getOutput(0);
- if (tRecipe.mEUt <= 16) {
- this.mEUt = (tRecipe.mEUt * 3);
- this.mMaxProgresstime = tRecipe.mDuration;
- } else {
- this.mEUt = (tRecipe.mEUt * 3);
- this.mMaxProgresstime = tRecipe.mDuration;
- }
+ this.mEUt = (tRecipe.mEUt * 3);
+ this.mMaxProgresstime = tRecipe.mDuration;
return 2;
}
return 0;
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Axe.java b/src/main/java/gregtech/common/tools/GT_Tool_Axe.java
index f74aeca505..7affcaa7d4 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Axe.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Axe.java
@@ -80,7 +80,7 @@ public class GT_Tool_Axe
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("axe"))) || (aBlock.getMaterial() == Material.wood);
+ return ((tTool.equals("axe"))) || (aBlock.getMaterial() == Material.wood);
}
public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java b/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java
index 7cefcdfd8d..7aa5d4dce6 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_BranchCutter.java
@@ -60,7 +60,7 @@ public class GT_Tool_BranchCutter
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("grafter"))) || (aBlock.getMaterial() == Material.leaves);
+ return ((tTool.equals("grafter"))) || (aBlock.getMaterial() == Material.leaves);
}
public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_File.java b/src/main/java/gregtech/common/tools/GT_Tool_File.java
index 5bb07c0614..8c2b8deeb2 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_File.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_File.java
@@ -75,7 +75,7 @@ public class GT_Tool_File
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return (tTool != null) && (tTool.equals("file"));
+ return (tTool.equals("file"));
}
public ItemStack getBrokenItem(ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java b/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java
index cf8186b7bc..e7558fb432 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_HardHammer.java
@@ -28,7 +28,7 @@ public class GT_Tool_HardHammer
public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) {
String tName = aEntity.getClass().getName();
- tName = tName.substring(tName.lastIndexOf(".") + 1);
+ tName = tName.substring(tName.lastIndexOf('.') + 1);
return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage;
}
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Plow.java b/src/main/java/gregtech/common/tools/GT_Tool_Plow.java
index a7666d34c8..cb470e5aed 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Plow.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Plow.java
@@ -31,7 +31,7 @@ public class GT_Tool_Plow
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && (tTool.equals("plow"))) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.craftedSnow);
+ return ((tTool.equals("plow"))) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.craftedSnow);
}
public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java b/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java
index ba615a39a1..678e694fc5 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Plunger.java
@@ -43,7 +43,7 @@ public class GT_Tool_Plunger
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return (tTool != null) && (tTool.equals("plunger"));
+ return (tTool.equals("plunger"));
}
public IIconContainer getIcon(boolean aIsToolHead, ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java b/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java
index a49459fc95..4d8a5c2156 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Screwdriver.java
@@ -26,7 +26,7 @@ public class GT_Tool_Screwdriver
public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) {
String tName = aEntity.getClass().getName();
- tName = tName.substring(tName.lastIndexOf(".") + 1);
+ tName = tName.substring(tName.lastIndexOf('.') + 1);
return mEffectiveList.contains(tName) ? aOriginalDamage * 2.0F : aOriginalDamage;
}
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Sense.java b/src/main/java/gregtech/common/tools/GT_Tool_Sense.java
index 55fb257c66..948c1526b9 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Sense.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Sense.java
@@ -31,7 +31,7 @@ public class GT_Tool_Sense
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && ((tTool.equals("sense")) || (tTool.equals("scythe")))) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.leaves);
+ return (((tTool.equals("sense")) || (tTool.equals("scythe")))) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.leaves);
}
public int convertBlockDrops(List<ItemStack> aDrops, ItemStack aStack, EntityPlayer aPlayer, Block aBlock, int aX, int aY, int aZ, byte aMetaData, int aFortune, boolean aSilkTouch, BlockEvent.HarvestDropsEvent aEvent) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java b/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java
index 0b77a45ecd..fc95306ac5 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_SoftHammer.java
@@ -84,7 +84,7 @@ public class GT_Tool_SoftHammer
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return (tTool != null) && (tTool.equals("softhammer"));
+ return (tTool.equals("softhammer"));
}
public ItemStack getBrokenItem(ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java b/src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java
index b104527873..3b164ef030 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Soldering_Iron.java
@@ -25,7 +25,7 @@ public class GT_Tool_Soldering_Iron extends GT_Tool {
public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) {
String tName = aEntity.getClass().getName();
- tName = tName.substring(tName.lastIndexOf(".") + 1);
+ tName = tName.substring(tName.lastIndexOf('.') + 1);
return mEffectiveList.contains(tName) ? aOriginalDamage * 2.0F : aOriginalDamage;
}
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java b/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java
index 03fd6a97a1..df12b92c6e 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_UniversalSpade.java
@@ -79,7 +79,7 @@ public class GT_Tool_UniversalSpade
public boolean isMinableBlock(Block aBlock, byte aMetaData) {
String tTool = aBlock.getHarvestTool(aMetaData);
- return ((tTool != null) && ((tTool.equals("shovel")) || (tTool.equals("axe")) || (tTool.equals("saw")) || (tTool.equals("sword")) || (tTool.equals("crowbar")))) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.wood) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.circuits) || (aBlock.getMaterial() == Material.gourd) || (aBlock.getMaterial() == Material.web) || (aBlock.getMaterial() == Material.cloth) || (aBlock.getMaterial() == Material.carpet) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.cake) || (aBlock.getMaterial() == Material.tnt) || (aBlock.getMaterial() == Material.sponge);
+ return (((tTool.equals("shovel")) || (tTool.equals("axe")) || (tTool.equals("saw")) || (tTool.equals("sword")) || (tTool.equals("crowbar")))) || (aBlock.getMaterial() == Material.sand) || (aBlock.getMaterial() == Material.grass) || (aBlock.getMaterial() == Material.ground) || (aBlock.getMaterial() == Material.snow) || (aBlock.getMaterial() == Material.clay) || (aBlock.getMaterial() == Material.leaves) || (aBlock.getMaterial() == Material.vine) || (aBlock.getMaterial() == Material.wood) || (aBlock.getMaterial() == Material.cactus) || (aBlock.getMaterial() == Material.circuits) || (aBlock.getMaterial() == Material.gourd) || (aBlock.getMaterial() == Material.web) || (aBlock.getMaterial() == Material.cloth) || (aBlock.getMaterial() == Material.carpet) || (aBlock.getMaterial() == Material.plants) || (aBlock.getMaterial() == Material.cake) || (aBlock.getMaterial() == Material.tnt) || (aBlock.getMaterial() == Material.sponge);
}
public ItemStack getBrokenItem(ItemStack aStack) {
diff --git a/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java b/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java
index f5313020cf..2af09fe218 100644
--- a/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java
+++ b/src/main/java/gregtech/common/tools/GT_Tool_Wrench.java
@@ -26,7 +26,7 @@ public class GT_Tool_Wrench
public float getNormalDamageAgainstEntity(float aOriginalDamage, Entity aEntity, ItemStack aStack, EntityPlayer aPlayer) {
String tName = aEntity.getClass().getName();
- tName = tName.substring(tName.lastIndexOf(".") + 1);
+ tName = tName.substring(tName.lastIndexOf('.') + 1);
return (mEffectiveList.contains(tName)) || (tName.contains("Golem")) ? aOriginalDamage * 2.0F : aOriginalDamage;
}
diff --git a/src/main/java/gregtech/loaders/misc/GT_Achievements.java b/src/main/java/gregtech/loaders/misc/GT_Achievements.java
index c02743270c..f13a460dc5 100644
--- a/src/main/java/gregtech/loaders/misc/GT_Achievements.java
+++ b/src/main/java/gregtech/loaders/misc/GT_Achievements.java
@@ -1,9 +1,5 @@
package gregtech.loaders.misc;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
@@ -33,6 +29,10 @@ import net.minecraftforge.event.entity.player.EntityItemPickupEvent;
import net.minecraftforge.fluids.FluidStack;
import thaumcraft.api.ThaumcraftApiHelper;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+
public class GT_Achievements {
public static List<Materials> oreList = new ArrayList<Materials>();
@@ -190,10 +190,8 @@ public class GT_Achievements {
if(Loader.isModLoaded("NotEnoughItems") && GT_Mod.gregtechproxy.mHideUnusedOres){
for (int i = 1; i < GregTech_API.sGeneratedMaterials.length; i++) {
- if (GregTech_API.sGeneratedMaterials[i] != null) {
- if(!oreList.contains(GregTech_API.sGeneratedMaterials[i])){
- codechicken.nei.api.API.hideItem(GT_OreDictUnificator.get(OrePrefixes.ore, GregTech_API.sGeneratedMaterials[i], 1));
- }
+ if ((GregTech_API.sGeneratedMaterials[i] != null) && (!oreList.contains(GregTech_API.sGeneratedMaterials[i]))) {
+ codechicken.nei.api.API.hideItem(GT_OreDictUnificator.get(OrePrefixes.ore, GregTech_API.sGeneratedMaterials[i], 1));
}
}
}
@@ -284,29 +282,27 @@ public class GT_Achievements {
}
ItemData data = GT_OreDictUnificator.getItemData(stack);
- if (data != null) {
- if (data.mPrefix == OrePrefixes.ingot) {
- if (data.mMaterial.mMaterial == Materials.Aluminium) {
- issueAchievement(player, "gtaluminium");
- } else if (data.mMaterial.mMaterial == Materials.Titanium) {
- issueAchievement(player, "titan");
- } else if (data.mMaterial.mMaterial == Materials.BlueSteel) {
- issueAchievement(player, "complexalloys");
- } else if (data.mMaterial.mMaterial == Materials.Tungsten) {
- issueAchievement(player, "tungsten");
- } else if (data.mMaterial.mMaterial == Materials.Osmium) {
- issueAchievement(player, "osmium");
- } else if (data.mMaterial.mMaterial == Materials.TungstenSteel) {
- issueAchievement(player, "tungstensteel");
- } else if (data.mMaterial.mMaterial == Materials.HSSG) {
- issueAchievement(player, "hssg");
- } else if (data.mMaterial.mMaterial == Materials.Naquadah) {
- issueAchievement(player, "stargatematerial");
- } else if (data.mMaterial.mMaterial == Materials.NaquadahAlloy) {
- issueAchievement(player, "alienmetallurgy");
- } else if (data.mMaterial.mMaterial == Materials.Naquadria) {
- issueAchievement(player, "finalpreparations");
- }
+ if ((data != null) && (data.mPrefix == OrePrefixes.ingot)) {
+ if (data.mMaterial.mMaterial == Materials.Aluminium) {
+ issueAchievement(player, "gtaluminium");
+ } else if (data.mMaterial.mMaterial == Materials.Titanium) {
+ issueAchievement(player, "titan");
+ } else if (data.mMaterial.mMaterial == Materials.BlueSteel) {
+ issueAchievement(player, "complexalloys");
+ } else if (data.mMaterial.mMaterial == Materials.Tungsten) {
+ issueAchievement(player, "tungsten");
+ } else if (data.mMaterial.mMaterial == Materials.Osmium) {
+ issueAchievement(player, "osmium");
+ } else if (data.mMaterial.mMaterial == Materials.TungstenSteel) {
+ issueAchievement(player, "tungstensteel");
+ } else if (data.mMaterial.mMaterial == Materials.HSSG) {
+ issueAchievement(player, "hssg");
+ } else if (data.mMaterial.mMaterial == Materials.Naquadah) {
+ issueAchievement(player, "stargatematerial");
+ } else if (data.mMaterial.mMaterial == Materials.NaquadahAlloy) {
+ issueAchievement(player, "alienmetallurgy");
+ } else if (data.mMaterial.mMaterial == Materials.Naquadria) {
+ issueAchievement(player, "finalpreparations");
}
}
if (stack.getUnlocalizedName().equals("ic2.itemPartIndustrialDiamond")) {
@@ -516,10 +512,8 @@ public class GT_Achievements {
} else if (data.mMaterial.mMaterial == Materials.Steel) {
if (data.mPrefix == OrePrefixes.ingot && stack.stackSize == stack.getMaxStackSize()) {
issueAchievement(player, "steel");
- } else if (data.mPrefix == OrePrefixes.nugget && Loader.isModLoaded("Thaumcraft")) {
- if (ThaumcraftApiHelper.isResearchComplete(player.getDisplayName(), "GT_IRON_TO_STEEL")) {
- issueAchievement(player, "steel");
- }
+ } else if ((data.mPrefix == OrePrefixes.nugget) && Loader.isModLoaded("Thaumcraft") && ThaumcraftApiHelper.isResearchComplete(player.getDisplayName(), "GT_IRON_TO_STEEL")) {
+ issueAchievement(player, "steel");
}
} else if (data.mPrefix == OrePrefixes.circuit && data.mMaterial.mMaterial == Materials.Advanced) {
issueAchievement(player, "stepforward");
diff --git a/src/main/java/gregtech/loaders/misc/OreProcessingConfiguration.java b/src/main/java/gregtech/loaders/misc/OreProcessingConfiguration.java
index cafde84836..1c1d4f44a6 100644
--- a/src/main/java/gregtech/loaders/misc/OreProcessingConfiguration.java
+++ b/src/main/java/gregtech/loaders/misc/OreProcessingConfiguration.java
@@ -1,13 +1,14 @@
package gregtech.loaders.misc;
-import java.io.File;
-import java.util.HashMap;
-
import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.common.config.Property;
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+
public class OreProcessingConfiguration
implements Runnable
{
@@ -40,17 +41,12 @@ public class OreProcessingConfiguration
}
}
@Override
- public void run()
- {
- for (String tMaterialName : this.mEnabledMaterials.keySet())
- {
- if (this.mEnabledMaterials.get(tMaterialName))
- {
- Materials.valueOf(tMaterialName).mTypes |= 8;
- }
- else if ((Materials.valueOf(tMaterialName).mTypes & 8) != 0)
- {
- Materials.valueOf(tMaterialName).mTypes ^= 8;
+ public void run() {
+ for (Map.Entry<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;
}
}
}
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBattery.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBattery.java
index 56b8b2af62..cf29bfc947 100644
--- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingBattery.java
+++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingBattery.java
@@ -1,11 +1,7 @@
package gregtech.loaders.oreprocessing;
-import gregtech.api.enums.GT_Values;
-import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
-import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GT_Utility;
import net.minecraft.item.ItemStack;
public class ProcessingBattery implements gregtech.api.interfaces.IOreRecipeRegistrator {
@@ -14,8 +10,8 @@ public class ProcessingBattery implements gregtech.api.interfaces.IOreRecipeRegi
}
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
- if (aMaterial == Materials.Lithium) {
+ /*if (aMaterial == Materials.Lithium) {
// GT_Values.RA.addAssemblerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.getIC2Item("cropnalyzer", 1L, 32767), ItemList.Tool_Scanner.getAlmostBroken(1L, new Object[0]), 12800, 16);
- }
+ }*/
}
}
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java
index df158b8dc8..e9fed85154 100644
--- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java
+++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingCell.java
@@ -61,12 +61,10 @@ public class ProcessingCell
tList.add(GT_Utility.copyAmount(64L, new Object[]{tStack}));
tStack.stackSize -= 64;
}
- if (tStack.stackSize > 0) {
- if (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}) <= 64L) {
- if (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}) < 0L ? tList.size() < 5 : tList.size() < 6) {
- tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack});
- tList.add(tStack);
- }
+ if ((tStack.stackSize > 0) && tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}) <= 64L) {
+ if (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}) < 0L ? tList.size() < 5 : tList.size() < 6) {
+ tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack});
+ tList.add(tStack);
}
}
}
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java
index ee9665d8fa..abf581d8a0 100644
--- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java
+++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDust.java
@@ -76,11 +76,9 @@ public class ProcessingDust implements gregtech.api.interfaces.IOreRecipeRegistr
tList.add(GT_Utility.copyAmount(64L, new Object[]{tStack}));
tStack.stackSize -= 64;
}
- if ((tStack.stackSize > 0) && (tList.size() < 6)) {
- if (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}) <= 64L) {
- tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack});
- tList.add(tStack);
- }
+ if ((tStack.stackSize > 0) && (tList.size() < 6) && (tCapsuleCount + GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack}) <= 64L)) {
+ tCapsuleCount += GT_ModHandler.getCapsuleCellContainerCountMultipliedWithStackSize(new ItemStack[]{tStack});
+ tList.add(tStack);
}
}
}
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java
index 0061937c0a..65942f42a2 100644
--- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java
+++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingDye.java
@@ -12,6 +12,8 @@ import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidRegistry;
+import java.util.Locale;
+
public class ProcessingDye implements IOreRecipeRegistrator {
public ProcessingDye() {
OrePrefixes.dye.add(this);
@@ -23,9 +25,9 @@ public class ProcessingDye implements IOreRecipeRegistrator {
(GT_Utility.getContainerItem(aStack, true) == null)) {
GT_ModHandler.addAlloySmelterRecipe(GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 8L), GT_Utility.copyAmount(1L, new Object[]{aStack}), new ItemStack(Blocks.stained_glass, 8, 15 - aDye.mIndex), 200, 8, false);
GT_ModHandler.addAlloySmelterRecipe(new ItemStack(Blocks.glass, 8, 32767), GT_Utility.copyAmount(1L, new Object[]{aStack}), new ItemStack(Blocks.stained_glass, 8, 15 - aDye.mIndex), 200, 8, false);
- GT_Values.RA.addMixerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, null, null, Materials.Water.getFluid(216L), FluidRegistry.getFluidStack("dye.watermixed." + aDye.name().toLowerCase(), 192), null, 16, 4);
- GT_Values.RA.addMixerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, null, null, GT_ModHandler.getDistilledWater(288L), FluidRegistry.getFluidStack("dye.watermixed." + aDye.name().toLowerCase(), 216), null, 16, 4);
- GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 2), Materials.SulfuricAcid.getFluid(432), FluidRegistry.getFluidStack("dye.chemical." + aDye.name().toLowerCase(), 288), GT_Values.NI, 600, 48);
+ GT_Values.RA.addMixerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, null, null, Materials.Water.getFluid(216L), FluidRegistry.getFluidStack("dye.watermixed." + aDye.name().toLowerCase(Locale.ENGLISH), 192), null, 16, 4);
+ GT_Values.RA.addMixerRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), null, null, null, GT_ModHandler.getDistilledWater(288L), FluidRegistry.getFluidStack("dye.watermixed." + aDye.name().toLowerCase(Locale.ENGLISH), 216), null, 16, 4);
+ GT_Values.RA.addChemicalRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Salt, 2), Materials.SulfuricAcid.getFluid(432), FluidRegistry.getFluidStack("dye.chemical." + aDye.name().toLowerCase(Locale.ENGLISH), 288), GT_Values.NI, 600, 48);
}
}
}
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java
index 80ee117ece..e681552c69 100644
--- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java
+++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingItem.java
@@ -16,37 +16,30 @@ public class ProcessingItem implements gregtech.api.interfaces.IOreRecipeRegistr
}
public void registerOre(OrePrefixes aPrefix, Materials aMaterial, String aOreDictName, String aModName, ItemStack aStack) {
- if (GT_OreDictUnificator.getItemData(aStack) == null) {
-
- if (!aOreDictName.equals("itemCertusQuartz")) {
-
- if (!aOreDictName.equals("itemNetherQuartz")) {
-
- if (aOreDictName.equals("itemSilicon")) {
- GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Silicon, 3628800L, new MaterialStack[0]));
- GT_Values.RA.addFormingPressRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 0L, 19), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 20), 200, 16);
- } else if (aOreDictName.equals("itemWheat")) {
- GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Wheat, 3628800L, new MaterialStack[0]));
- } else if (aOreDictName.equals("itemManganese")) {
- GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Manganese, 3628800L, new MaterialStack[0]));
- } else if (aOreDictName.equals("itemSalt")) {
- GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Salt, 3628800L, new MaterialStack[0]));
- } else if (aOreDictName.equals("itemMagnesium")) {
- GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Magnesium, 3628800L, new MaterialStack[0]));
- } else if ((aOreDictName.equals("itemPhosphorite")) || (aOreDictName.equals("itemPhosphorus"))) {
- GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Phosphorus, 3628800L, new MaterialStack[0]));
- } else if (aOreDictName.equals("itemSulfur")) {
- GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Sulfur, 3628800L, new MaterialStack[0]));
- } else if ((aOreDictName.equals("itemAluminum")) || (aOreDictName.equals("itemAluminium"))) {
- GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Aluminium, 3628800L, new MaterialStack[0]));
- } else if (aOreDictName.equals("itemSaltpeter")) {
- GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Saltpeter, 3628800L, new MaterialStack[0]));
- } else if (aOreDictName.equals("itemUranium")) {
- GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Uranium, 3628800L, new MaterialStack[0]));
- } else {
- //System.out.println("Item Name: " + aOreDictName + " !!!Unknown Item detected!!! Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, it's just an Information.");
- }
- }
+ if ((GT_OreDictUnificator.getItemData(aStack) == null) && !aOreDictName.equals("itemCertusQuartz") && !aOreDictName.equals("itemNetherQuartz")) {
+ if (aOreDictName.equals("itemSilicon")) {
+ GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Silicon, 3628800L, new MaterialStack[0]));
+ GT_Values.RA.addFormingPressRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 0L, 19), GT_ModHandler.getModItem("appliedenergistics2", "item.ItemMultiMaterial", 1L, 20), 200, 16);
+ } else if (aOreDictName.equals("itemWheat")) {
+ GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Wheat, 3628800L, new MaterialStack[0]));
+ } else if (aOreDictName.equals("itemManganese")) {
+ GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Manganese, 3628800L, new MaterialStack[0]));
+ } else if (aOreDictName.equals("itemSalt")) {
+ GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Salt, 3628800L, new MaterialStack[0]));
+ } else if (aOreDictName.equals("itemMagnesium")) {
+ GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Magnesium, 3628800L, new MaterialStack[0]));
+ } else if ((aOreDictName.equals("itemPhosphorite")) || (aOreDictName.equals("itemPhosphorus"))) {
+ GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Phosphorus, 3628800L, new MaterialStack[0]));
+ } else if (aOreDictName.equals("itemSulfur")) {
+ GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Sulfur, 3628800L, new MaterialStack[0]));
+ } else if ((aOreDictName.equals("itemAluminum")) || (aOreDictName.equals("itemAluminium"))) {
+ GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Aluminium, 3628800L, new MaterialStack[0]));
+ } else if (aOreDictName.equals("itemSaltpeter")) {
+ GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Saltpeter, 3628800L, new MaterialStack[0]));
+ } else if (aOreDictName.equals("itemUranium")) {
+ GT_OreDictUnificator.addItemData(aStack, new ItemData(Materials.Uranium, 3628800L, new MaterialStack[0]));
+ } else {
+ //System.out.println("Item Name: " + aOreDictName + " !!!Unknown Item detected!!! Please report to GregTech Intergalactical for additional compatiblity. This is not an Error, it's just an Information.");
}
}
}
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java
index b0b2604ba4..3e7932b423 100644
--- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java
+++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingOre.java
@@ -32,7 +32,6 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra
GT_ModHandler.addValuableOre(GT_Utility.getBlockFromStack(aOreStack), aOreStack.getItemDamage(), aMaterial.mOreValue);
Materials tMaterial = aMaterial.mOreReplacement;
Materials tPrimaryByMaterial = null;
- Materials tSecondaryByMaterial = null;
aMultiplier = Math.max(1, aMultiplier);
aOreStack = GT_Utility.copyAmount(1L, new Object[]{aOreStack});
aOreStack.stackSize = 1;
@@ -42,14 +41,10 @@ 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);
ItemStack tPrimaryByProduct = null;
- ItemStack tPrimaryByProductSmall = null;
- ItemStack tSecondaryByProduct = null;
- ItemStack tSecondaryByProductSmall = null;
if (tCrushed == null) {
tCrushed = GT_OreDictUnificator.get(OrePrefixes.dustImpure, tMaterial, GT_Utility.copyAmount(aMaterial.mOreMultiplier * aMultiplier, new Object[]{tCleaned, tDust, tGem}), aMaterial.mOreMultiplier * aMultiplier);
@@ -63,17 +58,12 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra
if (tPrimaryByProduct == null) {
tPrimaryByMaterial = tMat;
tPrimaryByProduct = GT_OreDictUnificator.get(OrePrefixes.dust, tMat, 1L);
- tPrimaryByProductSmall = GT_OreDictUnificator.get(OrePrefixes.dustSmall, tMat, 1L);
- if (tPrimaryByProductSmall == null)
- tPrimaryByProductSmall = GT_OreDictUnificator.get(OrePrefixes.dustTiny, tMat, GT_OreDictUnificator.get(OrePrefixes.nugget, tMat, 2L), 2L);
+ if (GT_OreDictUnificator.get(OrePrefixes.dustSmall, tMat, 1L) == null)
+ GT_OreDictUnificator.get(OrePrefixes.dustTiny, tMat, GT_OreDictUnificator.get(OrePrefixes.nugget, tMat, 2L), 2L);
}
- if ((tSecondaryByProduct == null) || (tSecondaryByMaterial == tPrimaryByMaterial)) {
- tSecondaryByMaterial = tMat;
- tSecondaryByProduct = GT_OreDictUnificator.get(OrePrefixes.dust, tMat, 1L);
- tSecondaryByProductSmall = GT_OreDictUnificator.get(OrePrefixes.dustSmall, tMat, 1L);
- if (tSecondaryByProductSmall == null) {
- tSecondaryByProductSmall = GT_OreDictUnificator.get(OrePrefixes.dustTiny, tMat, GT_OreDictUnificator.get(OrePrefixes.nugget, tMat, 2L), 2L);
- }
+ GT_OreDictUnificator.get(OrePrefixes.dust, tMat, 1L);
+ if (GT_OreDictUnificator.get(OrePrefixes.dustSmall, tMat, 1L) == null) {
+ GT_OreDictUnificator.get(OrePrefixes.dustTiny, tMat, GT_OreDictUnificator.get(OrePrefixes.nugget, tMat, 2L), 2L);
}
}
if ((!tByProductStacks.isEmpty()) && (!this.mAlreadyListedOres.contains(aMaterial))) {
@@ -83,14 +73,6 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra
if (tPrimaryByMaterial == null) tPrimaryByMaterial = tMaterial;
if (tPrimaryByProduct == null) tPrimaryByProduct = tDust;
- if (tPrimaryByProductSmall == null) {
- tPrimaryByProductSmall = tSmall;
- }
- if (tSecondaryByMaterial == null) tSecondaryByMaterial = tPrimaryByMaterial;
- if (tSecondaryByProduct == null) tSecondaryByProduct = tPrimaryByProduct;
- if (tSecondaryByProductSmall == null) {
- tSecondaryByProductSmall = tPrimaryByProductSmall;
- }
boolean tHasSmelting = false;
if (tSmeltInto != null) {
@@ -110,7 +92,9 @@ public class ProcessingOre implements gregtech.api.interfaces.IOreRecipeRegistra
}
if (!tHasSmelting) {
- tHasSmelting = GT_ModHandler.addSmeltingRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial.mDirectSmelting, Math.max(1, aMultiplier * aMaterial.mSmeltingMultiplier / 2)));
+ //dead code?
+ //tHasSmelting = GT_ModHandler.addSmeltingRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial.mDirectSmelting, Math.max(1, aMultiplier * aMaterial.mSmeltingMultiplier / 2)));
+ GT_ModHandler.addSmeltingRecipe(aOreStack, GT_OreDictUnificator.get(OrePrefixes.gem, tMaterial.mDirectSmelting, Math.max(1, aMultiplier * aMaterial.mSmeltingMultiplier / 2)));
}
if (tCrushed != null) {
diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java
index 0ab6d19e59..c855691d49 100644
--- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java
+++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingPlank.java
@@ -42,10 +42,8 @@ public class ProcessingPlank implements gregtech.api.interfaces.IOreRecipeRegist
GT_ModHandler.removeRecipe(new ItemStack[]{tStack, tStack, tStack});
GT_ModHandler.addCraftingRecipe(GT_Utility.copyAmount(tOutput.stackSize / 3, new Object[]{tOutput}), new Object[]{"sP", Character.valueOf('P'), tStack});
}
- if(tStack==null){
- if(i>=16){
- break;
- }
+ if((tStack == null) && (i >= 16)){
+ break;
}
}
} else {
diff --git a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java
index 75f141367a..8737004ccb 100644
--- a/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java
+++ b/src/main/java/gregtech/loaders/preload/GT_Loader_Item_Block_And_Fluid.java
@@ -29,6 +29,8 @@ import net.minecraftforge.fluids.FluidContainerRegistry;
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;
+import java.util.Locale;
+
public class GT_Loader_Item_Block_And_Fluid
implements Runnable {
public void run() {
@@ -450,8 +452,8 @@ public class GT_Loader_Item_Block_And_Fluid
for (byte i = 0; i < Dyes.VALUES.length; i = (byte) (i + 1)) {
Dyes tDye = Dyes.VALUES[i];
Fluid tFluid;
- tDye.addFluidDye(tFluid = GT_Mod.gregtechproxy.addFluid("dye.watermixed." + tDye.name().toLowerCase(), "dyes", "Water Mixed " + tDye.mName + " Dye", null, tDye.getRGBA(), 1, 295, null, null, 0));
- tDye.addFluidDye(tFluid = GT_Mod.gregtechproxy.addFluid("dye.chemical." + tDye.name().toLowerCase(), "dyes", "Chemical " + tDye.mName + " Dye", null, tDye.getRGBA(), 1, 295, null, null, 0));
+ tDye.addFluidDye(tFluid = GT_Mod.gregtechproxy.addFluid("dye.watermixed." + tDye.name().toLowerCase(Locale.ENGLISH), "dyes", "Water Mixed " + tDye.mName + " Dye", null, tDye.getRGBA(), 1, 295, null, null, 0));
+ tDye.addFluidDye(tFluid = GT_Mod.gregtechproxy.addFluid("dye.chemical." + tDye.name().toLowerCase(Locale.ENGLISH), "dyes", "Chemical " + tDye.mName + " Dye", null, tDye.getRGBA(), 1, 295, null, null, 0));
FluidContainerRegistry.registerFluidContainer(new FluidStack(tFluid, 2304), ItemList.SPRAY_CAN_DYES[i].get(1L, new Object[0]), ItemList.Spray_Empty.get(1L, new Object[0]));
}
GT_Mod.gregtechproxy.addFluid("ice", "Crushed Ice", Materials.Ice, 0, 270, GT_OreDictUnificator.get(OrePrefixes.cell, Materials.Ice, 1L), ItemList.Cell_Empty.get(1L, new Object[0]), 1000);
diff --git a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java
index 545bfd836c..35b71b24e9 100644
--- a/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java
+++ b/src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java
@@ -289,8 +289,7 @@ public class GT_NEI_DefaultHandler
}
}
- public class FixedPositionedStack
- extends PositionedStack {
+ public static class FixedPositionedStack extends PositionedStack {
public final int mChance;
public boolean permutated = false;