diff options
Diffstat (limited to 'src/main/java/gregtech/api/util')
-rw-r--r-- | src/main/java/gregtech/api/util/GT_Config.java | 3 | ||||
-rw-r--r-- | src/main/java/gregtech/api/util/GT_FoodStat.java | 3 | ||||
-rw-r--r-- | src/main/java/gregtech/api/util/GT_IBoxableWrapper.java | 3 | ||||
-rw-r--r-- | src/main/java/gregtech/api/util/GT_ModHandler.java | 344 | ||||
-rw-r--r-- | src/main/java/gregtech/api/util/GT_Recipe.java | 368 | ||||
-rw-r--r-- | src/main/java/gregtech/api/util/GT_Utility.java | 227 |
6 files changed, 471 insertions, 477 deletions
diff --git a/src/main/java/gregtech/api/util/GT_Config.java b/src/main/java/gregtech/api/util/GT_Config.java index 9ad2ebab50..3ba9603114 100644 --- a/src/main/java/gregtech/api/util/GT_Config.java +++ b/src/main/java/gregtech/api/util/GT_Config.java @@ -1,14 +1,13 @@ package gregtech.api.util; import static gregtech.api.enums.GT_Values.E; -import static gregtech.api.enums.GT_Values.F; import gregtech.api.GregTech_API; import net.minecraft.item.ItemStack; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.common.config.Property; public class GT_Config implements Runnable { - public static boolean troll = F; + public static boolean troll = false; public static Configuration sConfigFileIDs; diff --git a/src/main/java/gregtech/api/util/GT_FoodStat.java b/src/main/java/gregtech/api/util/GT_FoodStat.java index a2134290cf..336aeeab9c 100644 --- a/src/main/java/gregtech/api/util/GT_FoodStat.java +++ b/src/main/java/gregtech/api/util/GT_FoodStat.java @@ -1,6 +1,5 @@ package gregtech.api.util; -import static gregtech.api.enums.GT_Values.F; import gregtech.api.damagesources.GT_DamageSources; import gregtech.api.interfaces.IFoodStat; import gregtech.api.items.GT_MetaBase_Item; @@ -17,7 +16,7 @@ public class GT_FoodStat implements IFoodStat { private final EnumAction mAction; private final ItemStack mEmptyContainer; private final boolean mAlwaysEdible, mInvisibleParticles, mIsRotten; - private boolean mExplosive = F, mMilk = F; + private boolean mExplosive = false, mMilk = false; /** * @param aFoodLevel Amount of Food in Half Bacon [0 - 20] diff --git a/src/main/java/gregtech/api/util/GT_IBoxableWrapper.java b/src/main/java/gregtech/api/util/GT_IBoxableWrapper.java index 8511f76c49..03ffc6755a 100644 --- a/src/main/java/gregtech/api/util/GT_IBoxableWrapper.java +++ b/src/main/java/gregtech/api/util/GT_IBoxableWrapper.java @@ -1,12 +1,11 @@ package gregtech.api.util; -import static gregtech.api.enums.GT_Values.T; import ic2.api.item.IBoxable; import net.minecraft.item.ItemStack; public class GT_IBoxableWrapper implements IBoxable { @Override public boolean canBeStoredInToolbox(ItemStack itemstack) { - return T; + return true; } }
\ No newline at end of file diff --git a/src/main/java/gregtech/api/util/GT_ModHandler.java b/src/main/java/gregtech/api/util/GT_ModHandler.java index b657c8ee3f..e7c95e5905 100644 --- a/src/main/java/gregtech/api/util/GT_ModHandler.java +++ b/src/main/java/gregtech/api/util/GT_ModHandler.java @@ -16,7 +16,6 @@ import ic2.api.reactor.IReactorComponent; import ic2.api.recipe.IRecipeInput; import ic2.api.recipe.RecipeInputItemStack; import ic2.api.recipe.RecipeOutput; -import ic2.core.AdvRecipe; import java.util.*; import java.util.Map.Entry; @@ -38,7 +37,6 @@ import net.minecraft.tileentity.TileEntityFurnace; import net.minecraft.world.World; import net.minecraftforge.fluids.FluidRegistry; import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.ShapedOreRecipe; import net.minecraftforge.oredict.ShapelessOreRecipe; import cpw.mods.fml.common.event.FMLInterModComms; @@ -58,7 +56,7 @@ public class GT_ModHandler { * Returns if that Liquid is Water or Distilled Water */ public static boolean isWater(FluidStack aFluid) { - if (aFluid == null) return F; + if (aFluid == null) return false; return aFluid.isFluidEqual(getWater(1)) || aFluid.isFluidEqual(getDistilledWater(1)); } @@ -80,7 +78,7 @@ public class GT_ModHandler { * Returns if that Liquid is Lava */ public static boolean isLava(FluidStack aFluid) { - if (aFluid == null) return F; + if (aFluid == null) return false; return aFluid.isFluidEqual(getLava(1)); } @@ -95,7 +93,7 @@ public class GT_ModHandler { * Returns if that Liquid is Steam */ public static boolean isSteam(FluidStack aFluid) { - if (aFluid == null) return F; + if (aFluid == null) return false; return aFluid.isFluidEqual(getSteam(1)); } @@ -110,7 +108,7 @@ public class GT_ModHandler { * Returns if that Liquid is Milk */ public static boolean isMilk(FluidStack aFluid) { - if (aFluid == null) return F; + if (aFluid == null) return false; return aFluid.isFluidEqual(getMilk(1)); } @@ -174,7 +172,7 @@ public class GT_ModHandler { * @return the exact Value in EU the Fuel Can is worth if its even a Fuel Can. */ public static int getFuelCanValue(ItemStack aFuelCan) { - if (GT_Utility.isStackInvalid(aFuelCan) || !ItemList.IC2_Fuel_Can_Filled.isStackEqual(aFuelCan, F, T)) return 0; + if (GT_Utility.isStackInvalid(aFuelCan) || !ItemList.IC2_Fuel_Can_Filled.isStackEqual(aFuelCan, false, true)) return 0; NBTTagCompound tNBT = aFuelCan.getTagCompound(); return tNBT==null?0:tNBT.getInteger("value")*5; } @@ -254,82 +252,82 @@ public class GT_ModHandler { * OUT OF ORDER */ public static boolean getModeKeyDown(EntityPlayer aPlayer) { - return F; + return false; } /** * OUT OF ORDER */ public static boolean getBoostKeyDown(EntityPlayer aPlayer) { - return F; + return false; } /** * OUT OF ORDER */ public static boolean getJumpKeyDown(EntityPlayer aPlayer) { - return F; + return false; } /** * Adds a Valuable Ore to the Miner */ public static boolean addValuableOre(Block aBlock, int aMeta, int aValue) { - if (aValue <= 0) return F; + if (aValue <= 0) return false; try { Class.forName("ic2.core.IC2").getMethod("addValuableOre", IRecipeInput.class, int.class).invoke(null, new RecipeInputItemStack(new ItemStack(aBlock, 1, aMeta)), aValue); } catch (Throwable e) {/*Do nothing*/} - return T; + return true; } /** * Adds a Scrapbox Drop. Fails at April first for the "suddenly Hoes"-Feature of IC2 */ public static boolean addScrapboxDrop(float aChance, ItemStack aOutput) { - aOutput = GT_OreDictUnificator.get(T, aOutput); - if (aOutput == null || aChance <= 0) return F; + aOutput = GT_OreDictUnificator.get(true, aOutput); + if (aOutput == null || aChance <= 0) return false; aOutput.stackSize = 1; - if (GT_Config.troll && !GT_Utility.areStacksEqual(aOutput, new ItemStack(Items.wooden_hoe, 1, 0))) return F; + if (GT_Config.troll && !GT_Utility.areStacksEqual(aOutput, new ItemStack(Items.wooden_hoe, 1, 0))) return false; aChance = (float)GregTech_API.sRecipeFile.get(ConfigCategories.Machines.scrapboxdrops, aOutput, aChance); - if (aChance <= 0) return F; + if (aChance <= 0) return false; try { - GT_Utility.callMethod(GT_Utility.getFieldContent("ic2.api.recipe.Recipes", "scrapboxDrops", T, T), "addDrop", T, F, T, GT_Utility.copy(aOutput), aChance); - GT_Utility.callMethod(GT_Utility.getFieldContent("ic2.api.recipe.Recipes", "scrapboxDrops", T, T), "addRecipe", T, T, F, GT_Utility.copy(aOutput), aChance); + GT_Utility.callMethod(GT_Utility.getFieldContent("ic2.api.recipe.Recipes", "scrapboxDrops", true , true), "addDrop", true , false, true , GT_Utility.copy(aOutput), aChance); + GT_Utility.callMethod(GT_Utility.getFieldContent("ic2.api.recipe.Recipes", "scrapboxDrops", true , true), "addRecipe", true , true , false, GT_Utility.copy(aOutput), aChance); } catch (Throwable e) {/*Do nothing*/} - return T; + return true; } /** * Adds an Item to the Recycler Blacklist */ public static boolean addToRecyclerBlackList(ItemStack aRecycledStack) { - if (aRecycledStack == null) return F; + if (aRecycledStack == null) return false; try { ic2.api.recipe.Recipes.recyclerBlacklist.add(new RecipeInputItemStack(aRecycledStack)); } catch (Throwable e) {/*Do nothing*/} - return T; + return true; } /** * Just simple Furnace smelting. Unbelievable how Minecraft fails at making a simple ItemStack->ItemStack mapping... */ public static boolean addSmeltingRecipe(ItemStack aInput, ItemStack aOutput) { - aOutput = GT_OreDictUnificator.get(T, aOutput); - if (aInput == null || aOutput == null || GT_Utility.getContainerItem(aInput, F) != null) return F; - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.smelting, aInput, T)) return F; + aOutput = GT_OreDictUnificator.get(true, aOutput); + if (aInput == null || aOutput == null || GT_Utility.getContainerItem(aInput, false) != null) return false; + if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.smelting, aInput, true)) return false; FurnaceRecipes.smelting().func_151394_a(aInput, GT_Utility.copy(aOutput), 0.0F); - return T; + return true; } /** * Adds to Furnace AND Alloysmelter AND Induction Smelter */ public static boolean addSmeltingAndAlloySmeltingRecipe(ItemStack aInput, ItemStack aOutput) { - if (aInput == null || aOutput == null) return F; - boolean temp = F; - if (aInput.stackSize == 1 && addSmeltingRecipe(aInput, aOutput)) temp = T; - if (RA.addAlloySmelterRecipe(aInput, OrePrefixes.ingot.contains(aOutput)?ItemList.Shape_Mold_Ingot.get(0):OrePrefixes.block.contains(aOutput)?ItemList.Shape_Mold_Block.get(0):OrePrefixes.nugget.contains(aOutput)?ItemList.Shape_Mold_Nugget.get(0):null, aOutput, 130, 3)) temp = T; - if (addInductionSmelterRecipe(aInput, null, aOutput, null, aOutput.stackSize*1600, 0)) temp = T; + if (aInput == null || aOutput == null) return false; + boolean temp = false; + if (aInput.stackSize == 1 && addSmeltingRecipe(aInput, aOutput)) temp = true; + if (RA.addAlloySmelterRecipe(aInput, OrePrefixes.ingot.contains(aOutput)?ItemList.Shape_Mold_Ingot.get(0):OrePrefixes.block.contains(aOutput)?ItemList.Shape_Mold_Block.get(0):OrePrefixes.nugget.contains(aOutput)?ItemList.Shape_Mold_Nugget.get(0):null, aOutput, 130, 3)) temp = true; + if (addInductionSmelterRecipe(aInput, null, aOutput, null, aOutput.stackSize*1600, 0)) temp = true; return temp; } @@ -337,80 +335,80 @@ public class GT_ModHandler { * LiquidTransposer Recipe for both directions */ public static boolean addLiquidTransposerRecipe(ItemStack aEmptyContainer, FluidStack aLiquid, ItemStack aFullContainer, int aMJ) { - aFullContainer = GT_OreDictUnificator.get(T, aFullContainer); - if (aEmptyContainer == null || aFullContainer == null || aLiquid == null) return F; - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.liquidtransposer, aFullContainer, T)) return F; + aFullContainer = GT_OreDictUnificator.get(true, aFullContainer); + if (aEmptyContainer == null || aFullContainer == null || aLiquid == null) return false; + if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.liquidtransposer, aFullContainer, true)) return false; try { - ThermalExpansion.addTransposerFill(aMJ*10, aEmptyContainer, aFullContainer, aLiquid, T); + ThermalExpansion.addTransposerFill(aMJ*10, aEmptyContainer, aFullContainer, aLiquid, true); } catch(Throwable e) {/*Do nothing*/} - return T; + return true; } /** * LiquidTransposer Recipe for filling Containers */ public static boolean addLiquidTransposerFillRecipe(ItemStack aEmptyContainer, FluidStack aLiquid, ItemStack aFullContainer, int aMJ) { - aFullContainer = GT_OreDictUnificator.get(T, aFullContainer); - if (aEmptyContainer == null || aFullContainer == null || aLiquid == null) return F; - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.liquidtransposerfilling, aFullContainer, T)) return F; + aFullContainer = GT_OreDictUnificator.get(true, aFullContainer); + if (aEmptyContainer == null || aFullContainer == null || aLiquid == null) return false; + if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.liquidtransposerfilling, aFullContainer, true)) return false; try { - ThermalExpansion.addTransposerFill(aMJ*10, aEmptyContainer, aFullContainer, aLiquid, F); + ThermalExpansion.addTransposerFill(aMJ*10, aEmptyContainer, aFullContainer, aLiquid, false); } catch(Throwable e) {/*Do nothing*/} - return T; + return true; } /** * LiquidTransposer Recipe for emptying Containers */ public static boolean addLiquidTransposerEmptyRecipe(ItemStack aFullContainer, FluidStack aLiquid, ItemStack aEmptyContainer, int aMJ) { - aEmptyContainer = GT_OreDictUnificator.get(T, aEmptyContainer); - if (aFullContainer == null || aEmptyContainer == null || aLiquid == null) return F; - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.liquidtransposeremptying, aFullContainer, T)) return F; + aEmptyContainer = GT_OreDictUnificator.get(true, aEmptyContainer); + if (aFullContainer == null || aEmptyContainer == null || aLiquid == null) return false; + if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.liquidtransposeremptying, aFullContainer, true)) return false; try { - ThermalExpansion.addTransposerExtract(aMJ*10, aFullContainer, aEmptyContainer, aLiquid, 100, F); + ThermalExpansion.addTransposerExtract(aMJ*10, aFullContainer, aEmptyContainer, aLiquid, 100, false); } catch(Throwable e) {/*Do nothing*/} - return T; + return true; } /** * IC2-Extractor Recipe. Overloads old Recipes automatically */ public static boolean addExtractionRecipe(ItemStack aInput, ItemStack aOutput) { - aOutput = GT_OreDictUnificator.get(T, aOutput); - if (aInput == null || aOutput == null) return F; + aOutput = GT_OreDictUnificator.get(true, aOutput); + if (aInput == null || aOutput == null) return false; GT_Utility.removeSimpleIC2MachineRecipe(aInput, getExtractorRecipeList(), null); - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.extractor, aInput, T)) return F; + if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.extractor, aInput, true)) return false; GT_Utility.addSimpleIC2MachineRecipe(aInput, getExtractorRecipeList(), null, aOutput); - return T; + return true; } /** * RC-BlastFurnace Recipes */ public static boolean addRCBlastFurnaceRecipe(ItemStack aInput, ItemStack aOutput, int aTime) { - aOutput = GT_OreDictUnificator.get(T, aOutput); - if (aInput == null || aOutput == null || aTime <= 0) return F; - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.rcblastfurnace, aInput, T)) return F; + aOutput = GT_OreDictUnificator.get(true, aOutput); + if (aInput == null || aOutput == null || aTime <= 0) return false; + if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.rcblastfurnace, aInput, true)) return false; aInput = GT_Utility.copy(aInput); aOutput = GT_Utility.copy(aOutput); try { - mods.railcraft.api.crafting.RailcraftCraftingManager.blastFurnace.addRecipe(aInput, T, F, aTime, aOutput); + mods.railcraft.api.crafting.RailcraftCraftingManager.blastFurnace.addRecipe(aInput, true , false, aTime, aOutput); } catch (Throwable e) { - return F; + return false; } - return T; + return true; } public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1) { - return addPulverisationRecipe(aInput, aOutput1, null, 0, F); + return addPulverisationRecipe(aInput, aOutput1, null, 0, false); } public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2) { - return addPulverisationRecipe(aInput, aOutput1, aOutput2, 100, F); + return addPulverisationRecipe(aInput, aOutput1, aOutput2, 100, false); } public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance) { - return addPulverisationRecipe(aInput, aOutput1, aOutput2, aChance, F); + return addPulverisationRecipe(aInput, aOutput1, aOutput2, aChance, false); } public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, boolean aOverwrite) { @@ -429,13 +427,13 @@ public class GT_ModHandler { * Adds Several Pulverizer-Type Recipes. */ public static boolean addPulverisationRecipe(ItemStack aInput, ItemStack aOutput1, ItemStack aOutput2, int aChance2, ItemStack aOutput3, int aChance3, boolean aOverwrite) { - aOutput1 = GT_OreDictUnificator.get(T, aOutput1); - aOutput2 = GT_OreDictUnificator.get(T, aOutput2); - if (GT_Utility.isStackInvalid(aInput) || GT_Utility.isStackInvalid(aOutput1)) return F; + aOutput1 = GT_OreDictUnificator.get(true, aOutput1); + aOutput2 = GT_OreDictUnificator.get(true, aOutput2); + if (GT_Utility.isStackInvalid(aInput) || GT_Utility.isStackInvalid(aOutput1)) return false; GT_Utility.removeSimpleIC2MachineRecipe(aInput, getMaceratorRecipeList(), null); - if (GT_Utility.getContainerItem(aInput, F) == null) { - if (GregTech_API.sRecipeFile.get(ConfigCategories.Machines.maceration, aInput, T)) { + if (GT_Utility.getContainerItem(aInput, false) == null) { + if (GregTech_API.sRecipeFile.get(ConfigCategories.Machines.maceration, aInput, true)) { GT_Utility.addSimpleIC2MachineRecipe(aInput, getMaceratorRecipeList(), null, aOutput1); } @@ -443,24 +441,24 @@ public class GT_ModHandler { if (!OrePrefixes.log.contains(aInput)) { if (Materials.Wood.contains(aOutput1)) { - if (GregTech_API.sRecipeFile.get(ConfigCategories.Machines.pulverization, aInput, T)) { + if (GregTech_API.sRecipeFile.get(ConfigCategories.Machines.pulverization, aInput, true)) { if (aOutput2 == null) ThermalExpansion.addSawmillRecipe(32000, GT_Utility.copy(aInput), GT_Utility.copy(aOutput1)); else ThermalExpansion.addSawmillRecipe(32000, GT_Utility.copy(aInput), GT_Utility.copy(aOutput1), GT_Utility.copy(aOutput2), aChance2<=0?10:aChance2); } } else { - if (GregTech_API.sRecipeFile.get(ConfigCategories.Machines.rockcrushing, aInput, T)) { + if (GregTech_API.sRecipeFile.get(ConfigCategories.Machines.rockcrushing, aInput, true)) { try { if (GT_Utility.getBlockFromStack(aInput) != Blocks.obsidian && GT_Utility.getBlockFromStack(aInput) != Blocks.gravel) { - mods.railcraft.api.crafting.IRockCrusherRecipe tRecipe = mods.railcraft.api.crafting.RailcraftCraftingManager.rockCrusher.createNewRecipe(GT_Utility.copyAmount(1, aInput), aInput.getItemDamage() != W, F); + mods.railcraft.api.crafting.IRockCrusherRecipe tRecipe = mods.railcraft.api.crafting.RailcraftCraftingManager.rockCrusher.createNewRecipe(GT_Utility.copyAmount(1, aInput), aInput.getItemDamage() != W, false); tRecipe.addOutput(GT_Utility.copy(aOutput1), 1.0F/aInput.stackSize); if (aOutput2 != null) tRecipe.addOutput(GT_Utility.copy(aOutput2), (0.01F*(aChance2<=0?10:aChance2))/aInput.stackSize); if (aOutput3 != null) tRecipe.addOutput(GT_Utility.copy(aOutput3), (0.01F*(aChance3<=0?10:aChance3))/aInput.stackSize); } } catch(Throwable e) {/*Do nothing*/} } - if (GregTech_API.sRecipeFile.get(ConfigCategories.Machines.pulverization, aInput, T)) { + if (GregTech_API.sRecipeFile.get(ConfigCategories.Machines.pulverization, aInput, true)) { if (aOutput2 == null) ThermalExpansion.addPulverizerRecipe(32000, GT_Utility.copy(aInput), GT_Utility.copy(aOutput1)); else @@ -469,32 +467,32 @@ public class GT_ModHandler { } } } - return T; + return true; } /** * Adds a Recipe to the Sawmills of GregTech and ThermalCraft */ public static boolean addSawmillRecipe(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2) { - aOutput1 = GT_OreDictUnificator.get(T, aOutput1); - aOutput2 = GT_OreDictUnificator.get(T, aOutput2); - if (aInput1 == null || aOutput1 == null) return F; - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.sawmill, aInput1, T)) return F; + aOutput1 = GT_OreDictUnificator.get(true, aOutput1); + aOutput2 = GT_OreDictUnificator.get(true, aOutput2); + if (aInput1 == null || aOutput1 == null) return false; + if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.sawmill, aInput1, true)) return false; try { ThermalExpansion.addSawmillRecipe(1600, aInput1, aOutput1, aOutput2, 100); } catch(Throwable e) {/*Do nothing*/} - return T; + return true; } /** * Induction Smelter Recipes and Alloy Smelter Recipes */ public static boolean addAlloySmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt, boolean aAllowSecondaryInputEmpty) { - if (aInput1 == null || (aInput2 == null && !aAllowSecondaryInputEmpty) || aOutput1 == null) return F; - aOutput1 = GT_OreDictUnificator.get(T, aOutput1); - boolean temp = F; - if (RA.addAlloySmelterRecipe(aInput1, aInput2, aOutput1, aDuration, aEUt)) temp = T; - if (addInductionSmelterRecipe(aInput1, aInput2, aOutput1, null, aDuration * aEUt * 2, 0)) temp = T; + if (aInput1 == null || (aInput2 == null && !aAllowSecondaryInputEmpty) || aOutput1 == null) return false; + aOutput1 = GT_OreDictUnificator.get(true, aOutput1); + boolean temp = false; + if (RA.addAlloySmelterRecipe(aInput1, aInput2, aOutput1, aDuration, aEUt)) temp = true; + if (addInductionSmelterRecipe(aInput1, aInput2, aOutput1, null, aDuration * aEUt * 2, 0)) temp = true; return temp; } @@ -502,24 +500,24 @@ public class GT_ModHandler { * Induction Smelter Recipes for TE */ public static boolean addInductionSmelterRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, ItemStack aOutput2, int aEnergy, int aChance) { - aOutput1 = GT_OreDictUnificator.get(T, aOutput1); - aOutput2 = GT_OreDictUnificator.get(T, aOutput2); - if (aInput1 == null || aOutput1 == null || GT_Utility.getContainerItem(aInput1, F) != null) return F; - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.inductionsmelter, aInput2==null?aInput1:aOutput1, T)) return F; + aOutput1 = GT_OreDictUnificator.get(true, aOutput1); + aOutput2 = GT_OreDictUnificator.get(true, aOutput2); + if (aInput1 == null || aOutput1 == null || GT_Utility.getContainerItem(aInput1, false) != null) return false; + if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.inductionsmelter, aInput2==null?aInput1:aOutput1, true)) return false; try { ThermalExpansion.addSmelterRecipe(aEnergy*10, GT_Utility.copy(aInput1), aInput2==null?new ItemStack(Blocks.sand, 1, 0):aInput2, aOutput1, aOutput2, aChance); } catch(Throwable e) {/*Do nothing*/} - return T; + return true; } /** * Smelts Ores to Ingots */ public static boolean addOreToIngotSmeltingRecipe(ItemStack aInput, ItemStack aOutput) { - aOutput = GT_OreDictUnificator.get(T, aOutput); - if (aInput == null || aOutput == null) return F; + aOutput = GT_OreDictUnificator.get(true, aOutput); + if (aInput == null || aOutput == null) return false; FurnaceRecipes.smelting().func_151394_a(aInput, GT_Utility.copy(aOutput), 0.0F); - return T; + return true; } private static Map<IRecipeInput, RecipeOutput> sExtractorRecipes = new HashMap<IRecipeInput, RecipeOutput>(); @@ -575,74 +573,74 @@ public class GT_ModHandler { * IC2-ThermalCentrifuge Recipe. Overloads old Recipes automatically */ public static boolean addThermalCentrifugeRecipe(ItemStack aInput, int aHeat, Object... aOutput) { - if (aInput == null || aOutput == null || aOutput.length <= 0 || aOutput[0] == null) return F; + if (aInput == null || aOutput == null || aOutput.length <= 0 || aOutput[0] == null) return false; GT_Utility.removeSimpleIC2MachineRecipe(aInput, getThermalCentrifugeRecipeList(), null); - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.thermalcentrifuge, aInput, T)) return F; + if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.thermalcentrifuge, aInput, true)) return false; NBTTagCompound tNBT = new NBTTagCompound(); tNBT.setInteger("minHeat", aHeat); GT_Utility.addSimpleIC2MachineRecipe(aInput, getThermalCentrifugeRecipeList(), tNBT, aOutput); - return T; + return true; } /** * IC2-OreWasher Recipe. Overloads old Recipes automatically */ public static boolean addOreWasherRecipe(ItemStack aInput, int aWaterAmount, Object... aOutput) { - if (aInput == null || aOutput == null || aOutput.length <= 0 || aOutput[0] == null) return F; + if (aInput == null || aOutput == null || aOutput.length <= 0 || aOutput[0] == null) return false; GT_Utility.removeSimpleIC2MachineRecipe(aInput, getOreWashingRecipeList(), null); - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.orewashing, aInput, T)) return F; + if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.orewashing, aInput, true)) return false; NBTTagCompound tNBT = new NBTTagCompound(); tNBT.setInteger("amount", aWaterAmount); GT_Utility.addSimpleIC2MachineRecipe(aInput, getOreWashingRecipeList(), tNBT, aOutput); - return T; + return true; } /** * IC2-Compressor Recipe. Overloads old Recipes automatically */ public static boolean addCompressionRecipe(ItemStack aInput, ItemStack aOutput) { - aOutput = GT_OreDictUnificator.get(T, aOutput); - if (aInput == null || aOutput == null) return F; + aOutput = GT_OreDictUnificator.get(true, aOutput); + if (aInput == null || aOutput == null) return false; GT_Utility.removeSimpleIC2MachineRecipe(aInput, getCompressorRecipeList(), null); - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.compression, aInput, T)) return F; + if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.compression, aInput, true)) return false; GT_Utility.addSimpleIC2MachineRecipe(aInput, getCompressorRecipeList(), null, aOutput); - return T; + return true; } /** * @param aValue Scrap = 5000, Scrapbox = 45000, Diamond Dust 125000 */ public static boolean addIC2MatterAmplifier(ItemStack aAmplifier, int aValue) { - if (aAmplifier == null || aValue <= 0) return F; - if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.massfabamplifier, aAmplifier, T)) return F; + if (aAmplifier == null || aValue <= 0) return false; + if (!GregTech_API.sRecipeFile.get(ConfigCategories.Machines.massfabamplifier, aAmplifier, true)) return false; try { NBTTagCompound tNBT = new NBTTagCompound(); tNBT.setInteger("amplification", aValue); - GT_Utility.callMethod(ic2.api.recipe.Recipes.matterAmplifier, "addRecipe", F, F, F, aAmplifier, tNBT); + GT_Utility.callMethod(ic2.api.recipe.Recipes.matterAmplifier, "addRecipe", false, false, false, aAmplifier, tNBT); } catch(Throwable e) {/*Do nothing*/} - return T; + return true; } /** * Rolling Machine Crafting Recipe */ public static boolean addRollingMachineRecipe(ItemStack aResult, Object[] aRecipe) { - aResult = GT_OreDictUnificator.get(T, aResult); - if (aResult == null || aRecipe == null || aResult.stackSize <= 0) return F; + aResult = GT_OreDictUnificator.get(true, aResult); + if (aResult == null || aRecipe == null || aResult.stackSize <= 0) return false; try { mods.railcraft.api.crafting.RailcraftCraftingManager.rollingMachine.getRecipeList().add(new ShapedOreRecipe(GT_Utility.copy(aResult), aRecipe)); } catch(Throwable e) { return addCraftingRecipe(GT_Utility.copy(aResult), aRecipe); } - return T; + return true; } - private static boolean sBufferCraftingRecipes = T; + private static boolean sBufferCraftingRecipes = true; private static final List<IRecipe> sAllRecipeList = Collections.synchronizedList(new ArrayList<IRecipe>(5000)), sBufferRecipeList = new ArrayList<IRecipe>(1000); public static final List<IRecipe> sSingleNonBlockDamagableRecipeList = new ArrayList<IRecipe>(1000); public static void stopBufferingCraftingRecipes() { - sBufferCraftingRecipes = F; + sBufferCraftingRecipes = false; for (IRecipe tRecipe : sBufferRecipeList) GameRegistry.addRecipe(tRecipe); sBufferRecipeList.clear(); } @@ -680,7 +678,7 @@ public class GT_ModHandler { * Shapeless Crafting Recipes. Deletes conflicting Recipes too. */ public static boolean addCraftingRecipe(ItemStack aResult, Enchantment[] aEnchantmentsAdded, int[] aEnchantmentLevelsAdded, Object[] aRecipe) { - return addCraftingRecipe(aResult, aEnchantmentsAdded, aEnchantmentLevelsAdded, F, T, F, F, F, F, F, F, F, F, F, F, T, aRecipe); + return addCraftingRecipe(aResult, aEnchantmentsAdded, aEnchantmentLevelsAdded, false, true , false, false, false, false, false, false, false, false, false, false, true, aRecipe); } /** @@ -743,12 +741,12 @@ public class GT_ModHandler { * Internal realisation of the Crafting Recipe adding Process. */ private static boolean addCraftingRecipe(ItemStack aResult, Enchantment[] aEnchantmentsAdded, int[] aEnchantmentLevelsAdded, boolean aMirrored, boolean aBuffered, boolean aKeepNBT, boolean aDismantleable, boolean aRemovable, boolean aReversible, boolean aRemoveAllOthersWithSameOutput, boolean aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT, boolean aRemoveAllOtherShapedsWithSameOutput, boolean aRemoveAllOtherNativeRecipes, boolean aCheckForCollisions, boolean aOnlyAddIfThereIsAnyRecipeOutputtingThis, boolean aOnlyAddIfResultIsNotNull, Object[] aRecipe) { - aResult = GT_OreDictUnificator.get(T, aResult); - if (aOnlyAddIfResultIsNotNull && aResult == null) return F; + aResult = GT_OreDictUnificator.get(true, aResult); + if (aOnlyAddIfResultIsNotNull && aResult == null) return false; if (aResult != null && Items.feather.getDamage(aResult) == W) Items.feather.setDamage(aResult, 0); - if (aRecipe == null || aRecipe.length <= 0) return F; + if (aRecipe == null || aRecipe.length <= 0) return false; - boolean tThereWasARecipe = F; + boolean tThereWasARecipe = false; for (byte i = 0; i < aRecipe.length; i++) { if (aRecipe[i] instanceof IItemContainer) @@ -803,7 +801,7 @@ public class GT_ModHandler { HashMap<Character, ItemData> tItemDataMap = new HashMap<Character, ItemData>(); tItemStackMap.put(' ', null); - boolean tRemoveRecipe = T; + boolean tRemoveRecipe = true; for (; idx < aRecipe.length; idx += 2) { if (aRecipe[idx] == null || aRecipe[idx + 1] == null) { @@ -811,7 +809,7 @@ public class GT_ModHandler { GT_Log.err.println("WARNING: Missing Item for shaped Recipe: " + (aResult==null?"null":aResult.getDisplayName())); for (Object tContent : aRecipe) GT_Log.err.println(tContent); } - return F; + return false; } Character chr = (Character)aRecipe[idx]; Object in = aRecipe[idx + 1]; @@ -832,7 +830,7 @@ public class GT_ModHandler { tItemDataMap.put(chr, (ItemData)in); } ItemStack tStack = GT_OreDictUnificator.getFirstOre(in, 1); - if (tStack == null) tRemoveRecipe = F; else tItemStackMap.put(chr, tStack); + if (tStack == null) tRemoveRecipe = false; else tItemStackMap.put(chr, tStack); in = aRecipe[idx + 1] = in.toString(); } else if (in instanceof String) { if (in.equals(OreDictNames.craftingChest .toString())) tItemDataMap.put(chr, new ItemData(Materials.Wood, M * 8)); @@ -842,7 +840,7 @@ public class GT_ModHandler { else if (in.equals(OreDictNames.craftingIndustrialDiamond .toString())) tItemDataMap.put(chr, new ItemData(Materials.Diamond, M)); else if (in.equals(OreDictNames.craftingAnvil .toString())) tItemDataMap.put(chr, new ItemData(Materials.Iron, M * 10)); ItemStack tStack = GT_OreDictUnificator.getFirstOre(in, 1); - if (tStack == null) tRemoveRecipe = F; else tItemStackMap.put(chr, tStack); + if (tStack == null) tRemoveRecipe = false; else tItemStackMap.put(chr, tStack); } else { throw new IllegalArgumentException(); } @@ -866,7 +864,7 @@ public class GT_ModHandler { } } catch(Throwable e) {e.printStackTrace(GT_Log.err);} - if (aResult == null || aResult.stackSize <= 0) return F; + if (aResult == null || aResult.stackSize <= 0) return false; if (aRemoveAllOthersWithSameOutput || aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT || aRemoveAllOtherShapedsWithSameOutput || aRemoveAllOtherNativeRecipes) tThereWasARecipe = removeRecipeByOutput(aResult, !aRemoveAllOthersWithSameOutputIfTheyHaveSameNBT, aRemoveAllOtherShapedsWithSameOutput, aRemoveAllOtherNativeRecipes) || tThereWasARecipe; @@ -876,9 +874,9 @@ public class GT_ModHandler { for (int i = 0; i < tList.size() && !tThereWasARecipe; i++) { IRecipe tRecipe = tList.get(i); if (sSpecialRecipeClasses.contains(tRecipe.getClass().getName())) continue; - if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(tRecipe.getRecipeOutput()), aResult, T)) { + if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(tRecipe.getRecipeOutput()), aResult, true)) { tList.remove(i--); - tThereWasARecipe = T; + tThereWasARecipe = true; } } } @@ -893,14 +891,14 @@ public class GT_ModHandler { else GameRegistry.addRecipe(new GT_Shaped_Recipe(GT_Utility.copy(aResult), aDismantleable, aRemovable, aKeepNBT, aEnchantmentsAdded, aEnchantmentLevelsAdded, aRecipe).setMirrored(aMirrored)); } - return T; + return true; } /** * Shapeless Crafting Recipes. Deletes conflicting Recipes too. */ public static boolean addShapelessEnchantingRecipe(ItemStack aResult, Enchantment[] aEnchantmentsAdded, int[] aEnchantmentLevelsAdded, Object[] aRecipe) { - return addShapelessCraftingRecipe(aResult, aEnchantmentsAdded, aEnchantmentLevelsAdded, T, F, F, F, aRecipe); + return addShapelessCraftingRecipe(aResult, aEnchantmentsAdded, aEnchantmentLevelsAdded, true , false, false, false, aRecipe); } /** @@ -921,8 +919,8 @@ public class GT_ModHandler { * Shapeless Crafting Recipes. Deletes conflicting Recipes too. */ private static boolean addShapelessCraftingRecipe(ItemStack aResult, Enchantment[] aEnchantmentsAdded, int[] aEnchantmentLevelsAdded, boolean aBuffered, boolean aKeepNBT, boolean aDismantleable, boolean aRemovable, Object[] aRecipe) { - aResult = GT_OreDictUnificator.get(T, aResult); - if (aRecipe == null || aRecipe.length <= 0) return F; + aResult = GT_OreDictUnificator.get(true, aResult); + if (aRecipe == null || aRecipe.length <= 0) return false; for (byte i = 0; i < aRecipe.length; i++) { if (aRecipe[i] instanceof IItemContainer) aRecipe[i] = ((IItemContainer)aRecipe[i]).get(1); @@ -938,7 +936,7 @@ public class GT_ModHandler { if (tObject == null) { if (D1) GT_Log.err.println("WARNING: Missing Item for shapeless Recipe: " + (aResult==null?"null":aResult.getDisplayName())); for (Object tContent : aRecipe) GT_Log.err.println(tContent); - return F; + return false; } if (tObject instanceof ItemStack) { tRecipe[i] = (ItemStack)tObject; @@ -955,7 +953,7 @@ public class GT_ModHandler { removeRecipe(tRecipe); } catch(Throwable e) {e.printStackTrace(GT_Log.err);} - if (aResult == null || aResult.stackSize <= 0) return F; + if (aResult == null || aResult.stackSize <= 0) return false; if (Items.feather.getDamage(aResult) == W || Items.feather.getDamage(aResult) < 0) Items.feather.setDamage(aResult, 0); @@ -965,7 +963,7 @@ public class GT_ModHandler { sBufferRecipeList.add(new GT_Shapeless_Recipe(GT_Utility.copy(aResult), aDismantleable, aRemovable, aKeepNBT, aEnchantmentsAdded, aEnchantmentLevelsAdded, aRecipe)); else GameRegistry.addRecipe(new GT_Shapeless_Recipe(GT_Utility.copy(aResult), aDismantleable, aRemovable, aKeepNBT, aEnchantmentsAdded, aEnchantmentLevelsAdded, aRecipe)); - return T; + return true; } /** @@ -974,13 +972,13 @@ public class GT_ModHandler { public static boolean removeFurnaceSmelting(ItemStack aInput) { if (aInput != null) { for (Object tInput : FurnaceRecipes.smelting().getSmeltingList().keySet()) { - if (GT_Utility.isStackValid(tInput) && GT_Utility.areStacksEqual(aInput, (ItemStack)tInput, T)) { + if (GT_Utility.isStackValid(tInput) && GT_Utility.areStacksEqual(aInput, (ItemStack)tInput, true)) { FurnaceRecipes.smelting().getSmeltingList().remove(tInput); - return T; + return true; } } } - return F; + return false; } /** @@ -990,16 +988,16 @@ public class GT_ModHandler { */ public static ItemStack removeRecipe(ItemStack... aRecipe) { if (aRecipe == null) return null; - boolean temp = F; + boolean temp = false; for (byte i = 0; i < aRecipe.length; i++) { if (aRecipe[i] != null) { - temp = T; + temp = true; break; } } if (!temp) return null; ItemStack rReturn = null; - InventoryCrafting aCrafting = new InventoryCrafting(new Container() {@Override public boolean canInteractWith(EntityPlayer var1) {return F;}}, 3, 3); + InventoryCrafting aCrafting = new InventoryCrafting(new Container() {@Override public boolean canInteractWith(EntityPlayer var1) {return false;}}, 3, 3); for (int i = 0; i < aRecipe.length && i < 9; i++) aCrafting.setInventorySlotContents(i, aRecipe[i]); ArrayList<IRecipe> tList = (ArrayList<IRecipe>)CraftingManager.getInstance().getRecipeList(); for (int i = 0; i < tList.size(); i++) {try {for (; i < tList.size(); i++) { @@ -1012,7 +1010,7 @@ public class GT_ModHandler { } public static boolean removeRecipeByOutput(ItemStack aOutput) { - return removeRecipeByOutput(aOutput, T, F, F); + return removeRecipeByOutput(aOutput, true , false, false); } public static Collection<String> sNativeRecipeClasses = new HashSet<String>(), sSpecialRecipeClasses = new HashSet<String>(); @@ -1066,8 +1064,8 @@ public class GT_ModHandler { * @return if it has removed at least one Recipe. */ public static boolean removeRecipeByOutput(ItemStack aOutput, boolean aIgnoreNBT, boolean aNotRemoveShapelessRecipes, boolean aOnlyRemoveNativeHandlers) { - if (aOutput == null) return F; - boolean rReturn = F; + if (aOutput == null) return false; + boolean rReturn = false; ArrayList<IRecipe> tList = (ArrayList<IRecipe>)CraftingManager.getInstance().getRecipeList(); aOutput = GT_OreDictUnificator.get(aOutput); for (int i = 0; i < tList.size(); i++) { @@ -1081,7 +1079,7 @@ public class GT_ModHandler { ItemStack tStack = tRecipe.getRecipeOutput(); if ((!(tRecipe instanceof IGT_CraftingRecipe) || ((IGT_CraftingRecipe)tRecipe).isRemovable()) && GT_Utility.areStacksEqual(GT_OreDictUnificator.get(tStack), aOutput, aIgnoreNBT)) { tList.remove(i--); - rReturn = T; + rReturn = true; } } return rReturn; @@ -1096,15 +1094,15 @@ public class GT_ModHandler { if (aWorld == null) aWorld = DW; - boolean temp = F; + boolean temp = false; for (byte i = 0; i < aRecipe.length; i++) { if (aRecipe[i] != null) { - temp = T; + temp = true; break; } } if (!temp) return null; - InventoryCrafting aCrafting = new InventoryCrafting(new Container() {@Override public boolean canInteractWith(EntityPlayer var1) {return F;}}, 3, 3); + InventoryCrafting aCrafting = new InventoryCrafting(new Container() {@Override public boolean canInteractWith(EntityPlayer var1) {return false;}}, 3, 3); for (int i = 0; i < 9 && i < aRecipe.length; i++) aCrafting.setInventorySlotContents(i, aRecipe[i]); List<IRecipe> tList = CraftingManager.getInstance().getRecipeList(); synchronized(sAllRecipeList) { @@ -1151,7 +1149,7 @@ public class GT_ModHandler { * Used for Recipe Detection. */ public static ItemStack getRecipeOutput(ItemStack... aRecipe) { - return getRecipeOutput(F, aRecipe); + return getRecipeOutput(false, aRecipe); } /** @@ -1160,18 +1158,18 @@ public class GT_ModHandler { */ public static ItemStack getRecipeOutput(boolean aUncopiedStack, ItemStack... aRecipe) { if (aRecipe == null) return null; - boolean temp = F; + boolean temp = false; for (byte i = 0; i < aRecipe.length; i++) { if (aRecipe[i] != null) { - temp = T; + temp = true; break; } } if (!temp) return null; - InventoryCrafting aCrafting = new InventoryCrafting(new Container() {@Override public boolean canInteractWith(EntityPlayer var1) {return F;}}, 3, 3); + InventoryCrafting aCrafting = new InventoryCrafting(new Container() {@Override public boolean canInteractWith(EntityPlayer var1) {return false;}}, 3, 3); for (int i = 0; i < 9 && i < aRecipe.length; i++) aCrafting.setInventorySlotContents(i, aRecipe[i]); ArrayList<IRecipe> tList = (ArrayList<IRecipe>)CraftingManager.getInstance().getRecipeList(); - for (int i = 0; i < tList.size(); i++) {temp = F; + for (int i = 0; i < tList.size(); i++) {temp = false; try { temp = tList.get(i).matches(aCrafting, DW); } catch(Throwable e) {e.printStackTrace(GT_Log.err);} @@ -1204,23 +1202,23 @@ public class GT_ModHandler { 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 = T; + 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 = F; + temp = false; break; } if (tObject instanceof List && ((List)tObject).isEmpty()) { - temp = F; + temp = false; break; } } if (temp) sSingleNonBlockDamagableRecipeList.add(tRecipe); } else if (tRecipe instanceof ShapedRecipes) { - boolean temp = T; + 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 = F; + temp = false; break; } } @@ -1233,7 +1231,7 @@ public class GT_ModHandler { } GT_Log.out.println("GT_Mod: Created a List of Tool Recipes containing " + sSingleNonBlockDamagableRecipeList.size() + " Recipes for recycling." + (sSingleNonBlockDamagableRecipeList.size()>1024?" Scanning all these Recipes is the reason for the startup Lag you receive right now.":E)); } - ArrayList<ItemStack> rList = getRecipeOutputs(sSingleNonBlockDamagableRecipeList, T, aRecipe); + ArrayList<ItemStack> rList = getRecipeOutputs(sSingleNonBlockDamagableRecipeList, true, aRecipe); if (!GregTech_API.sPostloadStarted || GregTech_API.sPostloadFinished) sSingleNonBlockDamagableRecipeList.clear(); return rList; } @@ -1243,7 +1241,7 @@ public class GT_ModHandler { * If you have multiple Mods, which add Bronze Armor for example */ public static ArrayList<ItemStack> getRecipeOutputs(ItemStack... aRecipe) { - return getRecipeOutputs(CraftingManager.getInstance().getRecipeList(), F, aRecipe); + return getRecipeOutputs(CraftingManager.getInstance().getRecipeList(), false, aRecipe); } /** @@ -1253,19 +1251,19 @@ public class GT_ModHandler { public static ArrayList<ItemStack> getRecipeOutputs(List<IRecipe> aList, boolean aDeleteFromList, ItemStack... aRecipe) { ArrayList<ItemStack> rList = new ArrayList<ItemStack>(); if (aRecipe == null) return rList; - boolean temp = F; + boolean temp = false; for (byte i = 0; i < aRecipe.length; i++) { if (aRecipe[i] != null) { - temp = T; + temp = true; break; } } if (!temp) return rList; InventoryCrafting aCrafting = new InventoryCrafting(new Container() {@Override - public boolean canInteractWith(EntityPlayer var1) {return F;}}, 3, 3); + public boolean canInteractWith(EntityPlayer var1) {return false;}}, 3, 3); for (int i = 0; i < 9 && i < aRecipe.length; i++) aCrafting.setInventorySlotContents(i, aRecipe[i]); for (int i = 0; i < aList.size(); i++) { - temp = F; + temp = false; try { temp = aList.get(i).matches(aCrafting, DW); } catch(Throwable e) {e.printStackTrace(GT_Log.err);} @@ -1377,7 +1375,7 @@ public class GT_ModHandler { * For the Scrapboxinator */ public static ItemStack getRandomScrapboxDrop() { - return ic2.api.recipe.Recipes.scrapboxDrops.getDrop(ItemList.IC2_Scrapbox.get(1), F); + return ic2.api.recipe.Recipes.scrapboxDrops.getDrop(ItemList.IC2_Scrapbox.get(1), false); } /** @@ -1393,7 +1391,7 @@ public class GT_ModHandler { if (tTier < 0 || tTier == aTier || aTier == Integer.MAX_VALUE) { if (!aIgnoreLimit && tTier >= 0) aCharge = (int)Math.min(aCharge, V[Math.max(0, Math.min(V.length-1, tTier))]); if (aCharge > 0) { - int rCharge = (int)Math.max(0.0, ic2.api.item.ElectricItem.manager.charge(aStack, aCharge, tTier, T, aSimulate)); + int rCharge = (int)Math.max(0.0, ic2.api.item.ElectricItem.manager.charge(aStack, aCharge, tTier, true, aSimulate)); return rCharge + (rCharge * 4 > aTier ? aTier : 0); } } @@ -1417,7 +1415,7 @@ public class GT_ModHandler { if (!aIgnoreLimit && tTier >= 0) aCharge = (int)Math.min(aCharge, V[Math.max(0, Math.min(V.length-1, tTier))]); if (aCharge > 0) { // int rCharge = Math.max(0, ic2.api.item.ElectricItem.manager.discharge(aStack, aCharge + (aCharge * 4 > aTier ? aTier : 0), tTier, T, aSimulate)); - int rCharge = (int)Math.max(0, ic2.api.item.ElectricItem.manager.discharge(aStack, aCharge + (aCharge * 4 > aTier ? aTier : 0), tTier, T, !aIgnoreDischargability, aSimulate)); + int rCharge = (int)Math.max(0, ic2.api.item.ElectricItem.manager.discharge(aStack, aCharge + (aCharge * 4 > aTier ? aTier : 0), tTier, true , !aIgnoreDischargability, aSimulate)); return rCharge - (rCharge * 4 > aTier ? aTier : 0); } } @@ -1436,7 +1434,7 @@ public class GT_ModHandler { return ic2.api.item.ElectricItem.manager.canUse(aStack, aCharge); } } catch (Throwable e) {/*Do nothing*/} - return F; + return false; } /** @@ -1452,15 +1450,15 @@ public class GT_ModHandler { } } } catch (Throwable e) {/*Do nothing*/} - return F; + return false; } /** * Uses an Item. Tries to discharge in case of Electric Items */ public static boolean damageOrDechargeItem(ItemStack aStack, int aDamage, int aDecharge, EntityLivingBase aPlayer) { - if (GT_Utility.isStackInvalid(aStack) || (aStack.getMaxStackSize() <= 1 && aStack.stackSize > 1)) return F; - if (aPlayer != null && aPlayer instanceof EntityPlayer && ((EntityPlayer)aPlayer).capabilities.isCreativeMode) return T; + if (GT_Utility.isStackInvalid(aStack) || (aStack.getMaxStackSize() <= 1 && aStack.stackSize > 1)) return false; + if (aPlayer != null && aPlayer instanceof EntityPlayer && ((EntityPlayer)aPlayer).capabilities.isCreativeMode) return true; if (aStack.getItem() instanceof IDamagableItem) { return ((IDamagableItem)aStack.getItem()).doDamageToItem(aStack, aDamage); } else if (GT_ModHandler.isElectricItem(aStack)) { @@ -1468,7 +1466,7 @@ public class GT_ModHandler { if (aPlayer != null && aPlayer instanceof EntityPlayer) { return GT_ModHandler.useElectricItem(aStack, aDecharge, (EntityPlayer)aPlayer); } - return GT_ModHandler.dischargeElectricItem(aStack, aDecharge, Integer.MAX_VALUE, T, F, T) >= aDecharge; + return GT_ModHandler.dischargeElectricItem(aStack, aDecharge, Integer.MAX_VALUE, true , false, true) >= aDecharge; } } else if (aStack.getItem().isDamageable()) { if (aPlayer == null) { @@ -1478,7 +1476,7 @@ public class GT_ModHandler { } if (aStack.getItemDamage() >= aStack.getMaxDamage()) { aStack.setItemDamage(aStack.getMaxDamage()+1); - ItemStack tStack = GT_Utility.getContainerItem(aStack, T); + ItemStack tStack = GT_Utility.getContainerItem(aStack, true); if (tStack != null) { aStack.func_150996_a(tStack.getItem()); aStack.setItemDamage(tStack.getItemDamage()); @@ -1486,20 +1484,20 @@ public class GT_ModHandler { aStack.setTagCompound(tStack.getTagCompound()); } } - return T; + return true; } - return F; + return false; } /** * Uses a Soldering Iron */ public static boolean useSolderingIron(ItemStack aStack, EntityLivingBase aPlayer) { - if (aPlayer == null || aStack == null) return F; + if (aPlayer == null || aStack == null) return false; if (GT_Utility.isStackInList(aStack, GregTech_API.sSolderingToolList)) { if (aPlayer instanceof EntityPlayer) { EntityPlayer tPlayer = (EntityPlayer)aPlayer; - if (tPlayer.capabilities.isCreativeMode) return T; + if (tPlayer.capabilities.isCreativeMode) return true; if(isElectricItem(aStack)&&ic2.api.item.ElectricItem.manager.getCharge(aStack)>1000.0d){ for (int i = 0; i < tPlayer.inventory.mainInventory.length; i++) { if (GT_Utility.isStackInList(tPlayer.inventory.mainInventory[i], GregTech_API.sSolderingMetalList)) { @@ -1518,10 +1516,10 @@ public class GT_ModHandler { } } else { damageOrDechargeItem(aStack, 1, 1000, aPlayer); - return T; + return true; } } - return F; + return false; } /** @@ -1533,7 +1531,7 @@ public class GT_ModHandler { return ((ic2.api.item.IElectricItem)aStack.getItem()).canProvideEnergy(aStack); } } catch (Throwable e) {/*Do nothing*/} - return F; + return false; } /** @@ -1543,17 +1541,17 @@ public class GT_ModHandler { try { return aStack != null && aStack.getItem() instanceof ic2.api.item.IElectricItem && ((IElectricItem)aStack.getItem()).getTier(aStack) < Integer.MAX_VALUE; } catch (Throwable e) {/*Do nothing*/} - return F; + return false; } public static boolean isElectricItem(ItemStack aStack, byte aTier) { try { return aStack != null && aStack.getItem() instanceof ic2.api.item.IElectricItem && ((IElectricItem)aStack.getItem()).getTier(aStack) == aTier; } catch (Throwable e) {/*Do nothing*/} - return F; + return false; } - public static Object sBoxableWrapper = GT_Utility.callConstructor("gregtechmod.api.util.GT_IBoxableWrapper", 0, null, F); + public static Object sBoxableWrapper = GT_Utility.callConstructor("gregtechmod.api.util.GT_IBoxableWrapper", 0, null, false); public static void registerBoxableItemToToolBox(ItemStack aStack) { if (aStack != null) registerBoxableItemToToolBox(aStack.getItem()); @@ -1575,7 +1573,7 @@ public class GT_ModHandler { public static int getCapsuleCellContainerCount(ItemStack aStack) { if (aStack == null) return 0; - return GT_Utility.areStacksEqual(GT_Utility.getContainerForFilledItem(aStack, T), ItemList.Cell_Empty.get(1)) || OrePrefixes.cell.contains(aStack) || OrePrefixes.cellPlasma.contains(aStack) || GT_Utility.areStacksEqual(aStack, getIC2Item("waterCell", 1, W)) ? 1 : 0; + return GT_Utility.areStacksEqual(GT_Utility.getContainerForFilledItem(aStack, true), ItemList.Cell_Empty.get(1)) || OrePrefixes.cell.contains(aStack) || OrePrefixes.cellPlasma.contains(aStack) || GT_Utility.areStacksEqual(aStack, getIC2Item("waterCell", 1, W)) ? 1 : 0; } /** diff --git a/src/main/java/gregtech/api/util/GT_Recipe.java b/src/main/java/gregtech/api/util/GT_Recipe.java index 130a63d7b6..6c1af65fef 100644 --- a/src/main/java/gregtech/api/util/GT_Recipe.java +++ b/src/main/java/gregtech/api/util/GT_Recipe.java @@ -40,69 +40,69 @@ public class GT_Recipe { /** Contains all Recipe Maps */ public static final Collection<GT_Recipe_Map> sMappings = new ArrayList<GT_Recipe_Map>(); - public static final GT_Recipe_Map sOreWasherRecipes = new GT_Recipe_Map_OreWasher (new HashSet<GT_Recipe>( 0), "ic.recipe.orewasher" , "Ore Washer" , "ic2.blockOreWashingPlant" , RES_PATH_GUI+"basicmachines/OreWasher" , 1, 3, 1, 1, 1, E , 1, E , T, F); - public static final GT_Recipe_Map sThermalCentrifugeRecipes = new GT_Recipe_Map_ThermalCentrifuge (new HashSet<GT_Recipe>( 0), "ic.recipe.thermalcentrifuge" , "Thermal Centrifuge" , "ic2.blockCentrifuge" , RES_PATH_GUI+"basicmachines/ThermalCentrifuge" , 1, 3, 1, 0, 2, E , 1, E , T, F); - public static final GT_Recipe_Map sCompressorRecipes = new GT_Recipe_Map_Compressor (new HashSet<GT_Recipe>( 0), "ic.recipe.compressor" , "Compressor" , "ic2.compressor" , RES_PATH_GUI+"basicmachines/Compressor" , 1, 1, 1, 0, 1, E , 1, E , T, F); - public static final GT_Recipe_Map sExtractorRecipes = new GT_Recipe_Map_Extractor (new HashSet<GT_Recipe>( 0), "ic.recipe.extractor" , "Extractor" , "ic2.extractor" , RES_PATH_GUI+"basicmachines/Extractor" , 1, 1, 1, 0, 1, E , 1, E , T, F); - public static final GT_Recipe_Map sRecyclerRecipes = new GT_Recipe_Map_Recycler (new HashSet<GT_Recipe>( 0), "ic.recipe.recycler" , "Recycler" , "ic2.recycler" , RES_PATH_GUI+"basicmachines/Recycler" , 1, 1, 1, 0, 1, E , 1, E , T, F); - public static final GT_Recipe_Map sFurnaceRecipes = new GT_Recipe_Map_Furnace (new HashSet<GT_Recipe>( 0), "mc.recipe.furnace" , "Furnace" , "smelting" , RES_PATH_GUI+"basicmachines/E_Furnace" , 1, 1, 1, 0, 1, E , 1, E , T, F); - public static final GT_Recipe_Map sMicrowaveRecipes = new GT_Recipe_Map_Microwave (new HashSet<GT_Recipe>( 0), "gt.recipe.microwave" , "Microwave" , "smelting" , RES_PATH_GUI+"basicmachines/E_Furnace" , 1, 1, 1, 0, 1, E , 1, E , T, F); - - public static final GT_Recipe_Map sScannerFakeRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 3), "gt.recipe.scanner" , "Scanner" , null , RES_PATH_GUI+"basicmachines/Scanner" , 1, 1, 1, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sRockBreakerFakeRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 3), "gt.recipe.rockbreaker" , "Rock Breaker" , null , RES_PATH_GUI+"basicmachines/RockBreaker" , 1, 1, 0, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sByProductList = new GT_Recipe_Map (new HashSet<GT_Recipe>( 1000), "gt.recipe.byproductlist" , "Ore Byproduct List" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 6, 1, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sRepicatorFakeRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.replicator" , "Replicator" , null , RES_PATH_GUI+"basicmachines/Replicator" , 0, 1, 0, 1, 1, E , 1, E , T, T); - - public static final GT_Recipe_Map sPlasmaArcFurnaceRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>(10000), "gt.recipe.plasmaarcfurnace" , "Plasma Arc Furnace" , null , RES_PATH_GUI+"basicmachines/PlasmaArcFurnace" , 1, 4, 1, 1, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sArcFurnaceRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>(10000), "gt.recipe.arcfurnace" , "Arc Furnace" , null , RES_PATH_GUI+"basicmachines/ArcFurnace" , 1, 4, 1, 1, 3, E , 1, E , T, T); - public static final GT_Recipe_Map sPrinterRecipes = new GT_Recipe_Map_Printer (new HashSet<GT_Recipe>( 100), "gt.recipe.printer" , "Printer" , null , RES_PATH_GUI+"basicmachines/Printer" , 1, 1, 1, 1, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sSifterRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.sifter" , "Sifter" , null , RES_PATH_GUI+"basicmachines/Sifter" , 1, 9, 1, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sPressRecipes = new GT_Recipe_Map_FormingPress (new HashSet<GT_Recipe>( 100), "gt.recipe.press" , "Forming Press" , null , RES_PATH_GUI+"basicmachines/Press" , 2, 1, 2, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sLaserEngraverRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.laserengraver" , "Precision Laser Engraver" , null , RES_PATH_GUI+"basicmachines/LaserEngraver" , 2, 1, 2, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sMixerRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.mixer" , "Mixer" , null , RES_PATH_GUI+"basicmachines/Mixer" , 4, 1, 1, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sAutoclaveRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 200), "gt.recipe.autoclave" , "Autoclave" , null , RES_PATH_GUI+"basicmachines/Autoclave" , 1, 1, 1, 1, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sElectroMagneticSeparatorRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 50), "gt.recipe.electromagneticseparator" , "Electromagnetic Separator" , null , RES_PATH_GUI+"basicmachines/ElectromagneticSeparator" , 1, 3, 1, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sPolarizerRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.polarizer" , "Electromagnetic Polarizer" , null , RES_PATH_GUI+"basicmachines/Polarizer" , 1, 1, 1, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sMaceratorRecipes = new GT_Recipe_Map_Macerator (new HashSet<GT_Recipe>(10000), "gt.recipe.macerator" , "Pulverization" , null , RES_PATH_GUI+"basicmachines/Macerator4" , 1, 4, 1, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sChemicalBathRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 200), "gt.recipe.chemicalbath" , "Chemical Bath" , null , RES_PATH_GUI+"basicmachines/ChemicalBath" , 1, 3, 1, 1, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sFluidCannerRecipes = new GT_Recipe_Map_FluidCanner (new HashSet<GT_Recipe>( 100), "gt.recipe.fluidcanner" , "Fluid Canning Machine" , null , RES_PATH_GUI+"basicmachines/FluidCannerNEI" , 1, 1, 1, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sBrewingRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.brewer" , "Brewing Machine" , null , RES_PATH_GUI+"basicmachines/PotionBrewer" , 1, 0, 1, 1, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sFluidHeaterRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.fluidheater" , "Fluid Heater" , null , RES_PATH_GUI+"basicmachines/FluidHeater" , 1, 0, 1, 1, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sDistilleryRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.distillery" , "Distillery" , null , RES_PATH_GUI+"basicmachines/Distillery" , 1, 0, 1, 1, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sFermentingRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.fermenter" , "Fermenter" , null , RES_PATH_GUI+"basicmachines/Fermenter" , 0, 0, 0, 1, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sFluidSolidficationRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.fluidsolidifier" , "Fluid Solidifier" , null , RES_PATH_GUI+"basicmachines/FluidSolidifier" , 1, 1, 1, 1, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sFluidExtractionRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.fluidextractor" , "Fluid Extractor" , null , RES_PATH_GUI+"basicmachines/FluidExtractor" , 1, 1, 1, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sBoxinatorRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 2500), "gt.recipe.packager" , "Packager" , null , RES_PATH_GUI+"basicmachines/Packager" , 2, 1, 2, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sUnboxinatorRecipes = new GT_Recipe_Map_Unboxinator (new HashSet<GT_Recipe>( 2500), "gt.recipe.unpackager" , "Unpackager" , null , RES_PATH_GUI+"basicmachines/Unpackager" , 1, 2, 1, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sFusionRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 50), "gt.recipe.fusionreactor" , "Fusion Reactor" , null , RES_PATH_GUI+"basicmachines/Default" , 0, 0, 0, 2, 1, "Start: " , 1, " EU" , T, T); - public static final GT_Recipe_Map sCentrifugeRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 1000), "gt.recipe.centrifuge" , "Centrifuge" , null , RES_PATH_GUI+"basicmachines/Centrifuge" , 2, 6, 0, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sElectrolyzerRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 200), "gt.recipe.electrolyzer" , "Electrolyzer" , null , RES_PATH_GUI+"basicmachines/Electrolyzer" , 2, 6, 0, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sBlastRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 500), "gt.recipe.blastfurnace" , "Blast Furnace" , null , RES_PATH_GUI+"basicmachines/Default" , 2, 2, 1, 0, 1, "Heat Capacity: " , 1, " K" , F, T); - public static final GT_Recipe_Map sImplosionRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 50), "gt.recipe.implosioncompressor" , "Implosion Compressor" , null , RES_PATH_GUI+"basicmachines/Default" , 2, 2, 2, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sVacuumRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.vacuumfreezer" , "Vacuum Freezer" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 1, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sChemicalRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.chemicalreactor" , "Chemical Reactor" , null , RES_PATH_GUI+"basicmachines/ChemicalReactor" , 2, 1, 1, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sDistillationRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 50), "gt.recipe.distillationtower" , "Distillation Tower" , null , RES_PATH_GUI+"basicmachines/Default" , 2, 4, 0, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sWiremillRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 50), "gt.recipe.wiremill" , "Wiremill" , null , RES_PATH_GUI+"basicmachines/Wiremill" , 1, 1, 1, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sBenderRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 400), "gt.recipe.metalbender" , "Metal Bender" , null , RES_PATH_GUI+"basicmachines/Bender" , 2, 1, 2, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sAlloySmelterRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 3000), "gt.recipe.alloysmelter" , "Alloy Smelter" , null , RES_PATH_GUI+"basicmachines/AlloySmelter" , 2, 1, 2, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sAssemblerRecipes = new GT_Recipe_Map_Assembler (new HashSet<GT_Recipe>( 300), "gt.recipe.assembler" , "Assembler" , null , RES_PATH_GUI+"basicmachines/Assembler" , 2, 1, 1, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sCannerRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 300), "gt.recipe.canner" , "Canning Machine" , null , RES_PATH_GUI+"basicmachines/Canner" , 2, 2, 1, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sCNCRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.cncmachine" , "CNC Machine" , null , RES_PATH_GUI+"basicmachines/Default" , 2, 1, 2, 1, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sLatheRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 400), "gt.recipe.lathe" , "Lathe" , null , RES_PATH_GUI+"basicmachines/Lathe" , 1, 2, 1, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sCutterRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 200), "gt.recipe.cuttingsaw" , "Cutting Saw" , null , RES_PATH_GUI+"basicmachines/Cutter" , 1, 2, 1, 1, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sSlicerRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 200), "gt.recipe.slicer" , "Slicer" , null , RES_PATH_GUI+"basicmachines/Slicer" , 2, 1, 2, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sExtruderRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 1000), "gt.recipe.extruder" , "Extruder" , null , RES_PATH_GUI+"basicmachines/Extruder" , 2, 1, 2, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sHammerRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 200), "gt.recipe.hammer" , "Hammer" , null , RES_PATH_GUI+"basicmachines/Hammer" , 1, 1, 1, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map sAmplifiers = new GT_Recipe_Map (new HashSet<GT_Recipe>( 10), "gt.recipe.uuamplifier" , "UU Amplifier" , null , RES_PATH_GUI+"basicmachines/Amplifabricator" , 1, 0, 1, 0, 1, E , 1, E , T, T); - public static final GT_Recipe_Map_Fuel sDieselFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.dieselgeneratorfuel" , "Diesel Generator Fuel" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , T, T); - public static final GT_Recipe_Map_Fuel sTurbineFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.gasturbinefuel" , "Gas Turbine Fuel" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , T, T); - public static final GT_Recipe_Map_Fuel sHotFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.thermalgeneratorfuel" , "Thermal Generator Fuel" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , T, F); - public static final GT_Recipe_Map_Fuel sDenseLiquidFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.semifluidboilerfuels" , "Semifluid Boiler Fuels" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , T, T); - public static final GT_Recipe_Map_Fuel sPlasmaFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.plasmageneratorfuels" , "Plasma generator Fuels" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , T, T); - public static final GT_Recipe_Map_Fuel sMagicFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.magicfuels" , "Magic Fuels" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , T, T); - public static final GT_Recipe_Map_Fuel sSmallNaquadahReactorFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.smallnaquadahreactor" , "Small Naquadah Reactor" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , T, T); - public static final GT_Recipe_Map_Fuel sLargeNaquadahReactorFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.largenaquadahreactor" , "Large Naquadah Reactor" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , T, T); - public static final GT_Recipe_Map_Fuel sFluidNaquadahReactorFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.fluidnaquadahreactor" , "Fluid Naquadah Reactor" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , T, T); + public static final GT_Recipe_Map sOreWasherRecipes = new GT_Recipe_Map_OreWasher (new HashSet<GT_Recipe>( 0), "ic.recipe.orewasher" , "Ore Washer" , "ic2.blockOreWashingPlant" , RES_PATH_GUI+"basicmachines/OreWasher" , 1, 3, 1, 1, 1, E , 1, E , true , false); + public static final GT_Recipe_Map sThermalCentrifugeRecipes = new GT_Recipe_Map_ThermalCentrifuge (new HashSet<GT_Recipe>( 0), "ic.recipe.thermalcentrifuge" , "Thermal Centrifuge" , "ic2.blockCentrifuge" , RES_PATH_GUI+"basicmachines/ThermalCentrifuge" , 1, 3, 1, 0, 2, E , 1, E , true , false); + public static final GT_Recipe_Map sCompressorRecipes = new GT_Recipe_Map_Compressor (new HashSet<GT_Recipe>( 0), "ic.recipe.compressor" , "Compressor" , "ic2.compressor" , RES_PATH_GUI+"basicmachines/Compressor" , 1, 1, 1, 0, 1, E , 1, E , true , false); + public static final GT_Recipe_Map sExtractorRecipes = new GT_Recipe_Map_Extractor (new HashSet<GT_Recipe>( 0), "ic.recipe.extractor" , "Extractor" , "ic2.extractor" , RES_PATH_GUI+"basicmachines/Extractor" , 1, 1, 1, 0, 1, E , 1, E , true , false); + public static final GT_Recipe_Map sRecyclerRecipes = new GT_Recipe_Map_Recycler (new HashSet<GT_Recipe>( 0), "ic.recipe.recycler" , "Recycler" , "ic2.recycler" , RES_PATH_GUI+"basicmachines/Recycler" , 1, 1, 1, 0, 1, E , 1, E , true , false); + public static final GT_Recipe_Map sFurnaceRecipes = new GT_Recipe_Map_Furnace (new HashSet<GT_Recipe>( 0), "mc.recipe.furnace" , "Furnace" , "smelting" , RES_PATH_GUI+"basicmachines/E_Furnace" , 1, 1, 1, 0, 1, E , 1, E , true , false); + public static final GT_Recipe_Map sMicrowaveRecipes = new GT_Recipe_Map_Microwave (new HashSet<GT_Recipe>( 0), "gt.recipe.microwave" , "Microwave" , "smelting" , RES_PATH_GUI+"basicmachines/E_Furnace" , 1, 1, 1, 0, 1, E , 1, E , true , false); + + public static final GT_Recipe_Map sScannerFakeRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 3), "gt.recipe.scanner" , "Scanner" , null , RES_PATH_GUI+"basicmachines/Scanner" , 1, 1, 1, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sRockBreakerFakeRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 3), "gt.recipe.rockbreaker" , "Rock Breaker" , null , RES_PATH_GUI+"basicmachines/RockBreaker" , 1, 1, 0, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sByProductList = new GT_Recipe_Map (new HashSet<GT_Recipe>( 1000), "gt.recipe.byproductlist" , "Ore Byproduct List" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 6, 1, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sRepicatorFakeRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.replicator" , "Replicator" , null , RES_PATH_GUI+"basicmachines/Replicator" , 0, 1, 0, 1, 1, E , 1, E , true , true); + + public static final GT_Recipe_Map sPlasmaArcFurnaceRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>(10000), "gt.recipe.plasmaarcfurnace" , "Plasma Arc Furnace" , null , RES_PATH_GUI+"basicmachines/PlasmaArcFurnace" , 1, 4, 1, 1, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sArcFurnaceRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>(10000), "gt.recipe.arcfurnace" , "Arc Furnace" , null , RES_PATH_GUI+"basicmachines/ArcFurnace" , 1, 4, 1, 1, 3, E , 1, E , true , true); + public static final GT_Recipe_Map sPrinterRecipes = new GT_Recipe_Map_Printer (new HashSet<GT_Recipe>( 100), "gt.recipe.printer" , "Printer" , null , RES_PATH_GUI+"basicmachines/Printer" , 1, 1, 1, 1, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sSifterRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.sifter" , "Sifter" , null , RES_PATH_GUI+"basicmachines/Sifter" , 1, 9, 1, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sPressRecipes = new GT_Recipe_Map_FormingPress (new HashSet<GT_Recipe>( 100), "gt.recipe.press" , "Forming Press" , null , RES_PATH_GUI+"basicmachines/Press" , 2, 1, 2, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sLaserEngraverRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.laserengraver" , "Precision Laser Engraver" , null , RES_PATH_GUI+"basicmachines/LaserEngraver" , 2, 1, 2, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sMixerRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.mixer" , "Mixer" , null , RES_PATH_GUI+"basicmachines/Mixer" , 4, 1, 1, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sAutoclaveRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 200), "gt.recipe.autoclave" , "Autoclave" , null , RES_PATH_GUI+"basicmachines/Autoclave" , 1, 1, 1, 1, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sElectroMagneticSeparatorRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 50), "gt.recipe.electromagneticseparator" , "Electromagnetic Separator" , null , RES_PATH_GUI+"basicmachines/ElectromagneticSeparator" , 1, 3, 1, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sPolarizerRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.polarizer" , "Electromagnetic Polarizer" , null , RES_PATH_GUI+"basicmachines/Polarizer" , 1, 1, 1, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sMaceratorRecipes = new GT_Recipe_Map_Macerator (new HashSet<GT_Recipe>(10000), "gt.recipe.macerator" , "Pulverization" , null , RES_PATH_GUI+"basicmachines/Macerator4" , 1, 4, 1, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sChemicalBathRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 200), "gt.recipe.chemicalbath" , "Chemical Bath" , null , RES_PATH_GUI+"basicmachines/ChemicalBath" , 1, 3, 1, 1, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sFluidCannerRecipes = new GT_Recipe_Map_FluidCanner (new HashSet<GT_Recipe>( 100), "gt.recipe.fluidcanner" , "Fluid Canning Machine" , null , RES_PATH_GUI+"basicmachines/FluidCannerNEI" , 1, 1, 1, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sBrewingRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.brewer" , "Brewing Machine" , null , RES_PATH_GUI+"basicmachines/PotionBrewer" , 1, 0, 1, 1, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sFluidHeaterRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.fluidheater" , "Fluid Heater" , null , RES_PATH_GUI+"basicmachines/FluidHeater" , 1, 0, 1, 1, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sDistilleryRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.distillery" , "Distillery" , null , RES_PATH_GUI+"basicmachines/Distillery" , 1, 0, 1, 1, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sFermentingRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.fermenter" , "Fermenter" , null , RES_PATH_GUI+"basicmachines/Fermenter" , 0, 0, 0, 1, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sFluidSolidficationRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.fluidsolidifier" , "Fluid Solidifier" , null , RES_PATH_GUI+"basicmachines/FluidSolidifier" , 1, 1, 1, 1, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sFluidExtractionRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.fluidextractor" , "Fluid Extractor" , null , RES_PATH_GUI+"basicmachines/FluidExtractor" , 1, 1, 1, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sBoxinatorRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 2500), "gt.recipe.packager" , "Packager" , null , RES_PATH_GUI+"basicmachines/Packager" , 2, 1, 2, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sUnboxinatorRecipes = new GT_Recipe_Map_Unboxinator (new HashSet<GT_Recipe>( 2500), "gt.recipe.unpackager" , "Unpackager" , null , RES_PATH_GUI+"basicmachines/Unpackager" , 1, 2, 1, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sFusionRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 50), "gt.recipe.fusionreactor" , "Fusion Reactor" , null , RES_PATH_GUI+"basicmachines/Default" , 0, 0, 0, 2, 1, "Start: " , 1, " EU" , true , true); + public static final GT_Recipe_Map sCentrifugeRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 1000), "gt.recipe.centrifuge" , "Centrifuge" , null , RES_PATH_GUI+"basicmachines/Centrifuge" , 2, 6, 0, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sElectrolyzerRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 200), "gt.recipe.electrolyzer" , "Electrolyzer" , null , RES_PATH_GUI+"basicmachines/Electrolyzer" , 2, 6, 0, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sBlastRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 500), "gt.recipe.blastfurnace" , "Blast Furnace" , null , RES_PATH_GUI+"basicmachines/Default" , 2, 2, 1, 0, 1, "Heat Capacity: " , 1, " K" , false, true); + public static final GT_Recipe_Map sImplosionRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 50), "gt.recipe.implosioncompressor" , "Implosion Compressor" , null , RES_PATH_GUI+"basicmachines/Default" , 2, 2, 2, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sVacuumRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.vacuumfreezer" , "Vacuum Freezer" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 1, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sChemicalRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.chemicalreactor" , "Chemical Reactor" , null , RES_PATH_GUI+"basicmachines/ChemicalReactor" , 2, 1, 1, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sDistillationRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 50), "gt.recipe.distillationtower" , "Distillation Tower" , null , RES_PATH_GUI+"basicmachines/Default" , 2, 4, 0, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sWiremillRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 50), "gt.recipe.wiremill" , "Wiremill" , null , RES_PATH_GUI+"basicmachines/Wiremill" , 1, 1, 1, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sBenderRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 400), "gt.recipe.metalbender" , "Metal Bender" , null , RES_PATH_GUI+"basicmachines/Bender" , 2, 1, 2, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sAlloySmelterRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 3000), "gt.recipe.alloysmelter" , "Alloy Smelter" , null , RES_PATH_GUI+"basicmachines/AlloySmelter" , 2, 1, 2, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sAssemblerRecipes = new GT_Recipe_Map_Assembler (new HashSet<GT_Recipe>( 300), "gt.recipe.assembler" , "Assembler" , null , RES_PATH_GUI+"basicmachines/Assembler" , 2, 1, 1, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sCannerRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 300), "gt.recipe.canner" , "Canning Machine" , null , RES_PATH_GUI+"basicmachines/Canner" , 2, 2, 1, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sCNCRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 100), "gt.recipe.cncmachine" , "CNC Machine" , null , RES_PATH_GUI+"basicmachines/Default" , 2, 1, 2, 1, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sLatheRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 400), "gt.recipe.lathe" , "Lathe" , null , RES_PATH_GUI+"basicmachines/Lathe" , 1, 2, 1, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sCutterRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 200), "gt.recipe.cuttingsaw" , "Cutting Saw" , null , RES_PATH_GUI+"basicmachines/Cutter" , 1, 2, 1, 1, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sSlicerRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 200), "gt.recipe.slicer" , "Slicer" , null , RES_PATH_GUI+"basicmachines/Slicer" , 2, 1, 2, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sExtruderRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 1000), "gt.recipe.extruder" , "Extruder" , null , RES_PATH_GUI+"basicmachines/Extruder" , 2, 1, 2, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sHammerRecipes = new GT_Recipe_Map (new HashSet<GT_Recipe>( 200), "gt.recipe.hammer" , "Hammer" , null , RES_PATH_GUI+"basicmachines/Hammer" , 1, 1, 1, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map sAmplifiers = new GT_Recipe_Map (new HashSet<GT_Recipe>( 10), "gt.recipe.uuamplifier" , "UU Amplifier" , null , RES_PATH_GUI+"basicmachines/Amplifabricator" , 1, 0, 1, 0, 1, E , 1, E , true , true); + public static final GT_Recipe_Map_Fuel sDieselFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.dieselgeneratorfuel" , "Diesel Generator Fuel" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , true , true); + public static final GT_Recipe_Map_Fuel sTurbineFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.gasturbinefuel" , "Gas Turbine Fuel" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , true , true); + public static final GT_Recipe_Map_Fuel sHotFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.thermalgeneratorfuel" , "Thermal Generator Fuel" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , true , false); + public static final GT_Recipe_Map_Fuel sDenseLiquidFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.semifluidboilerfuels" , "Semifluid Boiler Fuels" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , true , true); + public static final GT_Recipe_Map_Fuel sPlasmaFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.plasmageneratorfuels" , "Plasma generator Fuels" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , true , true); + public static final GT_Recipe_Map_Fuel sMagicFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.magicfuels" , "Magic Fuels" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , true , true); + public static final GT_Recipe_Map_Fuel sSmallNaquadahReactorFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.smallnaquadahreactor" , "Small Naquadah Reactor" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , true , true); + public static final GT_Recipe_Map_Fuel sLargeNaquadahReactorFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.largenaquadahreactor" , "Large Naquadah Reactor" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , true , true); + public static final GT_Recipe_Map_Fuel sFluidNaquadahReactorFuels = new GT_Recipe_Map_Fuel (new HashSet<GT_Recipe>( 10), "gt.recipe.fluidnaquadahreactor" , "Fluid Naquadah Reactor" , null , RES_PATH_GUI+"basicmachines/Default" , 1, 1, 0, 0, 1, "Fuel Value: " , 1000, " EU" , true , true); /** HashMap of Recipes based on their Items */ public final Map<GT_ItemStack, Collection<GT_Recipe>> mRecipeItemMap = new HashMap<GT_ItemStack, Collection<GT_Recipe>>(); @@ -158,7 +158,7 @@ public class GT_Recipe { } public GT_Recipe addRecipe(int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { - return addRecipe(new GT_Recipe(false, null, null, null, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue),F,F,F); + return addRecipe(new GT_Recipe(false, null, null, null, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue), false, false, false); } public GT_Recipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { @@ -166,30 +166,30 @@ public class GT_Recipe { } public GT_Recipe addRecipe(GT_Recipe aRecipe) { - return addRecipe(aRecipe, T, F, F); + return addRecipe(aRecipe, true , false, false); } protected GT_Recipe addRecipe(GT_Recipe aRecipe, boolean aCheckForCollisions, boolean aFakeRecipe, boolean aHidden) { aRecipe.mHidden = aHidden; aRecipe.mFakeRecipe = aFakeRecipe; if (aRecipe.mFluidInputs.length < mMinimalInputFluids && aRecipe.mInputs.length < mMinimalInputItems) return null; - if (aCheckForCollisions && findRecipe(null, F, Long.MAX_VALUE, aRecipe.mFluidInputs, aRecipe.mInputs) != null) return null; + if (aCheckForCollisions && findRecipe(null, false, Long.MAX_VALUE, aRecipe.mFluidInputs, aRecipe.mInputs) != null) return null; return add(aRecipe); } /** Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! findRecipe wont find fake Recipes, containsInput WILL find fake Recipes */ public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { - return addFakeRecipe(aCheckForCollisions, new GT_Recipe(F, aInputs, aOutputs, aSpecial, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); + return addFakeRecipe(aCheckForCollisions, new GT_Recipe(false, aInputs, aOutputs, aSpecial, aOutputChances, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); } /** Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! findRecipe wont find fake Recipes, containsInput WILL find fake Recipes */ public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) { - return addFakeRecipe(aCheckForCollisions, new GT_Recipe(F, aInputs, aOutputs, aSpecial, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); + return addFakeRecipe(aCheckForCollisions, new GT_Recipe(false, aInputs, aOutputs, aSpecial, null, aFluidInputs, aFluidOutputs, aDuration, aEUt, aSpecialValue)); } /** Only used for fake Recipe Handlers to show something in NEI, do not use this for adding actual Recipes! findRecipe wont find fake Recipes, containsInput WILL find fake Recipes */ public GT_Recipe addFakeRecipe(boolean aCheckForCollisions, GT_Recipe aRecipe) { - return addRecipe(aRecipe, aCheckForCollisions, T, F); + return addRecipe(aRecipe, aCheckForCollisions, true , false); } public GT_Recipe add(GT_Recipe aRecipe) { @@ -206,8 +206,8 @@ public class GT_Recipe { Map<GT_ItemStack, Collection<GT_Recipe>> tMap = mRecipeItemMap; if (tMap != null) tMap.clear(); for (GT_Recipe tRecipe : mRecipeList) { - GT_OreDictUnificator.setStackArray(T, tRecipe.mInputs); - GT_OreDictUnificator.setStackArray(T, tRecipe.mOutputs); + GT_OreDictUnificator.setStackArray(true , tRecipe.mInputs); + GT_OreDictUnificator.setStackArray(true , tRecipe.mOutputs); if (tMap != null) addToItemMap(tRecipe); } } @@ -268,25 +268,25 @@ public class GT_Recipe { } // Unification happens here in case the Input isn't already unificated. - if (aNotUnificated) aInputs = GT_OreDictUnificator.getStackArray(T, (Object[])aInputs); + if (aNotUnificated) aInputs = GT_OreDictUnificator.getStackArray(true , (Object[])aInputs); // Check the Recipe which has been used last time in order to not have to search for it again, if possible. - if (aRecipe != null) if (!aRecipe.mFakeRecipe && aRecipe.mCanBeBuffered && aRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return aRecipe.mEnabled&&aVoltage*mAmperage>=aRecipe.mEUt?aRecipe:null; + if (aRecipe != null) if (!aRecipe.mFakeRecipe && aRecipe.mCanBeBuffered && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) return aRecipe.mEnabled&&aVoltage*mAmperage>=aRecipe.mEUt?aRecipe:null; // Now look for the Recipes inside the Item HashMaps, but only when the Recipes usually have Items. if (mUsualInputCount > 0 && aInputs != null) for (ItemStack tStack : aInputs) if (tStack != null) { Collection<GT_Recipe> tRecipes = mRecipeItemMap.get(new GT_ItemStack(tStack)); - if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return tRecipe.mEnabled&&aVoltage*mAmperage>=tRecipe.mEUt?tRecipe:null; + if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) return tRecipe.mEnabled&&aVoltage*mAmperage>=tRecipe.mEUt?tRecipe:null; tRecipes = mRecipeItemMap.get(new GT_ItemStack(GT_Utility.copyMetaData(W, tStack))); - if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return tRecipe.mEnabled&&aVoltage*mAmperage>=tRecipe.mEUt?tRecipe:null; + if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) return tRecipe.mEnabled&&aVoltage*mAmperage>=tRecipe.mEUt?tRecipe:null; } // If the minimal Amount of Items for the Recipe is 0, then it could be a Fluid-Only Recipe, so check that Map too. if (mMinimalInputItems == 0 && aFluids != null) for (FluidStack aFluid : aFluids) if (aFluid != null) { Collection<GT_Recipe> tRecipes = mRecipeFluidMap.get(aFluid.getFluid()); - if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return tRecipe.mEnabled&&aVoltage*mAmperage>=tRecipe.mEUt?tRecipe:null; + if (tRecipes != null) for (GT_Recipe tRecipe : tRecipes) if (!tRecipe.mFakeRecipe && tRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) return tRecipe.mEnabled&&aVoltage*mAmperage>=tRecipe.mEUt?tRecipe:null; } // And nothing has been found. @@ -321,15 +321,15 @@ public class GT_Recipe { public int mDuration, mEUt, mSpecialValue; /** Use this to just disable a specific Recipe, but the Configuration enables that already for every single Recipe. */ - public boolean mEnabled = T; + public boolean mEnabled = true; /** If this Recipe is hidden from NEI */ - public boolean mHidden = F; + public boolean mHidden = false; /** If this Recipe is Fake and therefore doesn't get found by the findRecipe Function (It is still in the HashMaps, so that containsInput does return T on those fake Inputs) */ - public boolean mFakeRecipe = F; + public boolean mFakeRecipe = false; /** If this Recipe can be stored inside a Machine in order to make Recipe searching more Efficient by trying the previously used Recipe first. In case you have a Recipe Map overriding things and returning one time use Recipes, you have to set this to F. */ - public boolean mCanBeBuffered = T; + public boolean mCanBeBuffered = true; /** If this Recipe needs the Output Slots to be completely empty. Needed in case you have randomised Outputs */ - public boolean mNeedsEmptyOutput = F; + public boolean mNeedsEmptyOutput = false; public ItemStack getRepresentativeInput(int aIndex) {if (aIndex < 0 || aIndex >= mInputs.length) return null; return GT_Utility.copy(mInputs[aIndex]);} public ItemStack getOutput(int aIndex) {if (aIndex < 0 || aIndex >= mOutputs.length) return null; return GT_Utility.copy(mOutputs[aIndex]);} @@ -363,23 +363,23 @@ public class GT_Recipe { } public boolean isRecipeInputEqual(boolean aDecreaseStacksizeBySuccess, FluidStack[] aFluidInputs, ItemStack... aInputs) { - return isRecipeInputEqual(aDecreaseStacksizeBySuccess, F, aFluidInputs, aInputs); + return isRecipeInputEqual(aDecreaseStacksizeBySuccess, false, aFluidInputs, aInputs); } public boolean isRecipeInputEqual(boolean aDecreaseStacksizeBySuccess, boolean aDontCheckStackSizes, FluidStack[] aFluidInputs, ItemStack... aInputs) { - if (mFluidInputs.length > 0 && aFluidInputs == null) return F; + if (mFluidInputs.length > 0 && aFluidInputs == null) return false; for (FluidStack tFluid : mFluidInputs) if (tFluid != null) { - boolean temp = T; - for (FluidStack aFluid : aFluidInputs) if (aFluid != null && aFluid.isFluidEqual(tFluid) && (aDontCheckStackSizes || aFluid.amount >= tFluid.amount)) {temp = F; break;} - if (temp) return F; + boolean temp = true; + for (FluidStack aFluid : aFluidInputs) if (aFluid != null && aFluid.isFluidEqual(tFluid) && (aDontCheckStackSizes || aFluid.amount >= tFluid.amount)) {temp = false; break;} + if (temp) return false; } - if (mInputs.length > 0 && aInputs == null) return F; + if (mInputs.length > 0 && aInputs == null) return false; for (ItemStack tStack : mInputs) if (tStack != null) { - boolean temp = T; - for (ItemStack aStack : aInputs) if ((GT_Utility.areUnificationsEqual(aStack, tStack, T) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(F, aStack), tStack, T)) && (aDontCheckStackSizes || aStack.stackSize >= tStack.stackSize)) {temp = F; break;} - if (temp) return F; + boolean temp = true; + for (ItemStack aStack : aInputs) if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true)) && (aDontCheckStackSizes || aStack.stackSize >= tStack.stackSize)) {temp = false; break;} + if (temp) return false; } if (aDecreaseStacksizeBySuccess) { @@ -391,12 +391,12 @@ public class GT_Recipe { if (aInputs != null) { for (ItemStack tStack : mInputs) if (tStack != null) { - for (ItemStack aStack : aInputs) if ((GT_Utility.areUnificationsEqual(aStack, tStack, T) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(F, aStack), tStack, T)) && (aDontCheckStackSizes || aStack.stackSize >= tStack.stackSize)) {aStack.stackSize -= tStack.stackSize; break;} + for (ItemStack aStack : aInputs) if ((GT_Utility.areUnificationsEqual(aStack, tStack, true) || GT_Utility.areUnificationsEqual(GT_OreDictUnificator.get(false, aStack), tStack, true)) && (aDontCheckStackSizes || aStack.stackSize >= tStack.stackSize)) {aStack.stackSize -= tStack.stackSize; break;} } } } - return T; + return true; } private GT_Recipe(GT_Recipe aRecipe) { @@ -429,8 +429,8 @@ public class GT_Recipe { aFluidInputs = GT_Utility.getArrayListWithoutNulls(aFluidInputs ).toArray(new FluidStack[0]); aFluidOutputs = GT_Utility.getArrayListWithoutNulls(aFluidOutputs ).toArray(new FluidStack[0]); - GT_OreDictUnificator.setStackArray(T, aInputs); - GT_OreDictUnificator.setStackArray(T, aOutputs); + GT_OreDictUnificator.setStackArray(true, aInputs); + GT_OreDictUnificator.setStackArray(true, aOutputs); for (ItemStack tStack : aOutputs) GT_Utility.updateItemStack(tStack); @@ -456,10 +456,10 @@ public class GT_Recipe { for (int i = 0; i < tList.size(); i++) if (tList.get(i) == null) tList.remove(i--); for (byte i = (byte)Math.min(64, aDuration / 16); i > 1; i--) if (aDuration / i >= 16) { - boolean temp = T; - for (int j = 0, k = tList.size(); temp && j < k; j++) if (tList.get(j).stackSize % i != 0) temp = F; - for (int j = 0; temp && j < aFluidInputs .length; j++) if (aFluidInputs [j].amount % i != 0) temp = F; - for (int j = 0; temp && j < aFluidOutputs.length; j++) if (aFluidOutputs[j].amount % i != 0) temp = F; + boolean temp = true; + for (int j = 0, k = tList.size(); temp && j < k; j++) if (tList.get(j).stackSize % i != 0) temp = false; + for (int j = 0; temp && j < aFluidInputs .length; j++) if (aFluidInputs [j].amount % i != 0) temp = false; + for (int j = 0; temp && j < aFluidOutputs.length; j++) if (aFluidOutputs[j].amount % i != 0) temp = false; if (temp) { for (int j = 0, k = tList.size(); j < k; j++) tList.get(j).stackSize /= i; for (int j = 0; j < aFluidInputs .length; j++) aFluidInputs [j].amount /= i; @@ -492,7 +492,7 @@ public class GT_Recipe { // aSpecialValue = EU per Liter! If there is no Liquid for this Object, then it gets multiplied with 1000! public GT_Recipe(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aSpecialValue, int aType) { - this(T, new ItemStack[] {aInput1}, new ItemStack[] {aOutput1, aOutput2, aOutput3, aOutput4}, null, null, null, null, 0, 0, Math.max(1, aSpecialValue)); + this(true , new ItemStack[] {aInput1}, new ItemStack[] {aOutput1, aOutput2, aOutput3, aOutput4}, null, null, null, null, 0, 0, Math.max(1, aSpecialValue)); if (mInputs.length > 0 && aSpecialValue > 0) { switch (aType) { @@ -525,56 +525,56 @@ public class GT_Recipe { } public GT_Recipe(FluidStack aInput1, FluidStack aInput2, FluidStack aOutput1, int aDuration, int aEUt, int aSpecialValue) { - this(T, null, null, null, null,new FluidStack[] {aInput1, aInput2}, new FluidStack[] {aOutput1}, Math.max(aDuration, 1), aEUt, Math.max(Math.min(aSpecialValue, 160000000), 0)); + this(true , null, null, null, null,new FluidStack[] {aInput1, aInput2}, new FluidStack[] {aOutput1}, Math.max(aDuration, 1), aEUt, Math.max(Math.min(aSpecialValue, 160000000), 0)); if (mInputs.length > 1) { GT_Recipe_Map.sFusionRecipes.addRecipe(this); } } public GT_Recipe(ItemStack aInput1, ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt) { - this(T, new ItemStack[] {aInput1}, new ItemStack[] {aOutput1, aOutput2}, null, null, null, null, aDuration, aEUt, 0); + this(true , new ItemStack[] {aInput1}, new ItemStack[] {aOutput1, aOutput2}, null, null, null, null, aDuration, aEUt, 0); if (mInputs.length > 0 && mOutputs[0] != null) { GT_Recipe_Map.sLatheRecipes.addRecipe(this); } } public GT_Recipe(ItemStack aInput1, int aCellAmount, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3, ItemStack aOutput4, int aDuration, int aEUt) { - this(T, new ItemStack[] {aInput1, aCellAmount>0?ItemList.Cell_Empty.get(Math.min(64, Math.max(1, aCellAmount))):null}, new ItemStack[] {aOutput1, aOutput2, aOutput3, aOutput4}, null, null, null, null, Math.max(aDuration, 1), Math.max(aEUt, 1), 0); + this(true , new ItemStack[] {aInput1, aCellAmount>0?ItemList.Cell_Empty.get(Math.min(64, Math.max(1, aCellAmount))):null}, new ItemStack[] {aOutput1, aOutput2, aOutput3, aOutput4}, null, null, null, null, Math.max(aDuration, 1), Math.max(aEUt, 1), 0); if (mInputs.length > 0 && mOutputs[0] != null) { GT_Recipe_Map.sDistillationRecipes.addRecipe(this); } } public GT_Recipe(ItemStack aInput1, int aInput2, ItemStack aOutput1, ItemStack aOutput2) { - this(T, new ItemStack[] {aInput1, GT_ModHandler.getIC2Item("industrialTnt", aInput2>0?aInput2<64?aInput2:64:1, new ItemStack(Blocks.tnt, aInput2>0?aInput2<64?aInput2:64:1))}, new ItemStack[] {aOutput1, aOutput2}, null, null, null, null, 20, 30, 0); + this(true , new ItemStack[] {aInput1, GT_ModHandler.getIC2Item("industrialTnt", aInput2>0?aInput2<64?aInput2:64:1, new ItemStack(Blocks.tnt, aInput2>0?aInput2<64?aInput2:64:1))}, new ItemStack[] {aOutput1, aOutput2}, null, null, null, null, 20, 30, 0); if (mInputs.length > 0 && mOutputs[0] != null) { GT_Recipe_Map.sImplosionRecipes.addRecipe(this); } } public GT_Recipe(int aEUt, int aDuration, ItemStack aInput1, ItemStack aOutput1) { - this(T, new ItemStack[] {aInput1, ItemList.Circuit_Integrated.getWithDamage(0, aInput1.stackSize)}, new ItemStack[] {aOutput1}, null, null, null, null, Math.max(aDuration, 1), Math.max(aEUt, 1), 0); + this(true , new ItemStack[] {aInput1, ItemList.Circuit_Integrated.getWithDamage(0, aInput1.stackSize)}, new ItemStack[] {aOutput1}, null, null, null, null, Math.max(aDuration, 1), Math.max(aEUt, 1), 0); if (mInputs.length > 0 && mOutputs[0] != null) { GT_Recipe_Map.sBenderRecipes.addRecipe(this); } } public GT_Recipe(ItemStack aInput1, ItemStack aInput2, int aEUt, int aDuration, ItemStack aOutput1) { - this(T, aInput2==null ? new ItemStack[] {aInput1} : new ItemStack[] {aInput1, aInput2}, new ItemStack[] {aOutput1}, null, null, null, null, Math.max(aDuration, 1), Math.max(aEUt, 1), 0); + this(true, aInput2==null ? new ItemStack[] {aInput1} : new ItemStack[] {aInput1, aInput2}, new ItemStack[] {aOutput1}, null, null, null, null, Math.max(aDuration, 1), Math.max(aEUt, 1), 0); if (mInputs.length > 0 && mOutputs[0] != null) { GT_Recipe_Map.sAlloySmelterRecipes.addRecipe(this); } } public GT_Recipe(ItemStack aInput1, int aEUt, ItemStack aInput2, int aDuration, ItemStack aOutput1, ItemStack aOutput2) { - this(T, aInput2==null?new ItemStack[] {aInput1}:new ItemStack[] {aInput1, aInput2}, new ItemStack[] {aOutput1, aOutput2}, null, null, null, null, Math.max(aDuration, 1), Math.max(aEUt, 1), 0); + this(true, aInput2==null?new ItemStack[] {aInput1}:new ItemStack[] {aInput1, aInput2}, new ItemStack[] {aOutput1, aOutput2}, null, null, null, null, Math.max(aDuration, 1), Math.max(aEUt, 1), 0); if (mInputs.length > 0 && mOutputs[0] != null) { GT_Recipe_Map.sCannerRecipes.addRecipe(this); } } public GT_Recipe(ItemStack aInput1, ItemStack aOutput1, int aDuration) { - this(T, new ItemStack[] {aInput1}, new ItemStack[] {aOutput1}, null, null, null, null, Math.max(aDuration, 1), 120, 0); + this(true , new ItemStack[] {aInput1}, new ItemStack[] {aOutput1}, null, null, null, null, Math.max(aDuration, 1), 120, 0); if (mInputs.length > 0 && mOutputs[0] != null) { GT_Recipe_Map.sVacuumRecipes.addRecipe(this); } @@ -592,9 +592,9 @@ public class GT_Recipe { super(aRecipeList, aUnlocalizedName, aLocalName, aNEIName, aNEIGUIPath, aUsualInputCount, aUsualOutputCount, aMinimalInputItems, aMinimalInputFluids, aAmperage, aNEISpecialValuePre, aNEISpecialValueMultiplier, aNEISpecialValuePost, aShowVoltageAmperageInNEI, aNEIAllowed); } - @Override public boolean containsInput(ItemStack aStack) {return F;} - @Override public boolean containsInput(FluidStack aFluid) {return F;} - @Override public boolean containsInput(Fluid aFluid) {return F;} + @Override public boolean containsInput(ItemStack aStack) {return false;} + @Override public boolean containsInput(FluidStack aFluid) {return false;} + @Override public boolean containsInput(Fluid aFluid) {return false;} @Override public GT_Recipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, int[] aOutputChances, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {return null;} @Override public GT_Recipe addRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue) {return null;} @@ -632,7 +632,7 @@ public class GT_Recipe { } public GT_Recipe addFuel(ItemStack aInput, ItemStack aOutput, FluidStack aFluidInput, FluidStack aFluidOutput, int aChance, int aFuelValueInEU) { - return addRecipe(T, new ItemStack[] {aInput}, new ItemStack[] {aOutput}, null, new int[] {aChance}, new FluidStack[] {aFluidInput}, new FluidStack[] {aFluidOutput}, 0, 0, aFuelValueInEU); + return addRecipe(true , new ItemStack[] {aInput}, new ItemStack[] {aOutput}, null, new int[] {aChance}, new FluidStack[] {aFluidInput}, new FluidStack[] {aFluidOutput}, 0, 0, aFuelValueInEU); } } @@ -647,12 +647,12 @@ public class GT_Recipe { @Override public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null) return null; - if (aRecipe != null && aRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return aRecipe; - ItemStack tOutput = GT_ModHandler.getSmeltingOutput(aInputs[0], F, null); - return tOutput == null ? null : new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {tOutput}, null, null, null, null, 128, 4, 0); + if (aRecipe != null && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) return aRecipe; + ItemStack tOutput = GT_ModHandler.getSmeltingOutput(aInputs[0], false, null); + return tOutput == null ? null : new GT_Recipe(false, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {tOutput}, null, null, null, null, 128, 4, 0); } - @Override public boolean containsInput(ItemStack aStack) {return GT_ModHandler.getSmeltingOutput(aStack, F, null) != null;} + @Override public boolean containsInput(ItemStack aStack) {return GT_ModHandler.getSmeltingOutput(aStack, false, null) != null;} } /** @@ -666,21 +666,21 @@ public class GT_Recipe { @Override public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null) return null; - if (aRecipe != null && aRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return aRecipe; - ItemStack tOutput = GT_ModHandler.getSmeltingOutput(aInputs[0], F, null); + if (aRecipe != null && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) return aRecipe; + ItemStack tOutput = GT_ModHandler.getSmeltingOutput(aInputs[0], false, null); if (GT_Utility.areStacksEqual(aInputs[0], new ItemStack(Items.book, 1, W))) { - return new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {GT_Utility.getWrittenBook("Manual_Microwave", ItemList.Book_Written_03.get(1))}, null, null, null, null, 32, 4, 0); + return new GT_Recipe(false, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {GT_Utility.getWrittenBook("Manual_Microwave", ItemList.Book_Written_03.get(1))}, null, null, null, null, 32, 4, 0); } // Check Container Item of Input since it is around the Input, then the Input itself, then Container Item of Output and last check the Output itself - for (ItemStack tStack : new ItemStack[] {GT_Utility.getContainerItem(aInputs[0], T), aInputs[0], GT_Utility.getContainerItem(tOutput, T), tOutput}) if (tStack != null) { - if (GT_Utility.areStacksEqual(tStack, new ItemStack(Blocks.netherrack, 1, W), T) - || GT_Utility.areStacksEqual(tStack, new ItemStack(Blocks.tnt, 1, W), T) - || GT_Utility.areStacksEqual(tStack, new ItemStack(Items.egg, 1, W), T) - || GT_Utility.areStacksEqual(tStack, new ItemStack(Items.firework_charge, 1, W), T) - || GT_Utility.areStacksEqual(tStack, new ItemStack(Items.fireworks, 1, W), T) - || GT_Utility.areStacksEqual(tStack, new ItemStack(Items.fire_charge, 1, W), T) + for (ItemStack tStack : new ItemStack[] {GT_Utility.getContainerItem(aInputs[0], true), aInputs[0], GT_Utility.getContainerItem(tOutput, true), tOutput}) if (tStack != null) { + if (GT_Utility.areStacksEqual(tStack, new ItemStack(Blocks.netherrack, 1, W), true) + || GT_Utility.areStacksEqual(tStack, new ItemStack(Blocks.tnt, 1, W), true) + || GT_Utility.areStacksEqual(tStack, new ItemStack(Items.egg, 1, W), true) + || GT_Utility.areStacksEqual(tStack, new ItemStack(Items.firework_charge, 1, W), true) + || GT_Utility.areStacksEqual(tStack, new ItemStack(Items.fireworks, 1, W), true) + || GT_Utility.areStacksEqual(tStack, new ItemStack(Items.fire_charge, 1, W), true) ) { if (aTileEntity instanceof IGregTechTileEntity) ((IGregTechTileEntity)aTileEntity).doExplosion(aVoltage * 4); return null; @@ -718,10 +718,10 @@ public class GT_Recipe { } - return tOutput == null ? null : new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {tOutput}, null, null, null, null, 32, 4, 0); + return tOutput == null ? null : new GT_Recipe(false, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {tOutput}, null, null, null, null, 32, 4, 0); } - @Override public boolean containsInput(ItemStack aStack) {return GT_ModHandler.getSmeltingOutput(aStack, F, null) != null;} + @Override public boolean containsInput(ItemStack aStack) {return GT_ModHandler.getSmeltingOutput(aStack, false, null) != null;} } /** @@ -734,18 +734,18 @@ public class GT_Recipe { @Override public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { - if (aInputs == null || aInputs.length <= 0 || !ItemList.IC2_Scrapbox.isStackEqual(aInputs[0], F, T)) return super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs); + if (aInputs == null || aInputs.length <= 0 || !ItemList.IC2_Scrapbox.isStackEqual(aInputs[0], false, true)) return super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs); ItemStack tOutput = GT_ModHandler.getRandomScrapboxDrop(); if (tOutput == null) return super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs); - GT_Recipe rRecipe = new GT_Recipe(F, new ItemStack[] {ItemList.IC2_Scrapbox.get(1)}, new ItemStack[] {tOutput}, null, null, null, null, 16, 1, 0); + GT_Recipe rRecipe = new GT_Recipe(false, new ItemStack[] {ItemList.IC2_Scrapbox.get(1)}, new ItemStack[] {tOutput}, null, null, null, null, 16, 1, 0); // It is not allowed to be buffered due to the random Output - rRecipe.mCanBeBuffered = F; + rRecipe.mCanBeBuffered = false; // Due to its randomness it is not good if there are Items in the Output Slot, because those Items could manipulate the outcome. - rRecipe.mNeedsEmptyOutput = T; + rRecipe.mNeedsEmptyOutput = true; return rRecipe; } - @Override public boolean containsInput(ItemStack aStack) {return ItemList.IC2_Scrapbox.isStackEqual(aStack, F, T) || super.containsInput(aStack);} + @Override public boolean containsInput(ItemStack aStack) {return ItemList.IC2_Scrapbox.isStackEqual(aStack, false, true) || super.containsInput(aStack);} } /** @@ -761,21 +761,21 @@ public class GT_Recipe { GT_Recipe rRecipe = super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs); if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null || rRecipe != null || !GregTech_API.sPostloadFinished) return rRecipe; if (aFluids != null && aFluids.length > 0 && aFluids[0] != null) { - ItemStack tOutput = GT_Utility.fillFluidContainer(aFluids[0], aInputs[0], F, T); - FluidStack tFluid = GT_Utility.getFluidForFilledItem(tOutput, T); - if (tFluid != null) rRecipe = new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {tOutput}, null, null, new FluidStack[] {tFluid}, null, Math.max(tFluid.amount / 64, 16), 1, 0); + ItemStack tOutput = GT_Utility.fillFluidContainer(aFluids[0], aInputs[0], false, true); + FluidStack tFluid = GT_Utility.getFluidForFilledItem(tOutput, true); + if (tFluid != null) rRecipe = new GT_Recipe(false, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {tOutput}, null, null, new FluidStack[] {tFluid}, null, Math.max(tFluid.amount / 64, 16), 1, 0); } if (rRecipe == null) { - FluidStack tFluid = GT_Utility.getFluidForFilledItem(aInputs[0], T); - if (tFluid != null) rRecipe = new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {GT_Utility.getContainerItem(aInputs[0], T)}, null, null, null, new FluidStack[] {tFluid}, Math.max(tFluid.amount / 64, 16), 1, 0); + FluidStack tFluid = GT_Utility.getFluidForFilledItem(aInputs[0], true); + if (tFluid != null) rRecipe = new GT_Recipe(false, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {GT_Utility.getContainerItem(aInputs[0], true)}, null, null, null, new FluidStack[] {tFluid}, Math.max(tFluid.amount / 64, 16), 1, 0); } - if (rRecipe != null) rRecipe.mCanBeBuffered = F; + if (rRecipe != null) rRecipe.mCanBeBuffered = false; return rRecipe; } @Override public boolean containsInput(ItemStack aStack) {return aStack != null && (super.containsInput(aStack) || (aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem)aStack.getItem()).getCapacity(aStack) > 0));} - @Override public boolean containsInput(FluidStack aFluid) {return T;} - @Override public boolean containsInput(Fluid aFluid) {return T;} + @Override public boolean containsInput(FluidStack aFluid) {return true;} + @Override public boolean containsInput(Fluid aFluid) {return true;} } /** @@ -789,8 +789,8 @@ public class GT_Recipe { @Override public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null) return null; - if (aRecipe != null && aRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return aRecipe; - return new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, GT_ModHandler.getRecyclerOutput(GT_Utility.copyAmount(64, aInputs[0]), 0) == null ? null : new ItemStack[] {ItemList.IC2_Scrap.get(1)}, null, new int[] {1250}, null, null, 45, 1, 0); + if (aRecipe != null && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) return aRecipe; + return new GT_Recipe(false, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, GT_ModHandler.getRecyclerOutput(GT_Utility.copyAmount(64, aInputs[0]), 0) == null ? null : new ItemStack[] {ItemList.IC2_Scrap.get(1)}, null, new int[] {1250}, null, null, 45, 1, 0); } @Override public boolean containsInput(ItemStack aStack) {return GT_ModHandler.getRecyclerOutput(GT_Utility.copyAmount(64, aStack), 0) != null;} @@ -807,13 +807,13 @@ public class GT_Recipe { @Override public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null) return null; - if (aRecipe != null && aRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return aRecipe; + if (aRecipe != null && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) return aRecipe; ItemStack tComparedInput = GT_Utility.copy(aInputs[0]); - ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.compressor.getRecipes(), T, new NBTTagCompound(), null, null, null); - return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, null, null, 400, 2, 0) : null; + ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.compressor.getRecipes(), true , new NBTTagCompound(), null, null, null); + return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(false, new ItemStack[] {GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, null, null, 400, 2, 0) : null; } - @Override public boolean containsInput(ItemStack aStack) {return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.compressor.getRecipes(), F, new NBTTagCompound(), null, null, null));} + @Override public boolean containsInput(ItemStack aStack) {return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.compressor.getRecipes(), false, new NBTTagCompound(), null, null, null));} } /** @@ -827,13 +827,13 @@ public class GT_Recipe { @Override public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null) return null; - if (aRecipe != null && aRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return aRecipe; + if (aRecipe != null && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) return aRecipe; ItemStack tComparedInput = GT_Utility.copy(aInputs[0]); - ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.extractor.getRecipes(), T, new NBTTagCompound(), null, null, null); - return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, null, null, 400, 2, 0) : null; + ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.extractor.getRecipes(), true , new NBTTagCompound(), null, null, null); + return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(false, new ItemStack[] {GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, null, null, 400, 2, 0) : null; } - @Override public boolean containsInput(ItemStack aStack) {return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.extractor.getRecipes(), F, new NBTTagCompound(), null, null, null));} + @Override public boolean containsInput(ItemStack aStack) {return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.extractor.getRecipes(), false, new NBTTagCompound(), null, null, null));} } /** @@ -847,13 +847,13 @@ public class GT_Recipe { @Override public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null) return null; - if (aRecipe != null && aRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return aRecipe; + if (aRecipe != null && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) return aRecipe; ItemStack tComparedInput = GT_Utility.copy(aInputs[0]); - ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.centrifuge.getRecipes(), T, new NBTTagCompound(), null, null, null); - return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, null, null, 400, 48, 0) : null; + ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.centrifuge.getRecipes(), true , new NBTTagCompound(), null, null, null); + return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(false, new ItemStack[] {GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, null, null, 400, 48, 0) : null; } - @Override public boolean containsInput(ItemStack aStack) {return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.centrifuge.getRecipes(), F, new NBTTagCompound(), null, null, null));} + @Override public boolean containsInput(ItemStack aStack) {return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.centrifuge.getRecipes(), false, new NBTTagCompound(), null, null, null));} } /** @@ -867,14 +867,14 @@ public class GT_Recipe { @Override public GT_Recipe findRecipe(IHasWorldObjectAndCoords aTileEntity, GT_Recipe aRecipe, boolean aNotUnificated, long aVoltage, FluidStack[] aFluids, ItemStack aSpecialSlot, ItemStack... aInputs) { if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null || aFluids == null || aFluids.length < 1 || !GT_ModHandler.isWater(aFluids[0])) return null; - if (aRecipe != null && aRecipe.isRecipeInputEqual(F, T, aFluids, aInputs)) return aRecipe; + if (aRecipe != null && aRecipe.isRecipeInputEqual(false, true, aFluids, aInputs)) return aRecipe; ItemStack tComparedInput = GT_Utility.copy(aInputs[0]); NBTTagCompound aRecipeMetaData = new NBTTagCompound(); - ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.oreWashing.getRecipes(), T, aRecipeMetaData, null, null, null); - return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, new FluidStack[] {new FluidStack(aFluids[0].getFluid(), ((NBTTagCompound)aRecipeMetaData.getTag("return")).getInteger("amount"))}, null, 400, 16, 0) : null; + ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.oreWashing.getRecipes(), true, aRecipeMetaData, null, null, null); + return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(false, new ItemStack[] {GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, new FluidStack[] {new FluidStack(aFluids[0].getFluid(), ((NBTTagCompound)aRecipeMetaData.getTag("return")).getInteger("amount"))}, null, 400, 16, 0) : null; } - @Override public boolean containsInput(ItemStack aStack) {return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.oreWashing.getRecipes(), F, new NBTTagCompound(), null, null, null));} + @Override public boolean containsInput(ItemStack aStack) {return GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.oreWashing.getRecipes(), false, new NBTTagCompound(), null, null, null));} @Override public boolean containsInput(FluidStack aFluid) {return GT_ModHandler.isWater(aFluid);} @Override public boolean containsInput(Fluid aFluid) {return GT_ModHandler.isWater(new FluidStack(aFluid, 0));} } @@ -896,19 +896,19 @@ public class GT_Recipe { try { List<ItemStack> tRecipeOutputs = mods.railcraft.api.crafting.RailcraftCraftingManager.rockCrusher.getRecipe(GT_Utility.copyAmount(1, aInputs[0])).getRandomizedOuputs(); if (tRecipeOutputs != null) { - aRecipe = new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, tRecipeOutputs.toArray(new ItemStack[tRecipeOutputs.size()]), null, null, null, null, 800, 2, 0); - aRecipe.mCanBeBuffered = F; - aRecipe.mNeedsEmptyOutput = T; + aRecipe = new GT_Recipe(false, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, tRecipeOutputs.toArray(new ItemStack[tRecipeOutputs.size()]), null, null, null, null, 800, 2, 0); + aRecipe.mCanBeBuffered = false; + aRecipe.mNeedsEmptyOutput = true; return aRecipe; } } catch(NoClassDefFoundError e) {if (D1) GT_Log.err.println("Railcraft Not loaded");} catch(NullPointerException e) {/**/} ItemStack tComparedInput = GT_Utility.copy(aInputs[0]); - ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.macerator.getRecipes(), T, new NBTTagCompound(), null, null, null); - return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(F, new ItemStack[] {GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, null, null, 400, 2, 0) : null; + ItemStack[] tOutputItems = GT_ModHandler.getMachineOutput(tComparedInput, ic2.api.recipe.Recipes.macerator.getRecipes(), true , new NBTTagCompound(), null, null, null); + return GT_Utility.arrayContainsNonNull(tOutputItems) ? new GT_Recipe(false, new ItemStack[] {GT_Utility.copyAmount(aInputs[0].stackSize - tComparedInput.stackSize, aInputs[0])}, tOutputItems, null, null, null, null, 400, 2, 0) : null; } - @Override public boolean containsInput(ItemStack aStack) {return super.containsInput(aStack) || GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.macerator.getRecipes(), F, new NBTTagCompound(), null, null, null));} + @Override public boolean containsInput(ItemStack aStack) {return super.containsInput(aStack) || GT_Utility.arrayContainsNonNull(GT_ModHandler.getMachineOutput(GT_Utility.copyAmount(64, aStack), ic2.api.recipe.Recipes.macerator.getRecipes(), false, new NBTTagCompound(), null, null, null));} } /** @@ -924,9 +924,9 @@ public class GT_Recipe { GT_Recipe rRecipe = super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs); if (aInputs == null || aInputs.length <= 0 || aInputs[0] == null || rRecipe == null || !GregTech_API.sPostloadFinished) return rRecipe; for (ItemStack aInput : aInputs) { - if (ItemList.Paper_Printed_Pages.isStackEqual(aInput, F, T)) { + if (ItemList.Paper_Printed_Pages.isStackEqual(aInput, false, true)) { rRecipe = rRecipe.copy(); - rRecipe.mCanBeBuffered = F; + rRecipe.mCanBeBuffered = false; rRecipe.mOutputs[0].setTagCompound(aInput.getTagCompound()); } } @@ -947,31 +947,31 @@ public class GT_Recipe { GT_Recipe rRecipe = super.findRecipe(aTileEntity, aRecipe, aNotUnificated, aVoltage, aFluids, aSpecialSlot, aInputs); if (aInputs == null || aInputs.length < 2 || aInputs[0] == null || aInputs[1] == null || !GregTech_API.sPostloadFinished) return rRecipe; if (rRecipe == null) { - if (ItemList.Shape_Mold_Name.isStackEqual(aInputs[0], F, T)) { + if (ItemList.Shape_Mold_Name.isStackEqual(aInputs[0], false, true)) { ItemStack tOutput = GT_Utility.copyAmount(1, aInputs[1]); tOutput.setStackDisplayName(aInputs[0].getDisplayName()); - rRecipe = new GT_Recipe(F, new ItemStack[] {ItemList.Shape_Mold_Name.get(0), GT_Utility.copyAmount(1, aInputs[1])}, new ItemStack[] {tOutput}, null, null, null, null, 128, 8, 0); - rRecipe.mCanBeBuffered = F; + rRecipe = new GT_Recipe(false, new ItemStack[] {ItemList.Shape_Mold_Name.get(0), GT_Utility.copyAmount(1, aInputs[1])}, new ItemStack[] {tOutput}, null, null, null, null, 128, 8, 0); + rRecipe.mCanBeBuffered = false; return rRecipe; } - if (ItemList.Shape_Mold_Name.isStackEqual(aInputs[1], F, T)) { + if (ItemList.Shape_Mold_Name.isStackEqual(aInputs[1], false, true)) { ItemStack tOutput = GT_Utility.copyAmount(1, aInputs[0]); tOutput.setStackDisplayName(aInputs[1].getDisplayName()); - rRecipe = new GT_Recipe(F, new ItemStack[] {ItemList.Shape_Mold_Name.get(0), GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {tOutput}, null, null, null, null, 128, 8, 0); - rRecipe.mCanBeBuffered = F; + rRecipe = new GT_Recipe(false, new ItemStack[] {ItemList.Shape_Mold_Name.get(0), GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {tOutput}, null, null, null, null, 128, 8, 0); + rRecipe.mCanBeBuffered = false; return rRecipe; } return null; } for (ItemStack aMold : aInputs) { - if (ItemList.Shape_Mold_Credit.isStackEqual(aMold, F, T)) { + if (ItemList.Shape_Mold_Credit.isStackEqual(aMold, false, true)) { NBTTagCompound tNBT = aMold.getTagCompound(); if (tNBT == null) tNBT = new NBTTagCompound(); if (!tNBT.hasKey("credit_security_id")) tNBT.setLong("credit_security_id", System.nanoTime()); aMold.setTagCompound(tNBT); rRecipe = rRecipe.copy(); - rRecipe.mCanBeBuffered = F; + rRecipe.mCanBeBuffered = false; rRecipe.mOutputs[0].setTagCompound(tNBT); return rRecipe; } @@ -1000,38 +1000,38 @@ public class GT_Recipe { if (rRecipe == null) { ItemStack tOutput = GT_ModHandler.getAllRecipeOutput(aTileEntity==null?null:aTileEntity.getWorld(), aInputs[0], aInputs[0], aInputs[0], aInputs[0], ItemList.DYE_ONLY_ITEMS[aDye.mIndex].get(1), aInputs[0], aInputs[0], aInputs[0], aInputs[0]); - if (tOutput != null) return addRecipe(new GT_Recipe(T, new ItemStack[] {GT_Utility.copyAmount(8, aInputs[0])}, new ItemStack[] {tOutput}, null, null, new FluidStack[] {new FluidStack(aFluids[0].getFluid(), (int)L)}, null, 256, 2, 0), F, F, T); + if (tOutput != null) return addRecipe(new GT_Recipe(true , new ItemStack[] {GT_Utility.copyAmount(8, aInputs[0])}, new ItemStack[] {tOutput}, null, null, new FluidStack[] {new FluidStack(aFluids[0].getFluid(), (int)L)}, null, 256, 2, 0), false, false, true); tOutput = GT_ModHandler.getAllRecipeOutput(aTileEntity==null?null:aTileEntity.getWorld(), aInputs[0], ItemList.DYE_ONLY_ITEMS[aDye.mIndex].get(1)); - if (tOutput != null) return addRecipe(new GT_Recipe(T, new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {tOutput}, null, null, new FluidStack[] {new FluidStack(aFluids[0].getFluid(), (int)L)}, null, 32, 2, 0), F, F, T); + if (tOutput != null) return addRecipe(new GT_Recipe(true , new ItemStack[] {GT_Utility.copyAmount(1, aInputs[0])}, new ItemStack[] {tOutput}, null, null, new FluidStack[] {new FluidStack(aFluids[0].getFluid(), (int)L)}, null, 32, 2, 0), false, false, true); } else { if (aInputs[0].getItem() == Items.paper) { - if (!ItemList.Tool_DataStick.isStackEqual(aSpecialSlot, F, T)) return null; + if (!ItemList.Tool_DataStick.isStackEqual(aSpecialSlot, false, true)) return null; NBTTagCompound tNBT = aSpecialSlot.getTagCompound(); if (tNBT == null || GT_Utility.isStringInvalid(tNBT.getString("title")) || GT_Utility.isStringInvalid(tNBT.getString("author"))) return null; rRecipe = rRecipe.copy(); - rRecipe.mCanBeBuffered = F; + rRecipe.mCanBeBuffered = false; rRecipe.mOutputs[0].setTagCompound(tNBT); return rRecipe; } if (aInputs[0].getItem() == Items.map) { - if (!ItemList.Tool_DataStick.isStackEqual(aSpecialSlot, F, T)) return null; + if (!ItemList.Tool_DataStick.isStackEqual(aSpecialSlot, false, true)) return null; NBTTagCompound tNBT = aSpecialSlot.getTagCompound(); if (tNBT == null || !tNBT.hasKey("map_id")) return null; rRecipe = rRecipe.copy(); - rRecipe.mCanBeBuffered = F; + rRecipe.mCanBeBuffered = false; rRecipe.mOutputs[0].setItemDamage(tNBT.getShort("map_id")); return rRecipe; } - if (ItemList.Paper_Punch_Card_Empty.isStackEqual(aInputs[0], F, T)) { - if (!ItemList.Tool_DataStick.isStackEqual(aSpecialSlot, F, T)) return null; + if (ItemList.Paper_Punch_Card_Empty.isStackEqual(aInputs[0], false, true)) { + if (!ItemList.Tool_DataStick.isStackEqual(aSpecialSlot, false, true)) return null; NBTTagCompound tNBT = aSpecialSlot.getTagCompound(); if (tNBT == null || !tNBT.hasKey("GT.PunchCardData")) return null; rRecipe = rRecipe.copy(); - rRecipe.mCanBeBuffered = F; + rRecipe.mCanBeBuffered = false; rRecipe.mOutputs[0].setTagCompound(GT_Utility.getNBTContainingString(new NBTTagCompound(), "GT.PunchCardData", tNBT.getString("GT.PunchCardData"))); return rRecipe; } @@ -1039,7 +1039,7 @@ public class GT_Recipe { return rRecipe; } - @Override public boolean containsInput(ItemStack aStack) {return T;} + @Override public boolean containsInput(ItemStack aStack) {return true;} @Override public boolean containsInput(FluidStack aFluid) {return super.containsInput(aFluid) || Dyes.isAnyFluidDye(aFluid);} @Override public boolean containsInput(Fluid aFluid) {return super.containsInput(aFluid) || Dyes.isAnyFluidDye(aFluid);} } diff --git a/src/main/java/gregtech/api/util/GT_Utility.java b/src/main/java/gregtech/api/util/GT_Utility.java index 0ae3da3909..9ee95b367e 100644 --- a/src/main/java/gregtech/api/util/GT_Utility.java +++ b/src/main/java/gregtech/api/util/GT_Utility.java @@ -4,7 +4,6 @@ import static gregtech.api.enums.GT_Values.*; import gregtech.api.GregTech_API; import gregtech.api.damagesources.GT_DamageSources; import gregtech.api.enchants.Enchantment_Radioactivity; -import gregtech.api.enums.GT_Values; import gregtech.api.enums.ItemList; import gregtech.api.enums.SubTag; import gregtech.api.events.BlockScanningEvent; @@ -147,14 +146,14 @@ public class GT_Utility { if (!tNBT.hasKey("ench", 9)) tNBT.setTag("ench", new NBTTagList()); NBTTagList tList = tNBT.getTagList("ench", 10); - boolean temp = T; + boolean temp = true; for (int i = 0; i < tList.tagCount(); i++) { tEnchantmentTag = tList.getCompoundTagAt(i); if (tEnchantmentTag.getShort("id") == aEnchantment.effectId) { tEnchantmentTag.setShort("id", (short)aEnchantment.effectId); tEnchantmentTag.setShort("lvl", (byte)aLevel); - temp = F; + temp = false; break; } } @@ -255,7 +254,7 @@ public class GT_Utility { Field rField = null; try { rField = aObject.getClass().getDeclaredField(aField); - rField.setAccessible(T); + rField.setAccessible(true); } catch (Throwable e) {/*Do nothing*/} return rField; } @@ -264,7 +263,7 @@ public class GT_Utility { Field rField = null; try { rField = aObject.getDeclaredField(aField); - rField.setAccessible(T); + rField.setAccessible(true); } catch (Throwable e) {/*Do nothing*/} return rField; } @@ -273,7 +272,7 @@ public class GT_Utility { Method rMethod = null; try { rMethod = aObject.getMethod(aMethod, aParameterTypes); - rMethod.setAccessible(T); + rMethod.setAccessible(true); } catch (Throwable e) {/*Do nothing*/} return rMethod; } @@ -282,7 +281,7 @@ public class GT_Utility { Method rMethod = null; try { rMethod = aObject.getClass().getMethod(aMethod, aParameterTypes); - rMethod.setAccessible(T); + rMethod.setAccessible(true); } catch (Throwable e) {/*Do nothing*/} return rMethod; } @@ -290,7 +289,7 @@ public class GT_Utility { public static Field getField(Object aObject, String aField, boolean aPrivate, boolean aLogErrors) { try { Field tField = (aObject instanceof Class)?((Class)aObject).getDeclaredField(aField):(aObject instanceof String)?Class.forName((String)aObject).getDeclaredField(aField):aObject.getClass().getDeclaredField(aField); - if (aPrivate) tField.setAccessible(T); + if (aPrivate) tField.setAccessible(true); return tField; } catch (Throwable e) { if (aLogErrors) e.printStackTrace(GT_Log.err); @@ -301,7 +300,7 @@ public class GT_Utility { public static Object getFieldContent(Object aObject, String aField, boolean aPrivate, boolean aLogErrors) { try { Field tField = (aObject instanceof Class)?((Class)aObject).getDeclaredField(aField):(aObject instanceof String)?Class.forName((String)aObject).getDeclaredField(aField):aObject.getClass().getDeclaredField(aField); - if (aPrivate) tField.setAccessible(T); + if (aPrivate) tField.setAccessible(true); return tField.get(aObject instanceof Class || aObject instanceof String ? null : aObject); } catch (Throwable e) { if (aLogErrors) e.printStackTrace(GT_Log.err); @@ -310,11 +309,11 @@ public class GT_Utility { } public static Object callPublicMethod(Object aObject, String aMethod, Object... aParameters) { - return callMethod(aObject, aMethod, F, F, T, aParameters); + return callMethod(aObject, aMethod, false, false, true, aParameters); } public static Object callPrivateMethod(Object aObject, String aMethod, Object... aParameters) { - return callMethod(aObject, aMethod, T, F, T, aParameters); + return callMethod(aObject, aMethod, true , false, true, aParameters); } public static Object callMethod(Object aObject, String aMethod, boolean aPrivate, boolean aUseUpperCasedDataTypes, boolean aLogErrors, Object... aParameters) { @@ -339,7 +338,7 @@ public class GT_Utility { } Method tMethod = (aObject instanceof Class)?((Class)aObject).getMethod(aMethod, tParameterTypes):aObject.getClass().getMethod(aMethod, tParameterTypes); - if (aPrivate) tMethod.setAccessible(T); + if (aPrivate) tMethod.setAccessible(true); return tMethod.invoke(aObject, aParameters); } catch (Throwable e) { if (aLogErrors) e.printStackTrace(GT_Log.err); @@ -384,7 +383,7 @@ public class GT_Utility { Field var6 = var3[var5]; if (var6.getType() == HashMap.class) { tPotionHashmap = var6; - tPotionHashmap.setAccessible(T); + tPotionHashmap.setAccessible(true); break; } } @@ -393,7 +392,7 @@ public class GT_Utility { } catch (Throwable e) { if (D1) e.printStackTrace(GT_Log.err); } - return F; + return false; } public static String getClassName(Object aObject) { @@ -412,7 +411,7 @@ public class GT_Utility { Field var6 = var3[var5]; if (var6.getType() == HashMap.class) { tPotionHashmap = var6; - tPotionHashmap.setAccessible(T); + tPotionHashmap.setAccessible(true); break; } } @@ -431,7 +430,7 @@ public class GT_Utility { if (aPlayer.inventory.armorInventory[i].getItem() instanceof GT_EnergyArmor_Item) { if ((((GT_EnergyArmor_Item)aPlayer.inventory.armorInventory[i].getItem()).mSpecials & 512) != 0) { if (GT_ModHandler.canUseElectricItem(aPlayer.inventory.armorInventory[i], 10000)) { - return T; + return true; } } } @@ -439,7 +438,7 @@ public class GT_Utility { } } } catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);} - return F; + return false; } public static ItemStack suckOneItemStackAt(World aWorld, double aX, double aY, double aZ, double aL, double aH, double aW) { @@ -469,30 +468,30 @@ public class GT_Utility { } } - public static boolean TE_CHECK = F, BC_CHECK = F, CHECK_ALL = T; + public static boolean TE_CHECK = false, BC_CHECK = false, CHECK_ALL = true; public static void checkAvailabilities() { if (CHECK_ALL) { try { Class tClass = IItemDuct.class; tClass.getCanonicalName(); - TE_CHECK = T; + TE_CHECK = true; } catch(Throwable e) {/**/} try { Class tClass = buildcraft.api.transport.IPipeTile.class; tClass.getCanonicalName(); - BC_CHECK = T; + BC_CHECK = true; } catch(Throwable e) {/**/} - CHECK_ALL = F; + CHECK_ALL = false; } } public static boolean isConnectableNonInventoryPipe(Object aTileEntity, int aSide) { - if (aTileEntity == null) return F; + if (aTileEntity == null) return false; checkAvailabilities(); - if (TE_CHECK) if (aTileEntity instanceof IItemDuct) return T; + if (TE_CHECK) if (aTileEntity instanceof IItemDuct) return true; if (BC_CHECK) if (aTileEntity instanceof buildcraft.api.transport.IPipeTile) return ((buildcraft.api.transport.IPipeTile)aTileEntity).isPipeConnected(ForgeDirection.getOrientation(aSide)); - return F; + return false; } /** @@ -505,7 +504,7 @@ public class GT_Utility { checkAvailabilities(); if (TE_CHECK && aTileEntity2 instanceof IItemDuct) { for (int i = 0; i < aGrabSlots.length; i++) { - if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlots[i]), T, aInvertFilter)) { + if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlots[i]), true, aInvertFilter)) { if (isAllowedToTakeFromSlot(aTileEntity1, aGrabSlots[i], (byte)aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlots[i]))) { if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) <= aTileEntity1.getStackInSlot(aGrabSlots[i]).stackSize) { ItemStack tStack = copyAmount(Math.min(aTileEntity1.getStackInSlot(aGrabSlots[i]).stackSize, Math.min(aMaxMoveAtOnce, aMaxTargetStackSize)), aTileEntity1.getStackInSlot(aGrabSlots[i])); @@ -525,13 +524,13 @@ public class GT_Utility { } if (BC_CHECK && aTileEntity2 instanceof buildcraft.api.transport.IPipeTile) { for (int i = 0; i < aGrabSlots.length; i++) { - if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlots[i]), T, aInvertFilter)) { + if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlots[i]), true, aInvertFilter)) { if (isAllowedToTakeFromSlot(aTileEntity1, aGrabSlots[i], (byte)aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlots[i]))) { if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) <= aTileEntity1.getStackInSlot(aGrabSlots[i]).stackSize) { ItemStack tStack = copyAmount(Math.min(aTileEntity1.getStackInSlot(aGrabSlots[i]).stackSize, Math.min(aMaxMoveAtOnce, aMaxTargetStackSize)), aTileEntity1.getStackInSlot(aGrabSlots[i])); - byte tMovedItemCount = (byte)((buildcraft.api.transport.IPipeTile)aTileEntity2).injectItem(copy(tStack), F, ForgeDirection.getOrientation(aPutTo)); + byte tMovedItemCount = (byte)((buildcraft.api.transport.IPipeTile)aTileEntity2).injectItem(copy(tStack), false, ForgeDirection.getOrientation(aPutTo)); if (tMovedItemCount >= Math.max(aMinMoveAtOnce, aMinTargetStackSize)) { - tMovedItemCount = (byte)(((buildcraft.api.transport.IPipeTile)aTileEntity2).injectItem(copyAmount(tMovedItemCount, tStack), T, ForgeDirection.getOrientation(aPutTo))); + tMovedItemCount = (byte)(((buildcraft.api.transport.IPipeTile)aTileEntity2).injectItem(copyAmount(tMovedItemCount, tStack), true , ForgeDirection.getOrientation(aPutTo))); aTileEntity1.decrStackSize(aGrabSlots[i], tMovedItemCount); aTileEntity1.markDirty(); return tMovedItemCount; @@ -549,7 +548,7 @@ public class GT_Utility { int tX = ((TileEntity)aTileEntity1).xCoord + tDirection.offsetX, tY = ((TileEntity)aTileEntity1).yCoord + tDirection.offsetY, tZ = ((TileEntity)aTileEntity1).zCoord + tDirection.offsetZ; if (!hasBlockHitBox(((TileEntity)aTileEntity1).getWorldObj(), tX, tY, tZ)) { for (int i = 0; i < aGrabSlots.length; i++) { - if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlots[i]), T, aInvertFilter)) { + if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabSlots[i]), true, aInvertFilter)) { if (isAllowedToTakeFromSlot(aTileEntity1, aGrabSlots[i], (byte)aGrabFrom, aTileEntity1.getStackInSlot(aGrabSlots[i]))) { if (Math.max(aMinMoveAtOnce, aMinTargetStackSize) <= aTileEntity1.getStackInSlot(aGrabSlots[i]).stackSize) { ItemStack tStack = copyAmount(Math.min(aTileEntity1.getStackInSlot(aGrabSlots[i]).stackSize, Math.min(aMaxMoveAtOnce, aMaxTargetStackSize)), aTileEntity1.getStackInSlot(aGrabSlots[i])); @@ -610,12 +609,12 @@ public class GT_Utility { || isAllowedToTakeFromSlot(aTileEntity, aSlot, (byte)5, aStack); } if (aTileEntity instanceof ISidedInventory) return ((ISidedInventory)aTileEntity).canExtractItem(aSlot, aStack, aSide); - return T; + return true; } public static boolean isAllowedToPutIntoSlot(IInventory aTileEntity, int aSlot, byte aSide, ItemStack aStack, byte aMaxStackSize) { ItemStack tStack = aTileEntity.getStackInSlot(aSlot); - if (tStack != null && (!areStacksEqual(tStack, aStack) || tStack.stackSize >= tStack.getMaxStackSize())) return F; + if (tStack != null && (!areStacksEqual(tStack, aStack) || tStack.stackSize >= tStack.getMaxStackSize())) return false; if (ForgeDirection.getOrientation(aSide) == ForgeDirection.UNKNOWN) { return isAllowedToPutIntoSlot(aTileEntity, aSlot, (byte)0, aStack, aMaxStackSize) || isAllowedToPutIntoSlot(aTileEntity, aSlot, (byte)1, aStack, aMaxStackSize) @@ -624,7 +623,7 @@ public class GT_Utility { || isAllowedToPutIntoSlot(aTileEntity, aSlot, (byte)4, aStack, aMaxStackSize) || isAllowedToPutIntoSlot(aTileEntity, aSlot, (byte)5, aStack, aMaxStackSize); } - if (aTileEntity instanceof ISidedInventory && !((ISidedInventory)aTileEntity).canInsertItem(aSlot, aStack, aSide)) return F; + if (aTileEntity instanceof ISidedInventory && !((ISidedInventory)aTileEntity).canInsertItem(aSlot, aStack, aSide)) return false; return aTileEntity.isItemValidForSlot(aSlot, aStack); } @@ -633,7 +632,7 @@ public class GT_Utility { * @return the Amount of moved Items */ public static byte moveOneItemStack(Object aTileEntity1, Object aTileEntity2, byte aGrabFrom, byte aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce) { - if (aTileEntity1 != null && aTileEntity1 instanceof IInventory) return moveOneItemStack((IInventory)aTileEntity1, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, T); + if (aTileEntity1 != null && aTileEntity1 instanceof IInventory) return moveOneItemStack((IInventory)aTileEntity1, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, true); return 0; } @@ -661,7 +660,7 @@ public class GT_Utility { for (int i = 0; i < tGrabSlots.length; i++) { for (int j = 0; j < tPutSlots.length; j++) { - if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(tGrabSlots[i]), T, aInvertFilter)) { + if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(tGrabSlots[i]), true, aInvertFilter)) { if (isAllowedToTakeFromSlot(aTileEntity1, tGrabSlots[i], aGrabFrom, aTileEntity1.getStackInSlot(tGrabSlots[i]))) { if (isAllowedToPutIntoSlot((IInventory)aTileEntity2, tPutSlots[j], aPutTo, aTileEntity1.getStackInSlot(tGrabSlots[i]), aMaxTargetStackSize)) { byte tMovedItemCount = moveStackFromSlotAToSlotB(aTileEntity1, (IInventory)aTileEntity2, tGrabSlots[i], tPutSlots[j], aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce); @@ -677,13 +676,13 @@ public class GT_Utility { if (tTileEntity1.adjacentChestChecked) { byte tAmount = 0; if (tTileEntity1.adjacentChestXNeg != null) { - tAmount = moveOneItemStack(tTileEntity1.adjacentChestXNeg, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, F); + tAmount = moveOneItemStack(tTileEntity1.adjacentChestXNeg, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); } else if (tTileEntity1.adjacentChestZNeg != null) { - tAmount = moveOneItemStack(tTileEntity1.adjacentChestZNeg, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, F); + tAmount = moveOneItemStack(tTileEntity1.adjacentChestZNeg, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); } else if (tTileEntity1.adjacentChestXPos != null) { - tAmount = moveOneItemStack(tTileEntity1.adjacentChestXPos, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, F); + tAmount = moveOneItemStack(tTileEntity1.adjacentChestXPos, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); } else if (tTileEntity1.adjacentChestZPos != null) { - tAmount = moveOneItemStack(tTileEntity1.adjacentChestZPos, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, F); + tAmount = moveOneItemStack(tTileEntity1.adjacentChestZPos, aTileEntity2, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); } if (tAmount != 0) return tAmount; } @@ -693,13 +692,13 @@ public class GT_Utility { if (tTileEntity2.adjacentChestChecked) { byte tAmount = 0; if (tTileEntity2.adjacentChestXNeg != null) { - tAmount = moveOneItemStack(aTileEntity1, tTileEntity2.adjacentChestXNeg, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, F); + tAmount = moveOneItemStack(aTileEntity1, tTileEntity2.adjacentChestXNeg, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); } else if (tTileEntity2.adjacentChestZNeg != null) { - tAmount = moveOneItemStack(aTileEntity1, tTileEntity2.adjacentChestZNeg, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, F); + tAmount = moveOneItemStack(aTileEntity1, tTileEntity2.adjacentChestZNeg, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); } else if (tTileEntity2.adjacentChestXPos != null) { - tAmount = moveOneItemStack(aTileEntity1, tTileEntity2.adjacentChestXPos, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, F); + tAmount = moveOneItemStack(aTileEntity1, tTileEntity2.adjacentChestXPos, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); } else if (tTileEntity2.adjacentChestZPos != null) { - tAmount = moveOneItemStack(aTileEntity1, tTileEntity2.adjacentChestZPos, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, F); + tAmount = moveOneItemStack(aTileEntity1, tTileEntity2.adjacentChestZPos, aGrabFrom, aPutTo, aFilter, aInvertFilter, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce, false); } if (tAmount != 0) return tAmount; } @@ -725,7 +724,7 @@ public class GT_Utility { if (aTileEntity2 != null && aTileEntity2 instanceof IInventory) { for (int i = 0; i < tGrabSlots.length; i++) { - if (listContainsItem(aFilter, ((IInventory)aTileEntity1).getStackInSlot(tGrabSlots[i]), T, aInvertFilter)) { + if (listContainsItem(aFilter, ((IInventory)aTileEntity1).getStackInSlot(tGrabSlots[i]), true, aInvertFilter)) { if (isAllowedToTakeFromSlot((IInventory)aTileEntity1, tGrabSlots[i], aGrabFrom, ((IInventory)aTileEntity1).getStackInSlot(tGrabSlots[i]))) { if (isAllowedToPutIntoSlot((IInventory)aTileEntity2, aPutTo, (byte)6, ((IInventory)aTileEntity1).getStackInSlot(tGrabSlots[i]), aMaxTargetStackSize)) { byte tMovedItemCount = moveStackFromSlotAToSlotB((IInventory)aTileEntity1, (IInventory)aTileEntity2, tGrabSlots[i], aPutTo, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce); @@ -746,7 +745,7 @@ public class GT_Utility { */ public static byte moveFromSlotToSlot(IInventory aTileEntity1, IInventory aTileEntity2, int aGrabFrom, int aPutTo, List<ItemStack> aFilter, boolean aInvertFilter, byte aMaxTargetStackSize, byte aMinTargetStackSize, byte aMaxMoveAtOnce, byte aMinMoveAtOnce) { if (aTileEntity1 == null || aTileEntity2 == null || aGrabFrom < 0 || aPutTo < 0 || aMaxTargetStackSize <= 0 || aMinTargetStackSize <= 0 || aMaxMoveAtOnce <= 0 || aMinTargetStackSize > aMaxTargetStackSize || aMinMoveAtOnce > aMaxMoveAtOnce) return 0; - if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabFrom), T, aInvertFilter)) { + if (listContainsItem(aFilter, aTileEntity1.getStackInSlot(aGrabFrom), true, aInvertFilter)) { if (isAllowedToTakeFromSlot(aTileEntity1, aGrabFrom, (byte)6, aTileEntity1.getStackInSlot(aGrabFrom))) { if (isAllowedToPutIntoSlot(aTileEntity2, aPutTo, (byte)6, aTileEntity1.getStackInSlot(aGrabFrom), aMaxTargetStackSize)) { byte tMovedItemCount = moveStackFromSlotAToSlotB(aTileEntity1, aTileEntity2, aGrabFrom, aPutTo, aMaxTargetStackSize, aMinTargetStackSize, aMaxMoveAtOnce, aMinMoveAtOnce); @@ -758,7 +757,7 @@ public class GT_Utility { } public static boolean listContainsItem(Collection<ItemStack> aList, ItemStack aStack, boolean aTIfListEmpty, boolean aInvertFilter) { - if (aStack == null || aStack.stackSize < 1) return F; + if (aStack == null || aStack.stackSize < 1) return false; if (aList == null) return aTIfListEmpty; while (aList.contains(null)) aList.remove(null); if (aList.size() < 1) return aTIfListEmpty; @@ -770,14 +769,14 @@ public class GT_Utility { public static boolean areStacksOrToolsEqual(ItemStack aStack1, ItemStack aStack2) { if (aStack1 != null && aStack2 != null && aStack1.getItem() == aStack2.getItem()) { - if (aStack1.getItem().isDamageable()) return T; + if (aStack1.getItem().isDamageable()) return true; return ((aStack1.getTagCompound() == null) == (aStack2.getTagCompound() == null)) && (aStack1.getTagCompound() == null || aStack1.getTagCompound().equals(aStack2.getTagCompound())) && (Items.feather.getDamage(aStack1) == Items.feather.getDamage(aStack2) || Items.feather.getDamage(aStack1) == W || Items.feather.getDamage(aStack2) == W); } - return F; + return false; } public static boolean areFluidsEqual(FluidStack aFluid1, FluidStack aFluid2) { - return areFluidsEqual(aFluid1, aFluid2, F); + return areFluidsEqual(aFluid1, aFluid2, false); } public static boolean areFluidsEqual(FluidStack aFluid1, FluidStack aFluid2, boolean aIgnoreNBT) { @@ -785,7 +784,7 @@ public class GT_Utility { } public static boolean areStacksEqual(ItemStack aStack1, ItemStack aStack2) { - return areStacksEqual(aStack1, aStack2, F); + return areStacksEqual(aStack1, aStack2, false); } public static boolean areStacksEqual(ItemStack aStack1, ItemStack aStack2, boolean aIgnoreNBT) { @@ -793,7 +792,7 @@ public class GT_Utility { } public static boolean areUnificationsEqual(ItemStack aStack1, ItemStack aStack2) { - return areUnificationsEqual(aStack1, aStack2, F); + return areUnificationsEqual(aStack1, aStack2, false); } public static boolean areUnificationsEqual(ItemStack aStack1, ItemStack aStack2, boolean aIgnoreNBT) { @@ -860,9 +859,9 @@ public class GT_Utility { } if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem)aStack.getItem()).getFluid(aStack) == null && ((IFluidContainerItem)aStack.getItem()).getCapacity(aStack) <= aFluid.amount) { if (aRemoveFluidDirectly) - aFluid.amount -= ((IFluidContainerItem)aStack.getItem()).fill(aStack = copyAmount(1, aStack), aFluid, T); + aFluid.amount -= ((IFluidContainerItem)aStack.getItem()).fill(aStack = copyAmount(1, aStack), aFluid, true); else - ((IFluidContainerItem)aStack.getItem()).fill(aStack = copyAmount(1, aStack), aFluid, T); + ((IFluidContainerItem)aStack.getItem()).fill(aStack = copyAmount(1, aStack), aFluid, true); return aStack; } Map<Fluid, FluidContainerData> tFluidToContainer = sEmptyContainerToFluidToData.get(new GT_ItemStack(aStack)); @@ -874,7 +873,7 @@ public class GT_Utility { } public static ItemStack getFluidDisplayStack(Fluid aFluid) { - return aFluid==null?null:getFluidDisplayStack(new FluidStack(aFluid, 0), F); + return aFluid==null?null:getFluidDisplayStack(new FluidStack(aFluid, 0), false); } public static ItemStack getFluidDisplayStack(FluidStack aFluid, boolean aUseStackSize) { @@ -895,15 +894,15 @@ public class GT_Utility { } public static boolean containsFluid(ItemStack aStack, FluidStack aFluid, boolean aCheckIFluidContainerItems) { - if (isStackInvalid(aStack) || aFluid == null) return F; + if (isStackInvalid(aStack) || aFluid == null) return false; if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem)aStack.getItem()).getCapacity(aStack) > 0) return aFluid.isFluidEqual(((IFluidContainerItem)aStack.getItem()).getFluid(aStack = copyAmount(1, aStack))); FluidContainerData tData = sFilledContainerToData.get(new GT_ItemStack(aStack)); - return tData==null?F:tData.fluid.isFluidEqual(aFluid); + return tData==null? false :tData.fluid.isFluidEqual(aFluid); } public static FluidStack getFluidForFilledItem(ItemStack aStack, boolean aCheckIFluidContainerItems) { if (isStackInvalid(aStack)) return null; - if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem)aStack.getItem()).getCapacity(aStack) > 0) return ((IFluidContainerItem)aStack.getItem()).drain(copyAmount(1, aStack), Integer.MAX_VALUE, T); + if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem)aStack.getItem()).getCapacity(aStack) > 0) return ((IFluidContainerItem)aStack.getItem()).drain(copyAmount(1, aStack), Integer.MAX_VALUE, true); FluidContainerData tData = sFilledContainerToData.get(new GT_ItemStack(aStack)); return tData==null?null:tData.fluid.copy(); } @@ -913,7 +912,7 @@ public class GT_Utility { FluidContainerData tData = sFilledContainerToData.get(new GT_ItemStack(aStack)); if (tData != null) return copyAmount(1, tData.emptyContainer); if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem)aStack.getItem()).getCapacity(aStack) > 0) { - ((IFluidContainerItem)aStack.getItem()).drain(aStack = copyAmount(1, aStack), Integer.MAX_VALUE, T); + ((IFluidContainerItem)aStack.getItem()).drain(aStack = copyAmount(1, aStack), Integer.MAX_VALUE, true); return aStack; } return null; @@ -923,13 +922,13 @@ public class GT_Utility { if (isStackInvalid(aStack)) return null; if (aStack.getItem().hasContainerItem(aStack)) return aStack.getItem().getContainerItem(aStack); /** These are all special Cases, in which it is intended to have only GT Blocks outputting those Container Items */ - if (ItemList.Cell_Empty.isStackEqual(aStack, F, T)) return null; - if (ItemList.IC2_Fuel_Can_Filled.isStackEqual(aStack, F, T)) return ItemList.IC2_Fuel_Can_Empty.get(1); + if (ItemList.Cell_Empty.isStackEqual(aStack, false, true)) return null; + if (ItemList.IC2_Fuel_Can_Filled.isStackEqual(aStack, false, true)) return ItemList.IC2_Fuel_Can_Empty.get(1); if (aStack.getItem() == Items.potionitem || aStack.getItem() == Items.experience_bottle || ItemList.TF_Vial_FieryBlood.isStackEqual(aStack) || ItemList.TF_Vial_FieryTears.isStackEqual(aStack)) return ItemList.Bottle_Empty.get(1); if (aCheckIFluidContainerItems && aStack.getItem() instanceof IFluidContainerItem && ((IFluidContainerItem)aStack.getItem()).getCapacity(aStack) > 0) { ItemStack tStack = copyAmount(1, aStack); - ((IFluidContainerItem)aStack.getItem()).drain(tStack, Integer.MAX_VALUE, T); + ((IFluidContainerItem)aStack.getItem()).drain(tStack, Integer.MAX_VALUE, true); if (!areStacksEqual(aStack, tStack)) return tStack; return null; } @@ -942,8 +941,8 @@ public class GT_Utility { } public static synchronized boolean removeSimpleIC2MachineRecipe(ItemStack aInput, Map<IRecipeInput, RecipeOutput> aRecipeList, ItemStack aOutput) { - if ((isStackInvalid(aInput) && isStackInvalid(aOutput)) || aRecipeList == null) return F; - boolean rReturn = F; + if ((isStackInvalid(aInput) && isStackInvalid(aOutput)) || aRecipeList == null) return false; + boolean rReturn = false; Iterator<Map.Entry<IRecipeInput, RecipeOutput>> tIterator = aRecipeList.entrySet().iterator(); aOutput = GT_OreDictUnificator.get(aOutput); while (tIterator.hasNext()) { @@ -952,7 +951,7 @@ public class GT_Utility { List<ItemStack> tList = tEntry.getValue().items; if (tList != null) for (ItemStack tOutput : tList) if (aOutput == null || areStacksEqual(GT_OreDictUnificator.get(tOutput), aOutput)) { tIterator.remove(); - rReturn = T; + rReturn = true; break; } } @@ -961,15 +960,15 @@ public class GT_Utility { } public static boolean addSimpleIC2MachineRecipe(ItemStack aInput, Map<IRecipeInput, RecipeOutput> aRecipeList, NBTTagCompound aNBT, Object... aOutput) { - if (isStackInvalid(aInput) || aOutput.length == 0 || aRecipeList == null) return F; + if (isStackInvalid(aInput) || aOutput.length == 0 || aRecipeList == null) return false; ItemData tOreName = GT_OreDictUnificator.getAssociation(aInput); - for(int i = 0;i<aOutput.length;i++){if(aOutput[i]==null){System.out.println("EmptyIC2Output!"+aInput.getUnlocalizedName());return F;}} + for(int i = 0;i<aOutput.length;i++){if(aOutput[i]==null){System.out.println("EmptyIC2Output!"+aInput.getUnlocalizedName());return false;}} if (tOreName != null) { - aRecipeList.put(new RecipeInputOreDict(tOreName.toString(), aInput.stackSize), new RecipeOutput(aNBT, GT_OreDictUnificator.getStackArray(T, aOutput))); + aRecipeList.put(new RecipeInputOreDict(tOreName.toString(), aInput.stackSize), new RecipeOutput(aNBT, GT_OreDictUnificator.getStackArray(true, aOutput))); } else { - aRecipeList.put(new RecipeInputItemStack(copy(aInput), aInput.stackSize), new RecipeOutput(aNBT, GT_OreDictUnificator.getStackArray(T, aOutput))); + aRecipeList.put(new RecipeInputItemStack(copy(aInput), aInput.stackSize), new RecipeOutput(aNBT, GT_OreDictUnificator.getStackArray(true, aOutput))); } - return T; + return true; } private static int sBookCount = 0; @@ -1023,7 +1022,7 @@ public class GT_Utility { } public static boolean doSoundAtClient(String aSoundName, int aTimeUntilNextSound, float aSoundStrength, Entity aEntity) { - if (aEntity == null) return F; + if (aEntity == null) return false; return doSoundAtClient(aSoundName, aTimeUntilNextSound, aSoundStrength, aEntity.posX, aEntity.posY, aEntity.posZ); } @@ -1032,18 +1031,18 @@ public class GT_Utility { } public static boolean doSoundAtClient(String aSoundName, int aTimeUntilNextSound, float aSoundStrength, float aSoundModulation, double aX, double aY, double aZ) { - if (isStringInvalid(aSoundName) || !FMLCommonHandler.instance().getEffectiveSide().isClient() || GT.getThePlayer() == null || !GT.getThePlayer().worldObj.isRemote) return F; + if (isStringInvalid(aSoundName) || !FMLCommonHandler.instance().getEffectiveSide().isClient() || GT.getThePlayer() == null || !GT.getThePlayer().worldObj.isRemote) return false; if (GregTech_API.sMultiThreadedSounds) new Thread(new GT_Runnable_Sound(GT.getThePlayer().worldObj, MathHelper.floor_double(aX), MathHelper.floor_double(aY), MathHelper.floor_double(aZ), aTimeUntilNextSound, aSoundName, aSoundStrength, aSoundModulation), "Sound Effect").start(); else new GT_Runnable_Sound(GT.getThePlayer().worldObj, MathHelper.floor_double(aX), MathHelper.floor_double(aY), MathHelper.floor_double(aZ), aTimeUntilNextSound, aSoundName, aSoundStrength, aSoundModulation).run(); - return T; + return true; } public static boolean sendSoundToPlayers(World aWorld, String aSoundName, float aSoundStrength, float aSoundModulation, int aX, int aY, int aZ) { - if (isStringInvalid(aSoundName) || aWorld == null || aWorld.isRemote) return F; + if (isStringInvalid(aSoundName) || aWorld == null || aWorld.isRemote) return false; NW.sendPacketToAllPlayersInRange(aWorld, new GT_Packet_Sound(aSoundName, aSoundStrength, aSoundModulation, aX, (short)aY, aZ), aX, aZ); - return T; + return true; } public static int stackToInt(ItemStack aStack) { @@ -1084,13 +1083,13 @@ public class GT_Utility { } public static boolean listContains(Object aObject, Collection aObjects) { - if (aObjects == null) return F; + if (aObjects == null) return false; return aObjects.contains(aObject); } public static <T> boolean arrayContainsNonNull(T... aArray) { - if (aArray != null) for (Object tObject : aArray) if (tObject != null) return T; - return F; + if (aArray != null) for (Object tObject : aArray) if (tObject != null) return true; + return false; } public static <T> ArrayList<T> getArrayListWithoutNulls(T... aArray) { @@ -1141,7 +1140,7 @@ public class GT_Utility { } public static boolean isDebugItem(ItemStack aStack) { - return /*ItemList.Armor_Cheat.isStackEqual(aStack, T, T) || */areStacksEqual(GT_ModHandler.getIC2Item("debug", 1), aStack, T); + return /*ItemList.Armor_Cheat.isStackEqual(aStack, T, T) || */areStacksEqual(GT_ModHandler.getIC2Item("debug", 1), aStack, true); } public static ItemStack updateItemStack(ItemStack aStack) { @@ -1192,16 +1191,16 @@ public class GT_Utility { */ public static String parseNumberToString(int aNumber) { String tString = E; - boolean temp = T, negative = F; + boolean temp = true , negative = false; if (aNumber<0) { aNumber *= -1; - negative = T; + negative = true; } for (int i = 1000000000; i > 0; i /= 10) { int tDigit = (aNumber/i)%10; - if ( temp && tDigit != 0) temp = F; + 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 += ","; @@ -1257,33 +1256,33 @@ public class GT_Utility { } public static boolean isWearingFullFrostHazmat(EntityLivingBase aEntity) { - for (byte i = 1; i < 5; i++) if (!isStackInList(aEntity.getEquipmentInSlot(i), GregTech_API.sFrostHazmatList)) return F; - return T; + for (byte i = 1; i < 5; i++) if (!isStackInList(aEntity.getEquipmentInSlot(i), GregTech_API.sFrostHazmatList)) return false; + return true; } public static boolean isWearingFullHeatHazmat(EntityLivingBase aEntity) { - for (byte i = 1; i < 5; i++) if (!isStackInList(aEntity.getEquipmentInSlot(i), GregTech_API.sHeatHazmatList)) return F; - return T; + for (byte i = 1; i < 5; i++) if (!isStackInList(aEntity.getEquipmentInSlot(i), GregTech_API.sHeatHazmatList)) return false; + return true; } public static boolean isWearingFullBioHazmat(EntityLivingBase aEntity) { - for (byte i = 1; i < 5; i++) if (!isStackInList(aEntity.getEquipmentInSlot(i), GregTech_API.sBioHazmatList)) return F; - return T; + for (byte i = 1; i < 5; i++) if (!isStackInList(aEntity.getEquipmentInSlot(i), GregTech_API.sBioHazmatList)) return false; + return true; } public static boolean isWearingFullRadioHazmat(EntityLivingBase aEntity) { - for (byte i = 1; i < 5; i++) if (!isStackInList(aEntity.getEquipmentInSlot(i), GregTech_API.sRadioHazmatList)) return F; - return T; + for (byte i = 1; i < 5; i++) if (!isStackInList(aEntity.getEquipmentInSlot(i), GregTech_API.sRadioHazmatList)) return false; + return true; } public static boolean isWearingFullElectroHazmat(EntityLivingBase aEntity) { - for (byte i = 1; i < 5; i++) if (!isStackInList(aEntity.getEquipmentInSlot(i), GregTech_API.sElectroHazmatList)) return F; - return T; + for (byte i = 1; i < 5; i++) if (!isStackInList(aEntity.getEquipmentInSlot(i), GregTech_API.sElectroHazmatList)) return false; + return true; } public static boolean isWearingFullGasHazmat(EntityLivingBase aEntity) { - for (byte i = 1; i < 5; i++) if (!isStackInList(aEntity.getEquipmentInSlot(i), GregTech_API.sGasHazmatList)) return F; - return T; + for (byte i = 1; i < 5; i++) if (!isStackInList(aEntity.getEquipmentInSlot(i), GregTech_API.sGasHazmatList)) return false; + return true; } public static float getHeatDamageFromItem(ItemStack aStack) { @@ -1307,26 +1306,26 @@ public class GT_Utility { public static boolean applyHeatDamage(EntityLivingBase aEntity, float aDamage) { if (aDamage > 0 && aEntity != null && aEntity.getActivePotionEffect(Potion.fireResistance) == null && !isWearingFullHeatHazmat(aEntity)) { aEntity.attackEntityFrom(GT_DamageSources.getHeatDamage(), aDamage); - return T; + return true; } - return F; + return false; } public static boolean applyFrostDamage(EntityLivingBase aEntity, float aDamage) { if (aDamage > 0 && aEntity != null && !isWearingFullFrostHazmat(aEntity)) { aEntity.attackEntityFrom(GT_DamageSources.getFrostDamage(), aDamage); - return T; + return true; } - return F; + return false; } public static boolean applyElectricityDamage(EntityLivingBase aEntity, long aVoltage, long aAmperage) { long aDamage = getTier(aVoltage) * aAmperage * 4; if (aDamage > 0 && aEntity != null && !isWearingFullElectroHazmat(aEntity)) { aEntity.attackEntityFrom(GT_DamageSources.getElectricDamage(), aDamage); - return T; + return true; } - return F; + return false; } public static boolean applyRadioactivity(EntityLivingBase aEntity, int aLevel, int aAmountOfItems) { @@ -1338,9 +1337,9 @@ public class GT_Utility { aEntity.addPotionEffect(new PotionEffect(Potion.weakness.id , aLevel * 150 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.weakness ))==null?0:tEffect.getDuration())), Math.max(0, (5*aLevel) / 7))); aEntity.addPotionEffect(new PotionEffect(Potion.hunger.id , aLevel * 130 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.hunger ))==null?0:tEffect.getDuration())), Math.max(0, (5*aLevel) / 7))); aEntity.addPotionEffect(new PotionEffect(24 /* IC2 Radiation */ , aLevel * 180 * aAmountOfItems + Math.max(0, ((tEffect = aEntity.getActivePotionEffect(Potion.potionTypes[24] ))==null?0:tEffect.getDuration())), Math.max(0, (5*aLevel) / 7))); - return T; + return true; } - return F; + return false; } public static ItemStack setStack(Object aSetStack, Object aToStack) { @@ -1423,12 +1422,12 @@ public class GT_Utility { ItemStack rStack = ItemStack.loadItemStackFromNBT(aNBT); try { if (rStack != null && (rStack.getItem().getClass().getName().startsWith("ic2.core.migration"))) { - rStack.getItem().onUpdate(rStack, DW, null, 0, F); + rStack.getItem().onUpdate(rStack, DW, null, 0, false); } } catch(Throwable e) { e.printStackTrace(GT_Log.err); } - return GT_OreDictUnificator.get(T, rStack); + return GT_OreDictUnificator.get(true , rStack); } /** @@ -1454,7 +1453,7 @@ public class GT_Utility { } public static boolean isStackInList(ItemStack aStack, Collection<GT_ItemStack> aList) { - if (aStack == null) {return F;} + if (aStack == null) {return false;} return isStackInList(new GT_ItemStack(aStack), aList); } @@ -1515,10 +1514,10 @@ public class GT_Utility { */ public static boolean isRealDimension(int aDimensionID) { try { - if (DimensionManager.getProvider(aDimensionID).getClass().getName().contains("com.xcompwiz.mystcraft")) return T; + if (DimensionManager.getProvider(aDimensionID).getClass().getName().contains("com.xcompwiz.mystcraft")) return true; } catch (Throwable e) {/*Do nothing*/} try { - if (DimensionManager.getProvider(aDimensionID).getClass().getName().contains("TwilightForest")) return T; + if (DimensionManager.getProvider(aDimensionID).getClass().getName().contains("TwilightForest")) return true; } catch (Throwable e) {/*Do nothing*/} return GregTech_API.sDimensionalList.contains(aDimensionID); } @@ -1534,7 +1533,7 @@ public class GT_Utility { aPlayer.dimension = aDimension; aPlayer.playerNetServerHandler.sendPacket(new S07PacketRespawn(aPlayer.dimension, aPlayer.worldObj.difficultySetting, aPlayer.worldObj.getWorldInfo().getTerrainType(), aPlayer.theItemInWorldManager.getGameType())); tOriginalWorld.removePlayerEntityDangerously(aPlayer); - aPlayer.isDead = F; + aPlayer.isDead = false; aPlayer.setWorld(tTargetWorld); MinecraftServer.getServer().getConfigurationManager().func_72375_a(aPlayer, tOriginalWorld); aPlayer.playerNetServerHandler.setPlayerLocation(aX+0.5, aY+0.5, aZ+0.5, aPlayer.rotationYaw, aPlayer.rotationPitch); @@ -1552,17 +1551,17 @@ public class GT_Utility { aEntity.setPosition(aX+0.5, aY+0.5, aZ+0.5); aEntity.worldObj.removeEntity(aEntity); aEntity.dimension = aDimension; - aEntity.isDead = F; + aEntity.isDead = false; Entity tNewEntity = EntityList.createEntityByName(EntityList.getEntityString(aEntity), tTargetWorld); if (tNewEntity != null) { - tNewEntity.copyDataFrom(aEntity, T); + tNewEntity.copyDataFrom(aEntity, true); aEntity.setDead(); - tNewEntity.isDead = F; + tNewEntity.isDead = false; boolean temp = tNewEntity.forceSpawn; - tNewEntity.forceSpawn = T; + tNewEntity.forceSpawn = true; tTargetWorld.spawnEntityInWorld(tNewEntity); tNewEntity.forceSpawn = temp; - tNewEntity.isDead = F; + tNewEntity.isDead = false; aEntity = tNewEntity; } } @@ -1575,9 +1574,9 @@ public class GT_Utility { tOriginalWorld.resetUpdateEntityTick(); tTargetWorld.resetUpdateEntityTick(); - return T; + return true; } - return F; + return false; } public static int getCoordinateScan(ArrayList<String> aList, EntityPlayer aPlayer, World aWorld, int aScanLevel, int aX, int aY, int aZ, int aSide, float aClickX, float aClickY, float aClickZ) { @@ -1605,7 +1604,7 @@ public class GT_Utility { rEUAmount+=500; FluidTankInfo[] tTanks = ((IFluidHandler)tTileEntity).getTankInfo(ForgeDirection.getOrientation(aSide)); if (tTanks != null) for (byte i = 0; i < tTanks.length; i++) { - tList.add("Tank " + i + ": " + GT_Utility.formatNumbers((tTanks[i].fluid==null?0:tTanks[i].fluid.amount)) + " / " + GT_Utility.formatNumbers(tTanks[i].capacity) + " " + getFluidName(tTanks[i].fluid, T)); + tList.add("Tank " + i + ": " + GT_Utility.formatNumbers((tTanks[i].fluid==null?0:tTanks[i].fluid.amount)) + " / " + GT_Utility.formatNumbers(tTanks[i].capacity) + " " + getFluidName(tTanks[i].fluid, true)); } }} catch(Throwable e) {if (D1) e.printStackTrace(GT_Log.err);} try {if (tTileEntity instanceof ic2.api.reactor.IReactorChamber) { |