aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/xmod/gregtech
diff options
context:
space:
mode:
Diffstat (limited to 'src/Java/gtPlusPlus/xmod/gregtech')
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java20
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java52
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java163
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java7
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java14
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java32
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG.java9
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java10
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java251
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java18
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java25
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_Catalysts.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_MillingBalls.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java10
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java35
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/helpers/VolumetricFlaskHelper.java20
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java9
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_RfConvertor.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java11
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java10
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java1
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_CombustionGenerator.java17
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_GasTurbine.java18
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_SteamTurbine.java18
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaCondensor.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java7
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorColdTrap.java67
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorProcessingUnit.java67
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java1
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java15
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java18
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java23
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java23
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java23
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java20
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java24
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java23
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java17
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java17
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java23
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java24
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java17
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java17
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java17
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java26
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java20
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java17
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java44
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java414
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java26
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java27
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java17
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java12
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java20
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java20
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java1179
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java18
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java497
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java21
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java20
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java20
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java20
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java38
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java16
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java23
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java24
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java12
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java41
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java35
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredChest.java9
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java12
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/creative/GT_MetaTileEntity_InfiniteItemHolder.java9
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java (renamed from src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngelGrinder.java)4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java5
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java20
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java71
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java34
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java3
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java119
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java5
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java42
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_GTNH.java22
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_LFTR.java177
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_Nuclear.java695
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_NuclearFuelProcessing.java372
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java272
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java97
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElementDuplicator.java4
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLFTR.java17
120 files changed, 3969 insertions, 1970 deletions
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index fd5ceed89b..8c814489f2 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -396,9 +396,15 @@ public enum GregtechItemList implements GregtechItemContainer {
// Flotation Cell
Controller_Flotation_Cell,
+ Casing_Flotation_Cell,
+
+ // Sparge Tower
+ Controller_Sparge_Tower,
+ Casing_Sparge_Tower_Exterior,
+ Casing_Sparge_Tower_Interior,
// Elemental Duplicator
- /*Controller_ElementalDuplicator,*/
+ Controller_ElementalDuplicator,
Casing_ElementalDuplicator,
// Big Steam Macerator
@@ -452,7 +458,7 @@ public enum GregtechItemList implements GregtechItemContainer {
Hatch_Output_Bus_Steam,
//Elemental Duplicator Data Orb Bus
- /*Hatch_Input_Elemental_Duplicator,*/
+ Hatch_Input_Elemental_Duplicator,
//RTG Hatch
Hatch_RTG_LV,
@@ -585,9 +591,13 @@ public enum GregtechItemList implements GregtechItemContainer {
Machine_ZPM_Component_Maker,
Machine_UV_Component_Maker,
- // Fluid Reactor
- FluidReactor_LV, FluidReactor_HV,
- FluidReactor_IV, FluidReactor_ZPM,
+ // Reactor Processing Unit
+ ReactorProcessingUnit_IV,
+ ReactorProcessingUnit_ZPM,
+
+ // Cold Trap
+ ColdTrap_IV,
+ ColdTrap_ZPM,
//Breakers
BreakerBox_ULV, BreakerBox_LV, BreakerBox_MV,
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
index 229bc234e9..6bf048320f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java
@@ -1,6 +1,8 @@
package gtPlusPlus.xmod.gregtech.api.interfaces.internal;
+import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
+import gregtech.api.util.GT_Recipe;
import gtPlusPlus.core.material.Material;
import net.minecraft.item.ItemStack;
@@ -22,6 +24,13 @@ public interface IGregtech_RecipeAdder {
//public boolean addCokeOvenRecipe(boolean aOptimize, ItemStack[] aInputs, ItemStack[] aOutputs, Object aSpecial, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, int aDuration, int aEUt, int aSpecialValue);
public boolean addCokeOvenRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput, int aDuration, int aEUt);
+
+ public boolean addCokeOvenRecipe(int aCircuit, ItemStack aInput2, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUt);
+
+
+ public boolean addCokeOvenRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUt);
+
+
public boolean addFuel(ItemStack aInput1, ItemStack aOutput1, int aEU, int aType);
@@ -62,7 +71,7 @@ public interface IGregtech_RecipeAdder {
* @return true if the Recipe got added, otherwise false.
*/
- public boolean addDehydratorRecipe(ItemStack aInput, FluidStack aFluid, ItemStack[] aOutputItems, int aDuration, int aEUt);
+ //public boolean addDehydratorRecipe(ItemStack aInput, FluidStack aFluid, ItemStack[] aOutputItems, int aDuration, int aEUt);
/*public boolean addDehydratorRecipe(FluidStack aFluid, FluidStack aOutputFluid, ItemStack[] aOutputItems, int aDuration, int aEUt);*/
/*public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack aItemB, ItemStack[] aOutputItems, int aDuration, int aEUt);
public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack aItemB, FluidStack aFluid, ItemStack[] aOutputItems, FluidStack aOutputFluid, int aDuration, int aEUt);*/
@@ -124,16 +133,16 @@ public interface IGregtech_RecipeAdder {
public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, int aChance, int aDuration, int aEUt, int aSpecialValue);
/**
- * Adds a Recipe for the Alloy Blast Smelter. (up to 9 Inputs)
+ * Adds a Recipe for the LFTRr. (up to 9 Inputs)
*
* @param aInput = ItemStack[] (not null, and respects StackSize)
* @param aFluidInput = Input of a fluid (can be null, and respects StackSize)
- * @param aFluidOutput = Output of the Molten Metal (not null, and respects StackSize)
+ * @param aFluidOutput = Output of the Molten Salts (not null, and respects StackSize)
* @param aOutputStack = Item Output (Can be null)
* @param aChances = Output Chance (can be == 0)
* @param aDuration = Duration (must be >= 0)
* @param aEUt = EU per tick needed for heating up (must be >= 0)
- * @param aSpecialValue = Stores the Required Temp for the Recipe
+ * @param aSpecialValue = Power produced in EU/t per dynamo
* @return true if the Recipe got added, otherwise false.
*/
public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt, int aSpecialValue);
@@ -166,6 +175,14 @@ public interface IGregtech_RecipeAdder {
FluidStack aInput7, FluidStack aInput8, FluidStack aInput9,
FluidStack aOutput1, FluidStack aOutput2,
int aDuration, int aEUt);
+
+ public boolean addFissionFuel(
+ boolean aOptimise,
+ FluidStack aInput1, FluidStack aInput2, FluidStack aInput3,
+ FluidStack aInput4, FluidStack aInput5, FluidStack aInput6,
+ FluidStack aInput7, FluidStack aInput8, FluidStack aInput9,
+ FluidStack aOutput1, FluidStack aOutput2,
+ int aDuration, int aEUt);
public boolean addCyclotronRecipe(ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs,
FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue);
@@ -200,9 +217,27 @@ public interface IGregtech_RecipeAdder {
public boolean addAssemblerRecipeWithOreDict(Object aInput1, int aAmount1, Object aInput2, int aAmount2, FluidStack aInputFluid, ItemStack aOutput, int a1, int a2);
public boolean addSixSlotAssemblingRecipe(ItemStack[] aInputs, FluidStack aInputFluid, ItemStack aOutput1, int aDuration, int aEUt);
-
+ /**
+ * Adds an Assemblyline Recipe
+ *
+ * @param aInputs must be != null, 4-16 inputs
+ * @param aFluidInputs 0-4 fluids
+ * @param aOutput1 must be != null
+ * @param aDuration must be > 0
+ * @param aEUt should be > 0
+ */
public boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt);
+ /**
+ * Adds a Assemblyline Recipe
+ *
+ * @param aInputs elements should be: ItemStack for single item;
+ * ItemStack[] for multiple equivalent items;
+ * {OreDict, amount} for oredict.
+ */
+ boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, Object[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput1, int aDuration, int aEUt);
+
+
public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, int time, int eu);
public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, Object object, int time, int eu);
public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, ItemStack object, int time);
@@ -297,5 +332,12 @@ public interface IGregtech_RecipeAdder {
public boolean addFuelForRTG(ItemStack aFuelPellet, int aFuelDays, int aVoltage);
+ public boolean addColdTrapRecipe(int aCircuit, ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, FluidStack aFluidOutput, int aTime, int aEU);
+
+ public boolean addReactorProcessingUnitRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, FluidStack aFluidOutput, int aTime, int aEU);
+
+ public boolean addFluidHeaterRecipe(ItemStack aCircuit, FluidStack aInput, FluidStack aOutput, int aDuration, int aEUt);
+
+ public boolean addVacuumFreezerRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEU);
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java
new file mode 100644
index 0000000000..aebf188fc0
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Dehydrator.java
@@ -0,0 +1,163 @@
+package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations;
+
+import static gregtech.api.enums.Textures.BlockIcons.MACHINE_CASINGS;
+import static gregtech.api.enums.Textures.BlockIcons.OVERLAY_PIPE_OUT;
+
+import gregtech.api.enums.Textures;
+import gregtech.api.enums.Textures.BlockIcons.CustomIcon;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GTPP_Recipe;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
+import gtPlusPlus.core.lib.CORE;
+
+@SuppressWarnings("deprecation")
+public class GT_MetaTileEntity_Dehydrator extends GT_MetaTileEntity_BasicMachine_GT_Recipe {
+
+ private static final CustomIcon[] sDehydratorOverlays = new CustomIcon[10];
+ static {
+ sDehydratorOverlays[0] = new CustomIcon("basicmachines/microwave/OVERLAY_FRONT");
+ sDehydratorOverlays[2] = new CustomIcon("basicmachines/plasma_arc_furnace/OVERLAY_BOTTOM");
+ sDehydratorOverlays[3] = new CustomIcon("basicmachines/fluid_heater/OVERLAY_SIDE");
+ sDehydratorOverlays[4] = new CustomIcon("basicmachines/chemical_bath/OVERLAY_FRONT");
+ sDehydratorOverlays[5] = new CustomIcon("basicmachines/microwave/OVERLAY_FRONT_ACTIVE");
+ sDehydratorOverlays[7] = new CustomIcon("basicmachines/plasma_arc_furnace/OVERLAY_BOTTOM_ACTIVE");
+ sDehydratorOverlays[8] = new CustomIcon("basicmachines/fluid_heater/OVERLAY_SIDE_ACTIVE");
+ sDehydratorOverlays[9] = new CustomIcon("basicmachines/chemical_bath/OVERLAY_FRONT_ACTIVE");
+ //3 8
+ }
+
+ private GT_Recipe_Map xRecipes;
+ private int xTankCapacity;
+
+ public GT_MetaTileEntity_Dehydrator(int aID, String aName, String aNameRegional, int aTier, String aDescription, int aTankCapacity) {
+ super(aID, aName, aNameRegional, aTier, aDescription, GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes, 2, 9, aTankCapacity, 2, 5, "Dehydrator.png", "UNBOXINATOR", false, false, 0, "", null);
+ xRecipes = GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes;
+ xTankCapacity = aTankCapacity;
+ }
+
+ public GT_MetaTileEntity_Dehydrator(String aName, int aTier, String[] aDescription, GT_Recipe.GT_Recipe_Map aRecipes, int aTankCapacity, int aAmperage, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
+ super(aName, aTier, aDescription, aRecipes, 2, 9, aTankCapacity, aAmperage, 2, 5, aTextures, aGUIName, aNEIName, "", false, false, 0);
+
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GT_MetaTileEntity_Dehydrator(this.mName, this.mTier, this.mDescriptionArray, this.xRecipes, this.xTankCapacity, this.mAmperage, this.mTextures, this.mGUIName, this.mNEIName);
+ }
+
+ @Override
+ public String[] getDescription() {
+ String[] S = super.getDescription();
+ final String[] desc = new String[S.length + 1];
+ System.arraycopy(S, 0, desc, 0, S.length);
+ desc[S.length] = CORE.GT_Tooltip;
+ return desc;
+ }
+
+ @Override
+ public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
+ final ITexture[][][] rTextures = new ITexture[15][17][];
+ for (byte i = -1; i < 16; i++) {
+ rTextures[0][i + 1] = getSideFacingActive(i);
+ rTextures[1][i + 1] = getSideFacingInactive(i);
+ rTextures[2][i + 1] = getFrontFacingActive(i);
+ rTextures[3][i + 1] = getFrontFacingInactive(i);
+ rTextures[4][i + 1] = getTopFacingActive(i);
+ rTextures[5][i + 1] = getTopFacingInactive(i);
+ rTextures[6][i + 1] = getBottomFacingActive(i);
+ rTextures[7][i + 1] = getBottomFacingInactive(i);
+ rTextures[8][i + 1] = getBottomFacingPipeActive(i);
+ rTextures[9][i + 1] = getBottomFacingPipeInactive(i);
+ rTextures[10][i + 1] = getTopFacingPipeActive(i);
+ rTextures[11][i + 1] = getTopFacingPipeInactive(i);
+ rTextures[12][i + 1] = getSideFacingPipeActive(i);
+ rTextures[13][i + 1] = getSideFacingPipeInactive(i);
+ }
+ return rTextures;
+ }
+
+
+
+ @Override
+ public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
+ return super.getTexture(aBaseMetaTileEntity, aSide, aFacing, aColorIndex, aActive, aRedstone);
+ //return this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1];
+ }
+
+ @Override
+ public ITexture[] getFrontFacingInactive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[0])};
+ }
+
+ @Override
+ public ITexture[] getBottomFacingInactive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[2])};
+ }
+
+ @Override
+ public ITexture[] getTopFacingInactive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[3])};
+ }
+
+ @Override
+ public ITexture[] getSideFacingInactive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[4])};
+ }
+
+ @Override
+ public ITexture[] getFrontFacingActive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[5])};
+ }
+
+ @Override
+ public ITexture[] getBottomFacingActive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[7])};
+ }
+
+ @Override
+ public ITexture[] getTopFacingActive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[8])};
+ }
+
+ @Override
+ public ITexture[] getSideFacingActive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier][aColor + 1], new GT_RenderedTexture(sDehydratorOverlays[9])};
+ }
+
+ @Override
+ public ITexture[] getBottomFacingPipeActive(byte aColor) {
+ return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)};
+ }
+
+ @Override
+ public ITexture[] getBottomFacingPipeInactive(byte aColor) {
+ return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)};
+ }
+
+ @Override
+ public ITexture[] getTopFacingPipeActive(byte aColor) {
+ return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)};
+ }
+
+ @Override
+ public ITexture[] getTopFacingPipeInactive(byte aColor) {
+ return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)};
+ }
+
+ @Override
+ public ITexture[] getSideFacingPipeActive(byte aColor) {
+ return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)};
+ }
+
+ @Override
+ public ITexture[] getSideFacingPipeInactive(byte aColor) {
+ return new ITexture[]{MACHINE_CASINGS[mTier][aColor + 1], TextureFactory.of(OVERLAY_PIPE_OUT)};
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java
index a7d395b0a1..e6fd5dc797 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_AirIntake.java
@@ -70,15 +70,16 @@ public class GT_MetaTileEntity_Hatch_AirIntake extends GT_MetaTileEntity_Hatch_I
}
if (S != null) {
- final String[] desc = new String[S.length + 3];
+ final String[] desc = new String[S.length + 4];
System.arraycopy(S, 0, desc, 0, S.length);
desc[S.length] = "DO NOT OBSTRUCT THE INPUT!";
desc[S.length + 1] = "Draws in Air from the surrounding environment";
desc[S.length + 2] = "Creates 1000L of Air every 4 ticks";
+ desc[S.length + 3] = CORE.GT_Tooltip;
return desc;
}
else {
- return new String[] {"DO NOT OBSTRUCT THE INPUT!", "Draws in Air from the surrounding environment", "Creates 1000L of Air every 4 ticks"};
+ return new String[] {"DO NOT OBSTRUCT THE INPUT!", "Draws in Air from the surrounding environment", "Creates 1000L of Air every 4 ticks", CORE.GT_Tooltip};
}
@@ -126,7 +127,7 @@ public class GT_MetaTileEntity_Hatch_AirIntake extends GT_MetaTileEntity_Hatch_I
public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
super.onPostTick(aBaseMetaTileEntity, aTick);
- if (addAirToHatch(aTick)) {
+ if (this.getBaseMetaTileEntity().isActive() && addAirToHatch(aTick)) {
if (aTick % 8 == 0) {
if (aBaseMetaTileEntity.isClientSide()) {
this.pollutionParticles(this.getBaseMetaTileEntity().getWorld(), "cloud");
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java
index 7a532807c8..5347b2e4f7 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ControlCore.java
@@ -10,6 +10,7 @@ import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.minecraft.BlockPos;
import gtPlusPlus.core.item.general.ItemControlCore;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.common.StaticFields59;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.entity.player.EntityPlayer;
@@ -34,6 +35,13 @@ public class GT_MetaTileEntity_Hatch_ControlCore extends GT_MetaTileEntity_Hatch
public GT_MetaTileEntity_Hatch_ControlCore(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
super(aName, aTier, aTier < 1 ? 1 : aTier == 1 ? 4 : aTier == 2 ? 9 : 16, aDescription[0], aTextures);
}
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{
+ this.mDescription,
+ CORE.GT_Tooltip};
+ }
@Override
public ITexture[] getTexturesActive(ITexture aBaseTexture) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java
index 5fef0f1088..39f477b173 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_DynamoBuffer.java
@@ -53,11 +53,21 @@ public class GT_MetaTileEntity_Hatch_DynamoBuffer extends GT_MetaTileEntity_Hatc
public String[] getDescription() {
String[] g;
if (CORE.GTNH || (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK && Utils.getGregtechVersionAsInt() >= 50932)) {
- g = new String[]{"Dynamo with internal storage and additional Amp capacity", "Capacity: "+maxEUStore()+"EU", "Voltage: "+this.maxEUOutput(), "Amperage In: 4", "Amperage Out: 4"};
+ g = new String[]{
+ "Dynamo with internal storage and additional Amp capacity",
+ "Does not accept more than "+(this.maxEUOutput() * this.maxAmperesIn())+"EU/t as input",
+ CORE.GT_Tooltip};
}
else {
- g = new String[]{"Dynamo with internal storage and additional Amp capacity", "Stores "+maxEUStore()+"EU", "Amperage In: 4", "Amperage Out: 4", "Does not accept more than "+this.maxEUOutput()+"EU/t as input", "Large Turbines only supply 1A to this, other Multiblocks can inject more amps"};
+ g = new String[]{
+ "Dynamo with internal storage and additional Amp capacity",
+ "Stores "+maxEUStore()+"EU",
+ "Amperage In: 4",
+ "Amperage Out: 4",
+ "Does not accept more than "+(this.maxEUOutput() * this.maxAmperesIn())+"EU/t as input",
+ "Large Turbines only supply 1A to this, other Multiblocks can inject more amps",
+ CORE.GT_Tooltip};
}
return g;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java
index a98c57eb30..a892346463 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_ElementalDataOrbHolder.java
@@ -1,5 +1,7 @@
package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations;
+import java.util.ArrayList;
+
import gregtech.api.gui.GT_Container_4by4;
import gregtech.api.gui.GT_GUIContainer_4by4;
import gregtech.api.interfaces.ITexture;
@@ -9,6 +11,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
@@ -17,13 +20,12 @@ import net.minecraft.nbt.NBTTagCompound;
public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileEntity_Hatch {
public GT_Recipe_Map mRecipeMap = null;
- public boolean disableSort;
public GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, 16, new String[]{
"Holds Data Orbs for the Elemental Duplicator",
- });
- disableSort = true;
+ CORE.GT_Tooltip
+ });
}
public GT_MetaTileEntity_Hatch_ElementalDataOrbHolder(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
@@ -83,7 +85,7 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE
@Override
public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
- return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Steam Input Bus");
+ return new GT_GUIContainer_4by4(aPlayerInventory, aBaseMetaTileEntity, "Data Orb Repository");
}
@Override
@@ -100,28 +102,26 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE
}
protected void fillStacksIntoFirstSlots() {
- if (disableSort) {
- for (int i = 0; i < mInventory.length; i++)
- if (mInventory[i] != null && mInventory[i].stackSize <= 0)
- mInventory[i] = null;
- }
+ for (int i = 0; i < mInventory.length; i++) {
+ if (mInventory[i] != null && mInventory[i].stackSize <= 0) {
+ mInventory[i] = null;
+ }
+ }
}
@Override
public void saveNBTData(NBTTagCompound aNBT) {
super.saveNBTData(aNBT);
- aNBT.setBoolean("disableSort", disableSort);
}
@Override
public void loadNBTData(NBTTagCompound aNBT) {
super.loadNBTData(aNBT);
- disableSort = aNBT.getBoolean("disableSort");
}
@Override
public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
-
+
}
public String trans(String aKey, String aEnglish) {
@@ -137,5 +137,13 @@ public class GT_MetaTileEntity_Hatch_ElementalDataOrbHolder extends GT_MetaTileE
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
return aSide == getBaseMetaTileEntity().getFrontFacing() && (mRecipeMap == null || mRecipeMap.containsInput(aStack));
}
+
+ public ArrayList<ItemStack> getInventory(){
+ ArrayList<ItemStack> aContents = new ArrayList<ItemStack>();
+ for (int i=0;i<this.getSizeInventory();i++) {
+ aContents.add(this.getStackInSlot(i));
+ }
+ return aContents;
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG.java
index 7b52b9449f..93e6274508 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Energy_RTG.java
@@ -12,6 +12,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.InventoryUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
@@ -37,8 +38,12 @@ public class GT_MetaTileEntity_Hatch_Energy_RTG extends GT_MetaTileEntity_Hatch_
}
@Override
- public String[] getDescription() {
- return super.getDescription();
+ public String[] getDescription() {
+ String[] S = super.getDescription();
+ final String[] desc = new String[S.length + 1];
+ System.arraycopy(S, 0, desc, 0, S.length);
+ desc[S.length] = CORE.GT_Tooltip;
+ return desc;
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java
index 01134817ae..57f8b722c3 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_InputBattery.java
@@ -51,7 +51,8 @@ GT_MetaTileEntity_Hatch {
}
return new String[]{
this.mDescription,
- "Capacity: " + mSlots + " slots"};
+ "Capacity: " + mSlots + " slots",
+ CORE.GT_Tooltip};
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java
index 5303a42bf6..ba4e394114 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java
@@ -62,15 +62,15 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch
public String[] getDescription() {
if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
String[] mDescArray = StaticFields59.getDescriptionArray(this);
- String[] desc = new String[mDescArray.length + 6];
+ String[] desc = new String[mDescArray.length + 7];
System.arraycopy(mDescArray, 0, desc, 0, mDescArray.length);
desc[mDescArray.length] = "DO NOT OBSTRUCT THE OUTPUT!";
desc[mDescArray.length + 1] = "Requires 3 Air on the exhaust face";
desc[mDescArray.length + 2] = "Requires Air Filters";
desc[mDescArray.length + 3] = "Mufflers require T2 Filters from IV-"+GT_Values.VN[9];
desc[mDescArray.length + 4] = "Reduces Pollution to " + this.calculatePollutionReductionForTooltip(100) + "%";
- desc[mDescArray.length + 5] = "Recovers " + (105 - this.calculatePollutionReductionForTooltip(100))
- + "% of CO2/CO/SO2";
+ desc[mDescArray.length + 5] = "Recovers " + (105 - this.calculatePollutionReductionForTooltip(100)) + "% of CO2/CO/SO2";
+ desc[mDescArray.length + 6] = CORE.GT_Tooltip;
return desc;
}
else {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java
index 0d4d8b6cdd..d0f1d8e03f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Naquadah.java
@@ -12,6 +12,7 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.common.StaticFields59;
import net.minecraft.item.ItemStack;
@@ -115,7 +116,8 @@ public class GT_MetaTileEntity_Hatch_Naquadah extends GT_MetaTileEntity_Hatch_In
"Capacity: " + getCapacity()+"L",
"Accepted Fluid: " + aNaq,
"Accepted Fluid: " + aEnrNaq,
- "Accepted Fluid: " + aNaquad
+ "Accepted Fluid: " + aNaquad,
+ CORE.GT_Tooltip
};
return s2;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java
index 8cb7c943c0..ba97cc38eb 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_OutputBattery.java
@@ -49,7 +49,8 @@ GT_MetaTileEntity_Hatch {
}
return new String[]{
this.mDescription,
- "Capacity: " + mSlots + " slots"};
+ "Capacity: " + mSlots + " slots",
+ CORE.GT_Tooltip};
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java
index b395bbbabe..1251c42ae3 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java
@@ -11,6 +11,7 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.common.StaticFields59;
import net.minecraft.item.ItemStack;
@@ -159,7 +160,7 @@ public class GT_MetaTileEntity_Hatch_Plasma extends GT_MetaTileEntity_Hatch_Outp
String[] s2 = new String[]{
- a1, a2, a3
+ a1, a2, a3, CORE.GT_Tooltip
};
return s2;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java
index fb67b48e7f..f1dd131a67 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusInput.java
@@ -10,6 +10,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
+import gtPlusPlus.core.lib.CORE;
import gregtech.api.util.GT_Utility;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
@@ -25,7 +26,8 @@ public class GT_MetaTileEntity_Hatch_Steam_BusInput extends GT_MetaTileEntity_Ha
"Item Input for Steam Multiblocks",
"Shift + right click with screwdriver to toggle automatic item shuffling",
"Capacity: 4 stacks",
- "Does not work with non-steam multiblocks"});
+ "Does not work with non-steam multiblocks",
+ CORE.GT_Tooltip});
}
public GT_MetaTileEntity_Hatch_Steam_BusInput(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java
index fb626cb817..2fb3fea084 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Steam_BusOutput.java
@@ -8,6 +8,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
import gregtech.api.objects.GT_RenderedTexture;
+import gtPlusPlus.core.lib.CORE;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
@@ -16,7 +17,8 @@ public class GT_MetaTileEntity_Hatch_Steam_BusOutput extends GT_MetaTileEntity_H
public GT_MetaTileEntity_Hatch_Steam_BusOutput(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier, 4, new String[]{"Item Output for Steam Multiblocks",
"Capacity: 4 stacks",
- "Does not work with non-steam multiblocks"});
+ "Does not work with non-steam multiblocks",
+ CORE.GT_Tooltip});
}
public GT_MetaTileEntity_Hatch_Steam_BusOutput(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java
index 752321506d..0b84f676f4 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_TurbineProvider.java
@@ -8,6 +8,7 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus;
import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_LargeTurbine;
import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.core.util.sys.KeyboardUtils;
@@ -49,7 +50,14 @@ public class GT_MetaTileEntity_Hatch_TurbineProvider extends GT_MetaTileEntity_H
@Override
public String[] getDescription() {
return new String[]{
- "An automation port for Large Turbines", "Will attempt once per 1200 ticks to fill the turbine slot of it's parent turbine", "You may adjust this with a screwdriver", "Hold shift to adjust in finer amounts", "Hold control to adjust direction", "Left Click with Screwdriver to reset", "This module assumes the entire turbine is in the same Chunk"};
+ "An automation port for Large Turbines",
+ "Will attempt once per 1200 ticks to fill the turbine slot of it's parent turbine",
+ "You may adjust this with a screwdriver",
+ "Hold shift to adjust in finer amounts",
+ "Hold control to adjust direction",
+ "Left Click with Screwdriver to reset",
+ "This module assumes the entire turbine is in the same Chunk",
+ CORE.GT_Tooltip};
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java
index d503452022..b27cb95ca4 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Input.java
@@ -8,6 +8,7 @@ import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.extensions.ArrayExt;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import net.minecraft.entity.player.EntityPlayer;
@@ -125,6 +126,7 @@ public class GT_MetaTileEntity_SuperBus_Input extends GT_MetaTileEntity_Hatch_In
"Item Input for Multiblocks",
"This bus has no GUI, but can have items extracted",
""+getSlots(this.mTier)+" Slots",
+ CORE.GT_Tooltip
};
return aDesc;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java
index 66bfbea8b1..37aa57298a 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_SuperBus_Output.java
@@ -6,6 +6,7 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.extensions.ArrayExt;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import net.minecraft.entity.player.EntityPlayer;
@@ -93,6 +94,7 @@ public class GT_MetaTileEntity_SuperBus_Output extends GT_MetaTileEntity_Hatch_O
"Item Output for Multiblocks",
"This bus has no GUI",
""+getSlots(this.mTier)+" Slots",
+ CORE.GT_Tooltip
};
return aDesc;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java
index e0ff04763d..124f8695f5 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GT_MetaTileEntity_Hatch_CustomFluidBase.java
@@ -2,6 +2,7 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.FluidUtils;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
@@ -114,7 +115,8 @@ public class GT_MetaTileEntity_Hatch_CustomFluidBase extends GT_MetaTileEntity_H
String[] s2 = new String[]{
"Fluid Input for "+(isSteam ? "Steam " : "")+"Multiblocks",
"Capacity: " + getCapacity()+"L",
- aFluidName
+ aFluidName,
+ CORE.GT_Tooltip
};
return s2;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java
index ccf31673e7..768a57f8b2 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMetaTransformerHiAmp.java
@@ -85,7 +85,9 @@ public class GregtechMetaTransformerHiAmp extends GT_MetaTileEntity_Transformer
@Override
public String[] getDescription() {
- return new String[] { this.mDescription, "Accepts 4A and outputs 16A"};
+ return new String[] { this.mDescription,
+ "Accepts 4A and outputs 16A",
+ CORE.GT_Tooltip};
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
index 0b8182c64a..d413ce44e4 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java
@@ -30,6 +30,7 @@ import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
+import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.preloader.CORE_Preloader;
import gtPlusPlus.preloader.asm.AsmConfig;
@@ -51,6 +52,8 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import net.minecraftforge.fluids.FluidStack;
+import net.minecraftforge.oredict.OreDictionary;
+
import org.apache.commons.lang3.ArrayUtils;
import java.lang.reflect.InvocationTargetException;
@@ -63,6 +66,10 @@ import java.util.function.Function;
import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls;
+// Glee8e - 11/12/21 - 2:15pm
+// Yeah, now I see what's wrong. Someone inherited from GregtechMeta_MultiBlockBase instead of GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_IndustrialDehydrator> as it should have been
+// so any method in GregtechMetaTileEntity_IndustrialDehydrator would see generic field declared in GregtechMeta_MultiBlockBase without generic parameter
+
public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_EnhancedMultiBlockBase<T>> extends GT_MetaTileEntity_EnhancedMultiBlockBase<T> {
public static final boolean DEBUG_DISABLE_CORES_TEMPORARILY = true;
@@ -91,14 +98,15 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
protected long mTotalRunTime = 0;
protected boolean mVoidExcess = false;
- //Control Core Hatch
public ArrayList<GT_MetaTileEntity_Hatch_ControlCore> mControlCoreBus = new ArrayList<GT_MetaTileEntity_Hatch_ControlCore>();
public ArrayList<GT_MetaTileEntity_Hatch_AirIntake> mAirIntakes = new ArrayList<GT_MetaTileEntity_Hatch_AirIntake>();
public ArrayList<GT_MetaTileEntity_Hatch_InputBattery> mChargeHatches = new ArrayList<GT_MetaTileEntity_Hatch_InputBattery>();
public ArrayList<GT_MetaTileEntity_Hatch_OutputBattery> mDischargeHatches = new ArrayList<GT_MetaTileEntity_Hatch_OutputBattery>();
+ public ArrayList<GT_MetaTileEntity_Hatch> mAllEnergyHatches = new ArrayList<GT_MetaTileEntity_Hatch>();
+ public ArrayList<GT_MetaTileEntity_Hatch> mAllDynamoHatches = new ArrayList<GT_MetaTileEntity_Hatch>();
// Custom Behaviour Map
- private static final HashMap<String, SpecialMultiBehaviour> mCustomBehviours = new HashMap<String, SpecialMultiBehaviour>();;
+ private static final HashMap<String, SpecialMultiBehaviour> mCustomBehviours = new HashMap<String, SpecialMultiBehaviour>();
public GregtechMeta_MultiBlockBase(final int aID, final String aName,
@@ -1464,6 +1472,8 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
this.mAirIntakes.clear();
this.mTecTechEnergyHatches.clear();
this.mTecTechDynamoHatches.clear();
+ this.mAllEnergyHatches.clear();
+ this.mAllDynamoHatches.clear();
}
}
@@ -1654,8 +1664,11 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
return mMaintenanceHatches.size() <= 1 && !mMufflerHatches.isEmpty();
}
- public <E> boolean addToMachineListInternal(ArrayList<E> aList, final IMetaTileEntity aTileEntity,
- final int aBaseCasingIndex) {
+ public <E> boolean addToMachineListInternal(ArrayList<E> aList, final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
+ return addToMachineListInternal(aList, getMetaTileEntity(aTileEntity), aBaseCasingIndex);
+ }
+
+ public <E> boolean addToMachineListInternal(ArrayList<E> aList, final IMetaTileEntity aTileEntity, final int aBaseCasingIndex) {
if (aTileEntity == null) {
return false;
}
@@ -1665,7 +1678,15 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
* Class <?> aHatchType = ReflectionUtils.getTypeOfGenericObject(aList); if
* (!aHatchType.isInstance(aTileEntity)) { return false; }
*/
+
+ // Try setRecipeMap
+ if (aTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
+ ((GT_MetaTileEntity_Hatch_Input) aTileEntity).mRecipeMap = getRecipeMap();
+ }
+ if (aTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) {
+ ((GT_MetaTileEntity_Hatch_InputBus) aTileEntity).mRecipeMap = getRecipeMap();
+ }
if (aList.isEmpty()) {
if (aTileEntity instanceof GT_MetaTileEntity_Hatch) {
@@ -1742,33 +1763,35 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
//mControlCoreBus
public boolean addControlCoreToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- log("Tried to add null module entity.");
- return false;
- }
if (!mControlCoreBus.isEmpty()) {
log("Tried to add a secondary control core module.");
return false;
}
-
- GT_MetaTileEntity_Hatch_ControlCore Module = (GT_MetaTileEntity_Hatch_ControlCore) aMetaTileEntity;
-
+ GT_MetaTileEntity_Hatch_ControlCore Module = (GT_MetaTileEntity_Hatch_ControlCore) getMetaTileEntity(aTileEntity);
if (Module != null) {
if (Module.setOwner(aTileEntity)) {
log("Adding control core module.");
- return addToMachineListInternal(mControlCoreBus, aMetaTileEntity, aBaseCasingIndex);
+ return addToMachineListInternal(mControlCoreBus, Module, aBaseCasingIndex);
}
}
return false;
}
- @Override
- public boolean addToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
+ private IMetaTileEntity getMetaTileEntity(final IGregTechTileEntity aTileEntity) {
if (aTileEntity == null) {
- return false;
+ return null;
}
final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ return aMetaTileEntity;
+ }
+
+
+ @Override
+ public boolean addToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
+ return addToMachineList(getMetaTileEntity(aTileEntity), aBaseCasingIndex);
+ }
+
+ public boolean addToMachineList(final IMetaTileEntity aMetaTileEntity, final int aBaseCasingIndex) {
if (aMetaTileEntity == null) {
return false;
}
@@ -1776,10 +1799,14 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
//Use this to determine the correct value, then update the hatch texture after.
boolean aDidAdd = false;
- //Handle Custom Hustoms
+ //Handle Custom Hatches
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_ControlCore) {
log("Found GT_MetaTileEntity_Hatch_ControlCore");
- aDidAdd = addControlCoreToMachineList(aTileEntity, aBaseCasingIndex);
+ if (!mControlCoreBus.isEmpty()) {
+ log("Tried to add a secondary control core module.");
+ return false;
+ }
+ aDidAdd = addToMachineListInternal(this.mControlCoreBus, aMetaTileEntity, aBaseCasingIndex);
}
else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBattery) {
log("Found GT_MetaTileEntity_Hatch_InputBattery");
@@ -1789,17 +1816,22 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
log("Found GT_MetaTileEntity_Hatch_OutputBattery");
aDidAdd = addToMachineListInternal(mDischargeHatches, aMetaTileEntity, aBaseCasingIndex);
}
+ else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_AirIntake) {
+ aDidAdd = addToMachineListInternal(mAirIntakes, aMetaTileEntity, aBaseCasingIndex);
+ }
//Handle TT Multi-A Energy Hatches
else if (LoadedMods.TecTech && isThisHatchMultiEnergy(aMetaTileEntity)) {
log("Found isThisHatchMultiEnergy");
aDidAdd = addToMachineListInternal(mTecTechEnergyHatches, aMetaTileEntity, aBaseCasingIndex);
+ updateMasterEnergyHatchList(aMetaTileEntity);
}
//Handle TT Multi-A Dynamos
else if (LoadedMods.TecTech && isThisHatchMultiDynamo(aMetaTileEntity)) {
log("Found isThisHatchMultiDynamo");
aDidAdd = addToMachineListInternal(mTecTechDynamoHatches, aMetaTileEntity, aBaseCasingIndex);
+ updateMasterDynamoHatchList(aMetaTileEntity);
}
//Handle Fluid Hatches using seperate logic
@@ -1813,10 +1845,14 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
aDidAdd = addToMachineListInternal(mInputBusses, aMetaTileEntity, aBaseCasingIndex);
else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus)
aDidAdd = addToMachineListInternal(mOutputBusses, aMetaTileEntity, aBaseCasingIndex);
- else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy)
+ else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) {
aDidAdd = addToMachineListInternal(mEnergyHatches, aMetaTileEntity, aBaseCasingIndex);
- else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo)
+ updateMasterEnergyHatchList(aMetaTileEntity);
+ }
+ else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) {
aDidAdd = addToMachineListInternal(mDynamoHatches, aMetaTileEntity, aBaseCasingIndex);
+ updateMasterDynamoHatchList(aMetaTileEntity);
+ }
else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance)
aDidAdd = addToMachineListInternal(mMaintenanceHatches, aMetaTileEntity, aBaseCasingIndex);
else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler)
@@ -1830,57 +1866,54 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
@Override
public boolean addMaintenanceToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- return addToMachineList(aTileEntity, aBaseCasingIndex);
+ IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance) {
+ return addToMachineList(aMetaTileEntity, aBaseCasingIndex);
+ }
+ return false;
}
@Override
public boolean addMufflerToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- return addToMachineList(aTileEntity, aBaseCasingIndex);
+ IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
+ return addToMachineList(aMetaTileEntity, aBaseCasingIndex);
+ }
+ return false;
}
@Override
public boolean addInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- return addToMachineList(aTileEntity, aBaseCasingIndex);
+ IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input || aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) {
+ return addToMachineList(aMetaTileEntity, aBaseCasingIndex);
+ }
+ return false;
}
@Override
public boolean addOutputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- return addToMachineList(aTileEntity, aBaseCasingIndex);
+ IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output || aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
+ return addToMachineList(aMetaTileEntity, aBaseCasingIndex);
+ }
+ return false;
}
- public boolean addAirIntakeToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
+ public boolean addAirIntakeToMachineList(final IGregTechTileEntity aMetaTileEntity, final int aBaseCasingIndex) {
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_AirIntake) {
- this.mAirIntakes.add((GT_MetaTileEntity_Hatch_AirIntake)aMetaTileEntity);
+ return addToMachineList(aMetaTileEntity, aBaseCasingIndex);
}
- return addToMachineList(aTileEntity, aBaseCasingIndex);
+ return false;
}
public boolean addFluidInputToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
- return addFluidInputToMachineList(aMetaTileEntity, aBaseCasingIndex);
+ return addFluidInputToMachineList(getMetaTileEntity(aTileEntity), aBaseCasingIndex);
}
- public boolean addFluidInputToMachineList(final IMetaTileEntity aTileEntity, final int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity;
+ public boolean addFluidInputToMachineList(final IMetaTileEntity aMetaTileEntity, final int aBaseCasingIndex) {
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mRecipeMap = this.getRecipeMap();
- return addToMachineListInternal(mInputHatches, aMetaTileEntity, aBaseCasingIndex);
+ return addToMachineList(aMetaTileEntity, aBaseCasingIndex);
}
return false;
}
@@ -1909,10 +1942,7 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
}
public boolean resetRecipeMapForHatch(IGregTechTileEntity aTileEntity, GT_Recipe_Map aMap) {
try {
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ final IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity);
if (aMetaTileEntity == null) {
return false;
}
@@ -1982,11 +2012,7 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
*/
public boolean updateTexture(final IGregTechTileEntity aTileEntity, int aCasingID){
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- return false;
- }
- return updateTexture(aMetaTileEntity, aCasingID);
+ return updateTexture(getMetaTileEntity(aTileEntity), aCasingID);
}
/**
@@ -2071,22 +2097,21 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
*/
public boolean addMultiAmpDynamoToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex){
- //GT_MetaTileEntity_Hatch_DynamoMulti
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ final IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity);
if (aMetaTileEntity == null) {
return false;
}
if (isThisHatchMultiDynamo(aTileEntity)) {
- updateTexture(aTileEntity, aBaseCasingIndex);
- return this.mTecTechDynamoHatches.add((GT_MetaTileEntity_Hatch) aMetaTileEntity);
+ return addToMachineListInternal(mTecTechDynamoHatches, aMetaTileEntity, aBaseCasingIndex);
}
return false;
}
- public boolean isThisHatchMultiDynamo(Object aMetaTileEntity){
+ public boolean isThisHatchMultiDynamo(IGregTechTileEntity aTileEntity){
+ return isThisHatchMultiDynamo(getMetaTileEntity(aTileEntity));
+ }
+
+ public boolean isThisHatchMultiDynamo(IMetaTileEntity aMetaTileEntity){
Class<?> mDynamoClass;
mDynamoClass = ReflectionUtils.getClass("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_DynamoMulti");
if (mDynamoClass != null){
@@ -2099,13 +2124,22 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
@Override
public boolean addDynamoToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (LoadedMods.TecTech){
- if (isThisHatchMultiDynamo(aTileEntity)) {
- return addMultiAmpDynamoToMachineList(aTileEntity, aBaseCasingIndex);
- }
-
+ IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo || isThisHatchMultiDynamo(aMetaTileEntity)) {
+ return addToMachineList(aMetaTileEntity, aBaseCasingIndex);
}
- return addToMachineList(aTileEntity, aBaseCasingIndex);
+ return false;
+ }
+
+ private boolean updateMasterDynamoHatchList(IMetaTileEntity aMetaTileEntity) {
+ if (aMetaTileEntity == null) {
+ return false;
+ }
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) {
+ GT_MetaTileEntity_Hatch aHatch = (GT_MetaTileEntity_Hatch) aMetaTileEntity;
+ return mAllDynamoHatches.add(aHatch);
+ }
+ return false;
}
@@ -2117,22 +2151,21 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
*/
public boolean addMultiAmpEnergyToMachineList(final IGregTechTileEntity aTileEntity, final int aBaseCasingIndex){
- //GT_MetaTileEntity_Hatch_DynamoMulti
- if (aTileEntity == null) {
- return false;
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ final IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity);
if (aMetaTileEntity == null) {
return false;
}
- if (isThisHatchMultiEnergy(aTileEntity)) {
- updateTexture(aTileEntity, aBaseCasingIndex);
- return this.mTecTechEnergyHatches.add((GT_MetaTileEntity_Hatch) aMetaTileEntity);
+ if (isThisHatchMultiEnergy(aMetaTileEntity)) {
+ return addToMachineListInternal(mTecTechEnergyHatches, aMetaTileEntity, aBaseCasingIndex);
}
return false;
+ }
+
+ public boolean isThisHatchMultiEnergy(IGregTechTileEntity aTileEntity){
+ return isThisHatchMultiEnergy(getMetaTileEntity(aTileEntity));
}
- public boolean isThisHatchMultiEnergy(Object aMetaTileEntity){
+ public boolean isThisHatchMultiEnergy(IMetaTileEntity aMetaTileEntity){
Class<?> mDynamoClass;
mDynamoClass = ReflectionUtils.getClass("com.github.technus.tectech.thing.metaTileEntity.hatch.GT_MetaTileEntity_Hatch_EnergyMulti");
if (mDynamoClass != null){
@@ -2145,13 +2178,22 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
@Override
public boolean addEnergyInputToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (LoadedMods.TecTech){
- if (isThisHatchMultiEnergy(aTileEntity)) {
- return addMultiAmpEnergyToMachineList(aTileEntity, aBaseCasingIndex);
- }
-
+ IMetaTileEntity aMetaTileEntity = getMetaTileEntity(aTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy || isThisHatchMultiEnergy(aMetaTileEntity)) {
+ return addToMachineList(aMetaTileEntity, aBaseCasingIndex);
}
- return super.addEnergyInputToMachineList(aTileEntity, aBaseCasingIndex);
+ return false;
+ }
+
+ private boolean updateMasterEnergyHatchList(IMetaTileEntity aMetaTileEntity) {
+ if (aMetaTileEntity == null) {
+ return false;
+ }
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch) {
+ GT_MetaTileEntity_Hatch aHatch = (GT_MetaTileEntity_Hatch) aMetaTileEntity;
+ return mAllEnergyHatches.add(aHatch);
+ }
+ return false;
}
@@ -2388,20 +2430,43 @@ public abstract class GregtechMeta_MultiBlockBase<T extends GT_MetaTileEntity_En
@Override
public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, byte aSide, float aX,
float aY, float aZ) {
- //Do Super
- boolean aSuper = super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ);
// Do Things
if (this.getBaseMetaTileEntity().isServerSide()) {
+ //Logger.INFO("Right Clicked Controller.");
ItemStack tCurrentItem = aPlayer.inventory.getCurrentItem();
- if (tCurrentItem != null) {
- if (GT_Utility.isStackInList(tCurrentItem, GregTech_API.sSoftHammerList)) {
-
- }
+ if (tCurrentItem != null) {
+ //Logger.INFO("Holding Item.");
+ if (tCurrentItem.getItem() instanceof GT_MetaGenerated_Tool) {
+ //Logger.INFO("Is GT_MetaGenerated_Tool.");
+ int[] aOreID = OreDictionary.getOreIDs(tCurrentItem);
+ for (int id : aOreID) {
+ // Plunger
+ if (OreDictionary.getOreName(id).equals("craftingToolPlunger")) {
+ //Logger.INFO("Is Plunger.");
+ return onPlungerRightClick(aPlayer, aSide, aX, aY, aZ);
+ }
+ }
+ }
}
}
+ //Do Super
+ boolean aSuper = super.onRightclick(aBaseMetaTileEntity, aPlayer, aSide, aX, aY, aZ);
return aSuper;
}
+ public boolean onPlungerRightClick(EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) {
+ int aHatchIndex = 0;
+ PlayerUtils.messagePlayer(aPlayer, "Trying to clear "+mOutputHatches.size()+" output hatches.");
+ for (GT_MetaTileEntity_Hatch_Output hatch : this.mOutputHatches) {
+ if (hatch.mFluid != null) {
+ PlayerUtils.messagePlayer(aPlayer, "Clearing "+hatch.mFluid.amount+"L of "+hatch.mFluid.getLocalizedName()+" from hatch "+aHatchIndex+".");
+ hatch.mFluid = null;
+ }
+ aHatchIndex++;
+ }
+ return aHatchIndex > 0;
+ }
+
@Override
public boolean onSolderingToolRightClick(byte aSide, byte aWrenchingSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
boolean tSuper = super.onSolderingToolRightClick(aSide, aWrenchingSide, aPlayer, aX, aY, aZ);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java
index 36e68f6438..21b0efff99 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_SteamMultiBase.java
@@ -290,18 +290,18 @@ public abstract class GregtechMeta_SteamMultiBase extends GregtechMeta_MultiBloc
}
//Use this to determine the correct value, then update the hatch texture after.
- boolean aDidAdd = false;
+ boolean aDidAdd = false;
- //Handle Custom Hustoms
-
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_CustomFluidBase)
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_CustomFluidBase) {
aDidAdd = addToMachineListInternal(mSteamInputFluids, aMetaTileEntity, aBaseCasingIndex);
-
- else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusInput)
- aDidAdd = addToMachineListInternal(mSteamInputs, aMetaTileEntity, aBaseCasingIndex);
-
- else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusOutput)
+ }
+ else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusInput) {
+ ((GT_MetaTileEntity_Hatch_InputBus) aTileEntity).mRecipeMap = getRecipeMap();
+ aDidAdd = addToMachineListInternal(mSteamInputs, aMetaTileEntity, aBaseCasingIndex);
+ }
+ else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusOutput) {
aDidAdd = addToMachineListInternal(mSteamOutputs, aMetaTileEntity, aBaseCasingIndex);
+ }
return aDidAdd;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java
index 885069693d..f9105dceb1 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/generators/GregtechRocketFuelGeneratorBase.java
@@ -12,7 +12,6 @@ import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.lib.CORE;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils;
import net.minecraft.entity.player.EntityPlayer;
@@ -63,16 +62,16 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_
@Override
public String[] getDescription() {
- int pollMin = mTier == 4 ? 250 : (mTier == 5 ? 500 : 750);
- int pollMax = mTier == 4 ? 2000 : (mTier == 5 ? 4000 : 6000);
- String aPollution = "Causes between "+pollMin+" and "+pollMax+ " Pollution per second";
- return new String[]{
- this.mDescription,
- "Fuel Efficiency: " + this.getEfficiency() + "%",
- aPollution};
+ String aPollution = "Causes between "+pollMin+" and "+pollMax+ " Pollution per second";
+ return new String[]{
+ this.mDescription,
+ "Fuel Efficiency: " + this.getEfficiency() + "%",
+ aPollution,
+ CORE.GT_Tooltip};
}
+
@Override
public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
if (aBaseMetaTileEntity.isClientSide()) {
@@ -199,8 +198,8 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_
@Override
public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
-
-
+
+
//super.onPostTick(aBaseMetaTileEntity, aTick);
/*if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && aTick % 10L == 0L) {
@@ -251,9 +250,9 @@ public abstract class GregtechRocketFuelGeneratorBase extends GT_MetaTileEntity_
.getUniversalEnergyStored() >= this.maxEUOutput() + this.getMinimumStoredEU());
}*/
-
-
-
+
+
+
if (aBaseMetaTileEntity.isServerSide() && aBaseMetaTileEntity.isAllowedToWork() && ((aTick % 10) == 0)) {
if (this.mFluid == null) {
if (aBaseMetaTileEntity.getUniversalEnergyStored() < (this.maxEUOutput() + this.getMinimumStoredEU())) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_Catalysts.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_Catalysts.java
index ea74e650dd..5e0918059d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_Catalysts.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_Catalysts.java
@@ -3,6 +3,7 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers;
import gregtech.api.interfaces.ITexture;
import gregtech.api.objects.GT_RenderedTexture;
import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.item.ItemStack;
@@ -30,6 +31,13 @@ public class GT_MetaTileEntity_Hatch_Catalysts extends GT_MetaTileEntity_Hatch_N
public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Bus_Catalyst)};
}
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{
+ this.mDescription,
+ CORE.GT_Tooltip};
+ }
@Override
public boolean isFacingValid(byte aFacing) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_MillingBalls.java b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_MillingBalls.java
index 6c28ab2e27..7514855a2c 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_MillingBalls.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/nbthandlers/GT_MetaTileEntity_Hatch_MillingBalls.java
@@ -3,6 +3,7 @@ package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers;
import gregtech.api.interfaces.ITexture;
import gregtech.api.objects.GT_RenderedTexture;
import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.item.ItemStack;
@@ -30,6 +31,13 @@ public class GT_MetaTileEntity_Hatch_MillingBalls extends GT_MetaTileEntity_Hatc
public ITexture[] getTexturesInactive(ITexture aBaseTexture) {
return new ITexture[]{aBaseTexture, new GT_RenderedTexture(TexturesGtBlock.Overlay_Bus_Milling_Balls)};
}
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{
+ this.mDescription,
+ CORE.GT_Tooltip};
+ }
@Override
public boolean isFacingValid(byte aFacing) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java
index 832ee2b56e..c594ee0e5d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks5.java
@@ -18,7 +18,7 @@ import net.minecraft.world.IBlockAccess;
public class GregtechMetaCasingBlocks5
extends GregtechMetaCasingBlocksAbstract {
- //84, 90, 91, 92, 94, 114, 116, 117, 118, 119, 120, 121, 124, 125, 126, 127
+ //Free Indexes within TAE: 90, 91, 92, 94, 114, 116, 117, 118, 119, 120, 121, 124, 125, 126, 127
private static final TexturesGrinderMultiblock mGrinderOverlayHandler = new TexturesGrinderMultiblock();
public GregtechMetaCasingBlocks5() {
@@ -29,7 +29,8 @@ extends GregtechMetaCasingBlocksAbstract {
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".2.name", "IsaMill Gearbox"); // IsaMill Gearbox
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".3.name", "Elemental Confinement Shell"); // Duplicator Casing
TAE.registerTexture(0, 3, new GT_CopiedBlockTexture(this, 6, 3));
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", ""); // Unused
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".4.name", "Sparge Tower Exterior Casing"); // Sparge Tower Casing
+ TAE.registerTexture(0, 4, new GT_CopiedBlockTexture(this, 6, 4));
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".5.name", ""); // Unused
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".6.name", ""); // Unused
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", ""); // Unused
@@ -45,7 +46,8 @@ extends GregtechMetaCasingBlocksAbstract {
GregtechItemList.Casing_IsaMill_Casing.set(new ItemStack(this, 1, 0));
GregtechItemList.Casing_IsaMill_Pipe.set(new ItemStack(this, 1, 1));
GregtechItemList.Casing_IsaMill_Gearbox.set(new ItemStack(this, 1, 2));
- GregtechItemList.Casing_ElementalDuplicator.set(new ItemStack(this, 1, 2));
+ GregtechItemList.Casing_ElementalDuplicator.set(new ItemStack(this, 1, 3));
+ GregtechItemList.Casing_Sparge_Tower_Exterior.set(new ItemStack(this, 1, 4));
}
@Override
@@ -65,6 +67,8 @@ extends GregtechMetaCasingBlocksAbstract {
return TexturesGtBlock.TEXTURE_GEARBOX_GRINDING_MILL.getIcon();
case 3:
return TexturesGtBlock.TEXTURE_TECH_PANEL_D.getIcon();
+ case 4:
+ return TexturesGtBlock.Casing_Machine_Metal_Sheet_H.getIcon();
}
}
return Textures.BlockIcons.RENDERING_ERROR.getIcon();
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java
index a4a396e4cf..5a5c923d10 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaSpecialMultiCasings.java
@@ -64,7 +64,8 @@ public class GregtechMetaSpecialMultiCasings extends GregtechMetaCasingBlocksAbs
GregtechItemList.Casing_SolarTower_Structural.set(new ItemStack(this, 1, 6));
GregtechItemList.Casing_SolarTower_SaltContainment.set(new ItemStack(this, 1, 7));
GregtechItemList.Casing_SolarTower_HeatContainment.set(new ItemStack(this, 1, 8));
- GregtechItemList.Casing_Reinforced_Engine_Casing.set(new ItemStack(this, 1, 9));
+ GregtechItemList.Casing_Flotation_Cell.set(new ItemStack(this, 1, 9));
+ GregtechItemList.Casing_Reinforced_Engine_Casing.set(new ItemStack(this, 1, 10));
}
public IIcon getIcon(int aSide, int aMeta) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
index d4221f064a..518ffe0eae 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
@@ -276,6 +276,26 @@ public class TexturesGtBlock {
public static final CustomIcon Casing_Machine_Metal_Sheet_A = Internal_Casing_Machine_Metal_Sheet_A;
private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_B = new CustomIcon("chrono/MetalSheet2");
public static final CustomIcon Casing_Machine_Metal_Sheet_B = Internal_Casing_Machine_Metal_Sheet_B;
+ private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_C = new CustomIcon("chrono/MetalSheet3");
+ public static final CustomIcon Casing_Machine_Metal_Sheet_C = Internal_Casing_Machine_Metal_Sheet_C;
+ private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_D = new CustomIcon("chrono/MetalSheet4");
+ public static final CustomIcon Casing_Machine_Metal_Sheet_D = Internal_Casing_Machine_Metal_Sheet_D;
+ private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_E = new CustomIcon("chrono/MetalSheet5");
+ public static final CustomIcon Casing_Machine_Metal_Sheet_E = Internal_Casing_Machine_Metal_Sheet_E;
+ private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_F = new CustomIcon("chrono/MetalSheet6");
+ public static final CustomIcon Casing_Machine_Metal_Sheet_F = Internal_Casing_Machine_Metal_Sheet_F;
+ private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_G = new CustomIcon("chrono/MetalSheet7");
+ public static final CustomIcon Casing_Machine_Metal_Sheet_G = Internal_Casing_Machine_Metal_Sheet_G;
+ private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_H = new CustomIcon("chrono/MetalSheet8");
+ public static final CustomIcon Casing_Machine_Metal_Sheet_H = Internal_Casing_Machine_Metal_Sheet_H;
+ private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_I = new CustomIcon("chrono/MetalSheet9");
+ public static final CustomIcon Casing_Machine_Metal_Sheet_I = Internal_Casing_Machine_Metal_Sheet_I;
+ private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_J = new CustomIcon("chrono/MetalSheet10");
+ public static final CustomIcon Casing_Machine_Metal_Sheet_J = Internal_Casing_Machine_Metal_Sheet_J;
+ private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_K = new CustomIcon("chrono/MetalSheet11");
+ public static final CustomIcon Casing_Machine_Metal_Sheet_K = Internal_Casing_Machine_Metal_Sheet_K;
+ private static final CustomIcon Internal_Casing_Machine_Metal_Sheet_L = new CustomIcon("chrono/MetalSheet12");
+ public static final CustomIcon Casing_Machine_Metal_Sheet_L = Internal_Casing_Machine_Metal_Sheet_L;
private static final CustomIcon Internal_Overlay_Machine_Cyber_A = new CustomIcon("chrono/CyberPanel");
public static final CustomIcon Overlay_Machine_Cyber_A = Internal_Overlay_Machine_Cyber_A;
private static final CustomIcon Internal_Overlay_Machine_Cyber_B = new CustomIcon("chrono/CyberPanel2");
@@ -477,6 +497,21 @@ public class TexturesGtBlock {
public static final CustomIcon TEXTURE_TECH_PANEL_RADIOACTIVE = new CustomIcon("TileEntities/DecayablesChest_bottom");
public static final CustomIcon TEXTURE_TECH_PANEL_RADIOACTIVE_ALT = new CustomIcon("TileEntities/DecayablesChest_top");
+
+ // LFTR Single blocks
+ public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_FRONT = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_FRONT");
+ public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_FRONT_ACTIVE = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_FRONT_ACTIVE");
+ public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_SIDE = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_SIDE");
+ public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_SIDE_ACTIVE = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_SIDE_ACTIVE");
+ public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_TOP = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_TOP");
+ public static final CustomIcon OVERLAY_REACTOR_COLDTRAP_TOP_ACTIVE = new CustomIcon("TileEntities/ReactorColdTrap/OVERLAY_TOP_ACTIVE");
+
+ public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_FRONT = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_FRONT");
+ public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_FRONT_ACTIVE = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_FRONT_ACTIVE");
+ public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_SIDE = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_SIDE");
+ public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_SIDE_ACTIVE = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_SIDE_ACTIVE");
+ public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_TOP = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_TOP");
+ public static final CustomIcon OVERLAY_REACTOR_PROCESSINGUNIT_TOP_ACTIVE = new CustomIcon("TileEntities/ReactorProcessingUnit/OVERLAY_TOP_ACTIVE");
//Overlay Arrays
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/VolumetricFlaskHelper.java b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/VolumetricFlaskHelper.java
index 84bb52d064..575e094696 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/VolumetricFlaskHelper.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/helpers/VolumetricFlaskHelper.java
@@ -152,6 +152,26 @@ public class VolumetricFlaskHelper {
nbt.setInteger("Capacity", aCapacity);
return true;
}
+
+ public static int fillFlask(ItemStack stack, FluidStack resource, boolean doFill) {
+ if (stack.stackSize != 1)
+ return 0;
+ if ((resource == null) || (resource.amount <= 0)) {
+ return 0;
+ }
+ FluidStack fluidStack = getFlaskFluid(stack);
+ if (fluidStack == null) {
+ fluidStack = new FluidStack(resource, 0);
+ } else if (!fluidStack.isFluidEqual(resource)) {
+ return 0;
+ }
+ int amount = Math.min(getMaxFlaskCapacity(stack) - fluidStack.amount, resource.amount);
+ if ((doFill) && (amount > 0)) {
+ fluidStack.amount += amount;
+ setFluid(stack, fluidStack);
+ }
+ return amount;
+ }
public static Item generateNewFlask(String unlocalized, String english, int maxCapacity) {
Constructor aFlask = ReflectionUtils.getConstructor(sClassVolumetricFlask, new Class[] {String.class, String.class, int.class});
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
index bc11cb6a11..14100d1599 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechTools.java
@@ -10,7 +10,7 @@ import gregtech.api.objects.GT_HashSet;
import gregtech.api.objects.GT_ItemStack;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechToolDictNames;
-import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_AngelGrinder;
+import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_AngleGrinder;
import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_Choocher;
import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_ElectricButcherKnife;
import gtPlusPlus.xmod.gregtech.common.tools.TOOL_Gregtech_ElectricLighter;
@@ -47,7 +47,7 @@ public class MetaGeneratedGregtechTools extends GT_MetaGenerated_Tool {
// Electric File
this.addTool(ANGLE_GRINDER, "Angle Grinder", "Hand-held electric filing device",
- new TOOL_Gregtech_AngelGrinder(),
+ new TOOL_Gregtech_AngleGrinder(),
new Object[] { GregtechToolDictNames.craftingToolAngleGrinder, ToolDictNames.craftingToolFile,
new TC_Aspects.TC_AspectStack(TC_Aspects.INSTRUMENTUM, 2L),
new TC_Aspects.TC_AspectStack(TC_Aspects.FABRICO, 2L),
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java
index c97723b042..9c856840b0 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractGenerator.java
@@ -629,7 +629,8 @@ public class GT_MetaTileEntity_TesseractGenerator extends GT_MetaTileEntity_Basi
"Generates a Tesseract for the attached Inventory",
"Connect with pipes to insert items",
"Consumes "+TESSERACT_ENERGY_COST+"EU/t for same dimension transfers",
- "Consumes "+TESSERACT_ENERGY_COST_DIMENSIONAL+"EU/t for cross dimensional transfers", };
+ "Consumes "+TESSERACT_ENERGY_COST_DIMENSIONAL+"EU/t for cross dimensional transfers",
+ CORE.GT_Tooltip};
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java
index ed8b2db41f..088a596410 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/automation/GT_MetaTileEntity_TesseractTerminal.java
@@ -498,7 +498,8 @@ public class GT_MetaTileEntity_TesseractTerminal extends GT_MetaTileEntity_Basic
"Connect with pipes to extract items or fluids",
"Outputs from the back face",
"Consumes "+TESSERACT_ENERGY_COST+"EU/t for same dimension transfers",
- "Consumes "+TESSERACT_ENERGY_COST_DIMENSIONAL+"EU/t for cross dimensional transfers", };
+ "Consumes "+TESSERACT_ENERGY_COST_DIMENSIONAL+"EU/t for cross dimensional transfers",
+ CORE.GT_Tooltip};
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java
index b38cff5e19..4173489be6 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Base.java
@@ -46,7 +46,8 @@ public class GT_MetaTileEntity_Boiler_Base extends GT_MetaTileEntity_Boiler {
"Produces " + getPollution() + " pollution/sec",
"Consumes fuel only when temperature is less than 100C",
"Fuel with burn time greater than 500 is more efficient.",
- "Doesn't explode if there's no water"
+ "Doesn't explode if there's no water",
+ CORE.GT_Tooltip
};
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java
index babba5afe9..f9cf904cc2 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_Boiler_Solar.java
@@ -1,5 +1,6 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.generators;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_AdvancedBoiler;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_AdvancedBoiler;
import net.minecraft.entity.player.InventoryPlayer;
@@ -29,6 +30,14 @@ extends GT_MetaTileEntity_Boiler {
public GT_MetaTileEntity_Boiler_Solar(final String aName, final int aTier, final String aDescription, final ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
}
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{
+ this.mDescription,
+ "Produces "+(this.getPollution()*20)+" pollution/sec",
+ CORE.GT_Tooltip};
+ }
@Override
public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_RfConvertor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_RfConvertor.java
index 08356dd6ef..c6f368f0c0 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_RfConvertor.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_RfConvertor.java
@@ -54,7 +54,11 @@ public class GT_MetaTileEntity_RfConvertor extends GregtechMetaEnergyBuffer impl
@Override
public String[] getDescription() {
- return new String[] {"Use Screwdriver to change voltage", "Hold Shift while using Screwdriver to change amperage", EnumChatFormatting.DARK_AQUA+"Variable Output Voltage"};
+ return new String[] {
+ "Use Screwdriver to change voltage",
+ "Hold Shift while using Screwdriver to change amperage",
+ EnumChatFormatting.DARK_AQUA+"Variable Output Voltage",
+ CORE.GT_Tooltip};
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java
index 1ace02ce3a..d1628bdb59 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java
@@ -67,7 +67,11 @@ public class GT_MetaTileEntity_SemiFluidGenerator extends GT_MetaTileEntity_Basi
@Override
public String[] getDescription() {
- return new String[]{this.mDescription, "Produces "+(this.getPollution())+" pollution/sec", "Fuel Efficiency: "+this.getEfficiency() + "%"};
+ return new String[]{
+ this.mDescription,
+ "Produces "+(this.getPollution())+" pollution/sec",
+ "Fuel Efficiency: "+this.getEfficiency() + "%",
+ CORE.GT_Tooltip};
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java
index facba4fb57..2a0133245e 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityDoubleFuelGeneratorBase.java
@@ -14,7 +14,7 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Recipe;
-
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechRocketFuelGeneratorBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
@@ -32,6 +32,15 @@ extends GregtechRocketFuelGeneratorBase {
super(aName, aTier, aDescription, aTextures);
this.onConfigLoad();
}
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{this.mDescription,
+ "Generates power at " + this.getEfficiency() + "% Efficiency per tick",
+ "Output Voltage: "+this.getOutputTier()+" EU/t",
+ CORE.GT_Tooltip
+ };
+ }
@Override
public boolean isOutputFacing(final byte aSide) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java
index a3c882a4af..a392ae5a58 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntityGeothermalGenerator.java
@@ -38,8 +38,12 @@ extends GT_MetaTileEntity_BasicGenerator
@Override
public String[] getDescription() {
- String aPollution = "Causes "+this.getPollution()+ " Pollution per second";
- return new String[]{this.mDescription, "Generates power at " + this.getEfficiency() + "% Efficiency per tick", aPollution};
+ String aPollution = "Causes "+this.getPollution()+ " Pollution per second";
+ return new String[]{
+ this.mDescription,
+ "Generates power at " + this.getEfficiency() + "% Efficiency per tick",
+ aPollution,
+ CORE.GT_Tooltip};
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java
index 1d1c4fbfab..68dbc4fb61 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntitySolarGenerator.java
@@ -13,6 +13,7 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_SolarGenerator;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_SolarGenerator;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.generators.GregtechMetaSolarGenerator;
@@ -28,6 +29,15 @@ public class GregtechMetaTileEntitySolarGenerator extends GregtechMetaSolarGener
super(aName, aTier, aDescription, aTextures);
this.onConfigLoad();
}
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{this.mDescription,
+ "Generates power at " + this.getEfficiency() + "% Efficiency per tick",
+ "Output Voltage: "+this.getOutputTier()+" EU/t",
+ CORE.GT_Tooltip
+ };
+ }
@Override
public boolean isOutputFacing(final byte aSide) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java
index 14417cb921..ab000b98d4 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java
@@ -173,6 +173,7 @@ public class GregtechMetaTileEntity_RTG extends GT_MetaTileEntity_BasicGenerator
"RTG changes output voltage depending on fuel",
"Generates power at " + this.getEfficiency() + "% Efficiency per tick",
"Output Voltage: "+this.getOutputTier()+" EU/t",
+ CORE.GT_Tooltip
};
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_CombustionGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_CombustionGenerator.java
index b92a9ce06b..58919f0954 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_CombustionGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_CombustionGenerator.java
@@ -1,11 +1,14 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.generators.ULV;
+import static gregtech.api.enums.GT_Values.V;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.common.tileentities.generators.GT_MetaTileEntity_DieselGenerator;
+import gtPlusPlus.core.lib.CORE;
public class GT_MetaTileEntity_ULV_CombustionGenerator extends GT_MetaTileEntity_DieselGenerator {
public GT_MetaTileEntity_ULV_CombustionGenerator(int aID, String aName, String aNameRegional, int aTier) {
@@ -15,8 +18,22 @@ public class GT_MetaTileEntity_ULV_CombustionGenerator extends GT_MetaTileEntity
public GT_MetaTileEntity_ULV_CombustionGenerator(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
}
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{
+ this.mDescription,
+ "Produces "+(this.getPollution()*20)+" pollution/sec",
+ "Fuel Efficiency: "+this.getEfficiency() + "%",
+ CORE.GT_Tooltip};
+ }
@Override
+ public long maxEUStore() {
+ return Math.max(getEUVar(), V[1] * 80L + getMinimumStoredEU());
+ }
+
+ @Override
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_ULV_CombustionGenerator(this.mName, this.mTier, this.mDescription, this.mTextures);
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_GasTurbine.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_GasTurbine.java
index c53436b059..17bb4463c4 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_GasTurbine.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_GasTurbine.java
@@ -1,5 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.generators.ULV;
+import static gregtech.api.enums.GT_Values.V;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
import gregtech.api.interfaces.IIconContainer;
@@ -8,7 +10,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.common.tileentities.generators.GT_MetaTileEntity_GasTurbine;
-
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
public class GT_MetaTileEntity_ULV_GasTurbine extends GT_MetaTileEntity_GasTurbine {
@@ -19,6 +21,20 @@ public class GT_MetaTileEntity_ULV_GasTurbine extends GT_MetaTileEntity_GasTurbi
public GT_MetaTileEntity_ULV_GasTurbine(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
}
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{
+ this.mDescription,
+ "Produces "+(this.getPollution()*20)+" pollution/sec",
+ "Fuel Efficiency: "+this.getEfficiency() + "%",
+ CORE.GT_Tooltip};
+ }
+
+ @Override
+ public long maxEUStore() {
+ return Math.max(getEUVar(), V[1] * 80L + getMinimumStoredEU());
+ }
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_ULV_GasTurbine(this.mName, this.mTier, this.mDescription, this.mTextures);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_SteamTurbine.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_SteamTurbine.java
index 11bdc01823..ef3310c6fc 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_SteamTurbine.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/ULV/GT_MetaTileEntity_ULV_SteamTurbine.java
@@ -1,15 +1,16 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.generators.ULV;
+import static gregtech.api.enums.GT_Values.V;
+
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
-import gregtech.api.enums.Textures;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.common.tileentities.generators.GT_MetaTileEntity_SteamTurbine;
-
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
public class GT_MetaTileEntity_ULV_SteamTurbine extends GT_MetaTileEntity_SteamTurbine {
@@ -20,7 +21,20 @@ public class GT_MetaTileEntity_ULV_SteamTurbine extends GT_MetaTileEntity_SteamT
public GT_MetaTileEntity_ULV_SteamTurbine(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
}
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{
+ this.mDescription,
+ "Produces "+(this.getPollution()*20)+" pollution/sec",
+ "Fuel Efficiency: "+this.getEfficiency() + "%",
+ CORE.GT_Tooltip};
+ }
+ @Override
+ public long maxEUStore() {
+ return Math.max(getEUVar(), V[1] * 80L + getMinimumStoredEU());
+ }
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
return new GT_MetaTileEntity_ULV_SteamTurbine(this.mName, this.mTier, this.mDescription, this.mTextures);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java
index faaabbd159..a62a5d16c8 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/creative/GregtechMetaCreativeEnergyBuffer.java
@@ -49,7 +49,11 @@ public class GregtechMetaCreativeEnergyBuffer extends GregtechMetaEnergyBuffer {
@Override
public String[] getDescription() {
- return new String[] {this.mDescription, "Use Screwdriver to change voltage", "Hold Shift while using Screwdriver to change amperage", EnumChatFormatting.GREEN+"CREATIVE MACHINE"};
+ return new String[] {this.mDescription,
+ "Use Screwdriver to change voltage",
+ "Hold Shift while using Screwdriver to change amperage",
+ EnumChatFormatting.GREEN+"CREATIVE MACHINE",
+ CORE.GT_Tooltip};
}
/*
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaCondensor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaCondensor.java
index 78b7e40f01..0f7edd062d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaCondensor.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaCondensor.java
@@ -34,7 +34,7 @@ public class GregtechMetaCondensor extends GregtechMetaBoilerBase{
@Override
public String[] getDescription() {
- return new String[]{this.mDescription, "IC2 Steam + Water = Normal Steam.", "Requires no power to run, although it's not very fast.", };
+ return new String[]{this.mDescription, "IC2 Steam + Water = Normal Steam.", "Requires no power to run, although it's not very fast.", CORE.GT_Tooltip};
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java
index 0a65db7be4..88658c399d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java
@@ -32,7 +32,12 @@ public class GregtechMetaGarbageCollector extends GregtechMetaTileEntity {
@Override
public String[] getDescription() {
- return new String[] {this.mDescription, "Can request the JVM to perform garbage collection", "Configurable to run once every 5 minute interval (5-180)", "This Machine has no recipe", "Admin Tool, Limit one per world if possible"};
+ return new String[] {this.mDescription,
+ "Can request the JVM to perform garbage collection",
+ "Configurable to run once every 5 minute interval (5-180)",
+ "This Machine has no recipe",
+ "Admin Tool, Limit one per world if possible",
+ CORE.GT_Tooltip};
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java
index 4e5c296629..5f55e080ad 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionCreator.java
@@ -39,7 +39,7 @@ public class GregtechMetaPollutionCreator extends GregtechMetaTileEntity {
@Override
public String[] getDescription() {
- return new String[] {this.mDescription, "A useful debug machine to create pollution."};
+ return new String[] {this.mDescription, "A useful debug machine to create pollution.", CORE.GT_Tooltip};
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java
index 78f60f13c9..10319f2269 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaPollutionDetector.java
@@ -43,7 +43,8 @@ public class GregtechMetaPollutionDetector extends GregtechMetaTileEntity {
public String[] getDescription() {
return new String[] {this.mDescription, "Right click to check pollution levels.",
"Configure with screwdriver to set redstone output amount.",
- "Does not use power."};
+ "Does not use power.",
+ CORE.GT_Tooltip};
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java
index 01944c6ce5..99b3faa7d4 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_BasicWasher.java
@@ -7,6 +7,7 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Recipe;
+import gtPlusPlus.core.lib.CORE;
import gregtech.api.util.GTPP_Recipe;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fluids.FluidStack;
@@ -39,7 +40,7 @@ public class GregtechMetaTileEntity_BasicWasher extends GT_MetaTileEntity_BasicM
@Override
public String[] getDescription() {
- return new String[]{this.mDescription, "Grants no byproducts, but it is fast.", };
+ return new String[]{this.mDescription, "Grants no byproducts, but it is fast.", CORE.GT_Tooltip};
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java
index 7505c721f4..c872e5c912 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ChemicalReactor.java
@@ -69,7 +69,7 @@ public class GregtechMetaTileEntity_ChemicalReactor extends GT_MetaTileEntity_Ba
@Override
public String[] getDescription() {
- return new String[]{this.mDescription, "Because why not?", };
+ return new String[]{this.mDescription, "Because why not?", CORE.GT_Tooltip};
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java
index cf9ab2b7e3..6cae58ced2 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java
@@ -55,7 +55,7 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux
public String[] getDescription() {
return new String[] { this.mDescription, "Not Very Fast, but not very big either.",
"Each side pair in/out puts to different slots.", "Top & Bottom Sides are Outputs.",
- "Front & Back are Input Plasma 1.", "Sides are Input Plasma 2." };
+ "Front & Back are Input Plasma 1.", "Sides are Input Plasma 2.", CORE.GT_Tooltip };
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorColdTrap.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorColdTrap.java
new file mode 100644
index 0000000000..85e2df42c9
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorColdTrap.java
@@ -0,0 +1,67 @@
+package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
+
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GTPP_Recipe;
+import gregtech.api.util.GT_Recipe;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+public class GregtechMetaTileEntity_ReactorColdTrap extends GT_MetaTileEntity_BasicMachine {
+
+ public GregtechMetaTileEntity_ReactorColdTrap(int aID, String aName, String aNameRegional, int aTier) {
+ super(aID, aName, aNameRegional, aTier, 1,
+ "Just like the Arctic", 2, 9, "Dehydrator.png", "",
+ new ITexture[]{
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_SIDE_ACTIVE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_SIDE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_FRONT_ACTIVE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_FRONT),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP_ACTIVE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP_ACTIVE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_COLDTRAP_TOP)
+ }
+ );
+ }
+
+ public GregtechMetaTileEntity_ReactorColdTrap(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
+ super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
+ }
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{this.mDescription, "Does not require ice cubes", CORE.GT_Tooltip};
+ }
+
+ @Override
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_ReactorColdTrap(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
+ }
+
+ @Override
+ public GT_Recipe.GT_Recipe_Map getRecipeList() {
+ return GTPP_Recipe.GTPP_Recipe_Map.sColdTrapRecipes;
+ }
+
+ @Override
+ public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack));
+ }
+
+ @Override
+ public boolean isFluidInputAllowed(FluidStack aFluid) {
+ return super.isFluidInputAllowed(aFluid);
+ }
+
+ @Override
+ public int getCapacity() {
+ return 16000 * Math.max(1, this.mTier);
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorProcessingUnit.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorProcessingUnit.java
new file mode 100644
index 0000000000..60e2ec8c0a
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_ReactorProcessingUnit.java
@@ -0,0 +1,67 @@
+package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
+
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
+import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GTPP_Recipe;
+import gregtech.api.util.GT_Recipe;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+public class GregtechMetaTileEntity_ReactorProcessingUnit extends GT_MetaTileEntity_BasicMachine {
+
+ public GregtechMetaTileEntity_ReactorProcessingUnit(int aID, String aName, String aNameRegional, int aTier) {
+ super(aID, aName, aNameRegional, aTier, 1,
+ "Processes Nuclear things", 2, 9, "Dehydrator.png", "",
+ new ITexture[]{
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_SIDE_ACTIVE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_SIDE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_FRONT_ACTIVE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_FRONT),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP_ACTIVE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP_ACTIVE),
+ new GT_RenderedTexture(TexturesGtBlock.OVERLAY_REACTOR_PROCESSINGUNIT_TOP)
+ }
+ );
+ }
+
+ public GregtechMetaTileEntity_ReactorProcessingUnit(String aName, int aTier, String aDescription, ITexture[][][] aTextures, String aGUIName, String aNEIName) {
+ super(aName, aTier, 1, aDescription, aTextures, 1, 1, aGUIName, aNEIName);
+ }
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{this.mDescription, CORE.GT_Tooltip};
+ }
+
+ @Override
+ public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_ReactorProcessingUnit(this.mName, this.mTier, this.mDescription, this.mTextures, this.mGUIName, this.mNEIName);
+ }
+
+ @Override
+ public GT_Recipe.GT_Recipe_Map getRecipeList() {
+ return GTPP_Recipe.GTPP_Recipe_Map.sReactorProcessingUnitRecipes;
+ }
+
+ @Override
+ public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
+ return (super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) && (getRecipeList().containsInput(aStack));
+ }
+
+ @Override
+ public boolean isFluidInputAllowed(FluidStack aFluid) {
+ return super.isFluidInputAllowed(aFluid);
+ }
+
+ @Override
+ public int getCapacity() {
+ return 8000 * Math.max(1, this.mTier);
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java
index 8e4b9ff79c..ffaa77a0be 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaWirelessCharger.java
@@ -48,6 +48,7 @@ public class GregtechMetaWirelessCharger extends GregtechMetaTileEntity {
"Mixed: Provides both 2A of long range and 1A per player locally.",
"Mixed mode is more conservative of power and as a result only",
"Gets half the distances each singular mode gets.",
+ CORE.GT_Tooltip
};
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java
index bdd49eb803..b8f24d6c5e 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/misc/GMTE_AmazonPackager.java
@@ -98,20 +98,15 @@ public class GMTE_AmazonPackager extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java
index 9b978d9a01..df01d01679 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialAlloySmelter.java
@@ -28,6 +28,7 @@ import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
@@ -126,7 +127,7 @@ public class GregtechMetaTileEntity_IndustrialAlloySmelter extends GregtechMeta_
.addEnergyHatch("Any Inconel Reinforced Casing", 1)
.addMaintenanceHatch("Any Inconel Reinforced Casing", 1)
.addMufflerHatch("Any Inconel Reinforced Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -178,20 +179,15 @@ public class GregtechMetaTileEntity_IndustrialAlloySmelter extends GregtechMeta_
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java
index f51e8b3ee2..35a92d5be3 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialArcFurnace.java
@@ -85,7 +85,7 @@ extends GregtechMeta_MultiBlockBase {
.addEnergyHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -143,26 +143,19 @@ extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java
index 8ffdbc7efe..8802a7148b 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java
@@ -83,7 +83,7 @@ extends GregtechMeta_MultiBlockBase {
.addEnergyHatch("Any Casing except front", 1)
.addMaintenanceHatch("Any Casing except front", 1)
.addMufflerHatch("Any Casing except front", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -132,26 +132,19 @@ extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java
index d1c766968f..21caf135b1 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCokeOven.java
@@ -72,7 +72,7 @@ extends GregtechMeta_MultiBlockBase {
.addEnergyHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -146,26 +146,19 @@ extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java
index 6c025a1177..bf5f8aaeaf 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCuttingMachine.java
@@ -71,7 +71,7 @@ extends GregtechMeta_MultiBlockBase {
.addEnergyHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -120,23 +120,17 @@ extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java
index 9786cf8ea6..44552ea2f7 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java
@@ -28,6 +28,7 @@ import gregtech.api.util.GT_Utility;
import gregtech.api.util.GTPP_Recipe;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
@@ -89,7 +90,7 @@ public class GregtechMetaTileEntity_IndustrialDehydrator extends GregtechMeta_Mu
.addEnergyHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -147,26 +148,19 @@ public class GregtechMetaTileEntity_IndustrialDehydrator extends GregtechMeta_Mu
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java
index ebeeb93658..f6613980ca 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialElectrolyzer.java
@@ -66,7 +66,7 @@ extends GregtechMeta_MultiBlockBase {
.addEnergyHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -115,26 +115,19 @@ extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java
index 600004a882..a5c7f62578 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialExtruder.java
@@ -72,7 +72,7 @@ extends GregtechMeta_MultiBlockBase {
.addEnergyHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Back Center", 2)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -127,20 +127,15 @@ extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java
index 73c1587f4f..b6e072b653 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMacerator.java
@@ -67,7 +67,7 @@ extends GregtechMeta_MultiBlockBase {
.addMaintenanceHatch("Bottom Casing", 1)
.addOutputBus("One per layer except bottom layer", 2)
.addMufflerHatch("Any Casing", 2)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -148,14 +148,11 @@ extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
@@ -167,11 +164,9 @@ extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java
index 312a982a11..5e405d426d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMixer.java
@@ -89,7 +89,7 @@ extends GregtechMeta_MultiBlockBase {
.addEnergyHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -145,26 +145,19 @@ extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java
index 232c6ab89f..a0909a4fff 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialMultiMachine.java
@@ -23,6 +23,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.objects.GT_RenderedTexture;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
@@ -109,7 +110,7 @@ extends GregtechMeta_MultiBlockBase {
.addEnergyHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -158,26 +159,19 @@ extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java
index 02c123c926..007d1a0d0f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialPlatePress.java
@@ -72,7 +72,7 @@ public class GregtechMetaTileEntity_IndustrialPlatePress extends GregtechMeta_Mu
.addEnergyHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -121,20 +121,15 @@ public class GregtechMetaTileEntity_IndustrialPlatePress extends GregtechMeta_Mu
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java
index e98ea7b3c7..c5450fec5b 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java
@@ -67,7 +67,7 @@ extends GregtechMeta_MultiBlockBase {
.addEnergyHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -122,20 +122,15 @@ extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java
index 5f420a3e9e..01b887694a 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialThermalCentrifuge.java
@@ -66,7 +66,7 @@ extends GregtechMeta_MultiBlockBase {
.addEnergyHatch("Bottom Casing", 1)
.addMaintenanceHatch("Bottom Casing", 1)
.addMufflerHatch("Bottom Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -137,20 +137,15 @@ extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java
index f4ab3207eb..1f63995651 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialVacuumFreezer.java
@@ -99,7 +99,7 @@ public class GregtechMetaTileEntity_IndustrialVacuumFreezer extends GregtechMeta
.addEnergyHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -149,30 +149,22 @@ public class GregtechMetaTileEntity_IndustrialVacuumFreezer extends GregtechMeta
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_CustomFluidBase && aMetaTileEntity.getBaseMetaTileEntity().getMetaTileID() == 967) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
mHaveHatch = true;
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java
index a8df92a5ab..168d4ff6d6 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWashPlant.java
@@ -80,7 +80,7 @@ extends GregtechMeta_MultiBlockBase {
.addEnergyHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -129,23 +129,17 @@ extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java
index b1ecce7670..ccce25d925 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialWireMill.java
@@ -66,7 +66,7 @@ extends GregtechMeta_MultiBlockBase {
.addEnergyHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -115,20 +115,15 @@ extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java
index cd76749283..59e6e78757 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IsaMill.java
@@ -31,6 +31,7 @@ import gtPlusPlus.api.objects.data.AutoMap;
import gtPlusPlus.api.objects.minecraft.BlockPos;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.item.chemistry.general.ItemGenericChemBase;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.EntityUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
@@ -79,16 +80,19 @@ public class GregtechMetaTileEntity_IsaMill extends GregtechMeta_MultiBlockBase
.addInfo("Grind ores.")
.addPollutionAmount(getPollutionPerSecond(null))
.addSeparator()
- .beginStructureBlock(3, 3, 4, false)
+ .beginStructureBlock(3, 3, 7, false)
.addController("Front Center")
.addCasingInfo("IsaMill Exterior Casing", 40)
- .addCasingInfo("IsaMill Gearbox", 6)
+ .addOtherStructurePart("IsaMill Gearbox", "Inner Blocks")
+ .addOtherStructurePart("IsaMill Piping", "8x, ring around controller")
+ .addStructureInfo("IsaMill Pipings must not be obstructed in front (only air blocks)")
+ .addOtherStructurePart("Milling Ball Hatch", "Any Casing")
.addInputBus("Any Casing", 1)
.addOutputBus("Any Casing", 1)
.addEnergyHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -105,7 +109,7 @@ public class GregtechMetaTileEntity_IsaMill extends GregtechMeta_MultiBlockBase
'C',
ofChain(
ofHatchAdder(
- GregtechMetaTileEntity_IsaMill::addIsaMillList, getCasingTextureIndex(), 1
+ GregtechMetaTileEntity_IsaMill::addToMachineList, getCasingTextureIndex(), 1
),
onElementPass(
x -> ++x.mCasing,
@@ -144,34 +148,6 @@ public class GregtechMetaTileEntity_IsaMill extends GregtechMeta_MultiBlockBase
return checkPiece(mName, 1, 1, 0) && mCasing >= 48 - 8 && checkHatch();
}
- public final boolean addIsaMillList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
- if (aTileEntity == null) {
- return false;
- } else {
- IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_MillingBalls){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return addToMachineListInternal(mMillingBallBuses, aMetaTileEntity, aBaseCasingIndex);
- } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
- } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
- } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
- } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
- } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
- }
- }
- return false;
- }
-
public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
return new ITexture[]{
Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(2)),
@@ -345,7 +321,7 @@ public class GregtechMetaTileEntity_IsaMill extends GregtechMeta_MultiBlockBase
}
public byte getIntakeMeta() {
- return 0;
+ return 1;
}
public Block getGearboxBlock() {
@@ -381,7 +357,7 @@ public class GregtechMetaTileEntity_IsaMill extends GregtechMeta_MultiBlockBase
}
public int getMaxEfficiency(ItemStack aStack) {
- return boostEu ? 20000 : 10000;
+ return 10000;
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java
new file mode 100644
index 0000000000..81f8ba9edb
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_SpargeTower.java
@@ -0,0 +1,414 @@
+package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing;
+
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.isAir;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
+import gregtech.api.enums.Textures;
+import gregtech.api.enums.Textures.BlockIcons;
+import gregtech.api.gui.GT_GUIContainer_MultiMachine;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
+import gregtech.api.render.TextureFactory;
+import gregtech.api.util.GTPP_Recipe;
+import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+import gregtech.api.util.GasSpargingRecipe;
+import gregtech.api.util.GasSpargingRecipeMap;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.block.ModBlocks;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.math.MathUtils;
+import gtPlusPlus.core.util.minecraft.PlayerUtils;
+import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+public class GregtechMetaTileEntity_SpargeTower extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_SpargeTower> {
+
+ protected static final String STRUCTURE_PIECE_BASE = "base";
+ protected static final String STRUCTURE_PIECE_LAYER = "layer";
+ protected static final String STRUCTURE_PIECE_LAYER_HINT = "layerHint";
+ protected static final String STRUCTURE_PIECE_TOP_HINT = "topHint";
+ private static final IStructureDefinition<GregtechMetaTileEntity_SpargeTower> STRUCTURE_DEFINITION = StructureDefinition.<GregtechMetaTileEntity_SpargeTower>builder()
+ .addShape(STRUCTURE_PIECE_BASE, transpose(new String[][]{
+ {"b~b", "bbb", "bbb"},
+ }))
+ .addShape(STRUCTURE_PIECE_LAYER, transpose(new String[][]{
+ {"lll", "lcl", "lll"}
+ }))
+ .addShape(STRUCTURE_PIECE_LAYER_HINT, transpose(new String[][]{
+ {"lll", "l-l", "lll"}
+ }))
+ .addShape(STRUCTURE_PIECE_TOP_HINT, transpose(new String[][]{
+ {"lll", "lll", "lll"}
+ }))
+ .addElement('b', ofChain(
+ ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addEnergyInputToMachineList, getCasingIndex(), 1),
+ ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addInputToMachineList, getCasingIndex(), 1),
+ ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addMaintenanceToMachineList, getCasingIndex(), 1),
+ onElementPass(GregtechMetaTileEntity_SpargeTower::onCasingFound, ofBlock(ModBlocks.blockCasings5Misc, 4))
+ ))
+ .addElement('l', ofChain(
+ ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addEnergyInputToMachineList, getCasingIndex(), 2),
+ ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addLayerOutputHatch, getCasingIndex(), 2),
+ ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addMaintenanceToMachineList, getCasingIndex(), 2),
+ onElementPass(GregtechMetaTileEntity_SpargeTower::onCasingFound, ofBlock(ModBlocks.blockCasings5Misc, 4))
+ ))
+ .addElement('c', ofChain(
+ onElementPass(t -> t.onTopLayerFound(false), ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addOutputToMachineList, getCasingIndex(), 3)),
+ onElementPass(t -> t.onTopLayerFound(false), ofHatchAdder(GregtechMetaTileEntity_SpargeTower::addMaintenanceToMachineList, getCasingIndex(), 3)),
+ onElementPass(t -> t.onTopLayerFound(true), ofBlock(ModBlocks.blockCasings5Misc, 4)),
+ isAir()
+ ))
+ .build();
+
+ protected final List<List<GT_MetaTileEntity_Hatch_Output>> mOutputHatchesByLayer = new ArrayList<>();
+ protected int mHeight;
+ protected int mCasing;
+ protected boolean mTopLayerFound;
+
+ public GregtechMetaTileEntity_SpargeTower(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ }
+
+ public GregtechMetaTileEntity_SpargeTower(String aName) {
+ super(aName);
+ }
+
+ public static int getCasingIndex() {
+ return 68;
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_SpargeTower(this.mName);
+ }
+
+ @Override
+ protected GT_Multiblock_Tooltip_Builder createTooltip() {
+ final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ tt.addMachineType("Gas Sparge Tower")
+ .addInfo("Controller block for the Sparging Tower")
+ .addInfo("Fluids are only put out at the correct height")
+ .addInfo("The correct height equals the slot number in the NEI recipe")
+ .addSeparator()
+ .beginStructureBlock(3, 8, 3, true)
+ .addController("Front bottom")
+ .addOtherStructurePart("Sparge Tower Exterior Casing", "45 (minimum)")
+ .addEnergyHatch("Any casing", 1, 2)
+ .addMaintenanceHatch("Any casing", 1, 2, 3)
+ .addInputHatch("2x Input Hatches (Any bottom layer casing)", 1)
+ .addOutputHatch("6x Output Hatches (At least one per layer except bottom layer)", 2, 3)
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ return tt;
+ }
+
+ @Override
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex, boolean aActive, boolean aRedstone) {
+ if (aSide == aFacing) {
+ if (aActive)
+ return new ITexture[]{
+ BlockIcons.getCasingTextureForId(getCasingIndex()),
+ TextureFactory.builder().addIcon(TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active).extFacing().build()};
+ return new ITexture[]{
+ BlockIcons.getCasingTextureForId(getCasingIndex()),
+ TextureFactory.builder().addIcon(TexturesGtBlock.Overlay_Machine_Controller_Advanced).extFacing().build()};
+ }
+ return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(getCasingIndex())};
+ }
+
+ @Override
+ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GT_GUIContainer_MultiMachine(aPlayerInventory, aBaseMetaTileEntity, getLocalName(), "DistillationTower.png");
+ }
+
+ @Override
+ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
+ if (GTPP_Recipe_Map.sSpargeTowerRecipes.mRecipeList.isEmpty()) {
+ generateRecipes();
+ }
+ return GTPP_Recipe_Map.sSpargeTowerRecipes;
+ }
+
+ private static boolean generateRecipes() {
+ for (GasSpargingRecipe aRecipe : GasSpargingRecipeMap.mRecipes) {
+ GTPP_Recipe newRecipe = new GTPP_Recipe(
+ false,
+ new ItemStack[] {},
+ new ItemStack[] {},
+ null,
+ null,
+ aRecipe.mFluidInputs.clone(),
+ new FluidStack[] {},
+ aRecipe.mDuration,
+ aRecipe.mEUt,
+ 0);
+ GTPP_Recipe_Map.sSpargeTowerRecipes.add(newRecipe);
+ }
+ if (GTPP_Recipe_Map.sSpargeTowerRecipes.mRecipeList.isEmpty()) {
+ return false;
+ }
+ return true;
+ }
+
+ @Override
+ public boolean isCorrectMachinePart(ItemStack aStack) {
+ return true;
+ }
+
+ @Override
+ public boolean checkRecipe(ItemStack aStack) {
+ ArrayList<FluidStack> tFluidList = getStoredFluids();
+ long tVoltage = getMaxInputVoltage();
+ byte tTier = (byte) Math.max(0, GT_Utility.getTier(tVoltage));
+ FluidStack[] tFluids = tFluidList.toArray(new FluidStack[0]);
+ if (tFluids.length > 0) {
+ Logger.INFO("Found "+tFluids.length+" input fluids. Searching "+GTPP_Recipe_Map.sSpargeTowerRecipes.mRecipeList.size()+" recipes.");
+ GT_Recipe tRecipe = getRecipeMap().findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids);
+ if (tRecipe != null) {
+ Logger.INFO("Found recipe!");
+ if (tRecipe.isRecipeInputEqual(true, tFluids)) {
+ Logger.INFO("Found recipe that matches!");
+ this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ this.mEfficiencyIncrease = 10000;
+
+ // Reset outputs and progress stats
+ this.mEUt = 0;
+ this.mProgresstime = 0;
+ this.mMaxProgresstime = 0;
+ this.mOutputItems = new ItemStack[]{};
+ this.mOutputFluids = new FluidStack[]{};
+ this.mLastRecipe = tRecipe;
+
+ calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage);
+ int aDevProgress = this.mMaxProgresstime / 10;
+ this.mMaxProgresstime = Math.max(1, aDevProgress);
+ this.mOutputItems = new ItemStack[]{};
+ ArrayList<FluidStack> aFluidOutputs = getByproductsOfSparge(tRecipe.mFluidInputs[0], tRecipe.mFluidInputs[1]);
+ this.mOutputFluids = (FluidStack[]) aFluidOutputs.toArray(new FluidStack[0]);
+ updateSlots();
+ Logger.INFO("Done!");
+ return true;
+ }
+ }
+ else {
+ Logger.INFO("Did not find recipe!");
+ }
+ }
+ this.mEUt = 0;
+ this.mEfficiency = 0;
+ Logger.INFO("Did not find recipe! (2)");
+ return false;
+ }
+
+ private static ArrayList<FluidStack> getByproductsOfSparge(final FluidStack aSpargeGas, final FluidStack aSpentFuel){
+ GasSpargingRecipe aSpargeRecipe = GasSpargingRecipeMap.findRecipe(aSpargeGas, aSpentFuel);
+ ArrayList<FluidStack> aOutputGases = new ArrayList<FluidStack>();
+ if (aSpargeRecipe == null) {
+ Logger.INFO("Did not find sparge recipe!");
+ return aOutputGases;
+ }
+ int aSpargeGasAmount = aSpargeRecipe.mInputGas.amount;
+
+ aOutputGases.add(aSpargeRecipe.mOutputSpargedFuel.copy());
+ ArrayList<FluidStack> aTempMap = new ArrayList<FluidStack>();
+ for (int i=2;i<aSpargeRecipe.mFluidOutputs.length;i++) {
+ int aGasAmount = MathUtils.randInt(0, (aSpargeRecipe.mMaxOutputQuantity[i-2]/100));
+ FluidStack aOutput = aSpargeRecipe.mFluidOutputs[i].copy();
+ aSpargeGasAmount -= aGasAmount;
+ FluidStack aSpargeOutput = null;
+ if (aGasAmount > 0) {
+ aSpargeOutput = new FluidStack(aOutput.getFluid(), aGasAmount);
+ }
+ aTempMap.add(aSpargeOutput);
+ }
+ Logger.INFO("Sparge gas left: "+aSpargeGasAmount);
+ if (aSpargeGasAmount > 0) {
+ aOutputGases.add(new FluidStack(aSpargeRecipe.mInputGas.getFluid(), aSpargeGasAmount));
+ }
+ //Logger.INFO("Sparge Outputs: "+ItemUtils.getArrayStackNames(aTempMap));
+ aOutputGases.addAll(aTempMap);
+ Logger.INFO("Sparge output size: "+aOutputGases.size());
+ //Logger.INFO("Output of sparging: "+ItemUtils.getArrayStackNames(aOutputGases));
+ return aOutputGases;
+ }
+
+ protected void onCasingFound() {
+ mCasing++;
+ }
+
+ protected void onTopLayerFound(boolean aIsCasing) {
+ mTopLayerFound = true;
+ if (aIsCasing) {
+ onCasingFound();
+ }
+ }
+
+ protected boolean addLayerOutputHatch(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (aTileEntity == null || aTileEntity.isDead() || !(aTileEntity.getMetaTileEntity() instanceof GT_MetaTileEntity_Hatch_Output)) {
+ Logger.INFO("Bad Output Hatch");
+ return false;
+ }
+ while (mOutputHatchesByLayer.size() < mHeight) {
+ mOutputHatchesByLayer.add(new ArrayList<>());
+ }
+ GT_MetaTileEntity_Hatch_Output tHatch = (GT_MetaTileEntity_Hatch_Output) aTileEntity.getMetaTileEntity();
+ tHatch.updateTexture(aBaseCasingIndex);
+ boolean addedHatch = mOutputHatchesByLayer.get(mHeight - 1).add(tHatch);
+ Logger.INFO("Added Hatch: "+addedHatch);
+ return addedHatch;
+ }
+
+ @Override
+ protected IAlignmentLimits getInitialAlignmentLimits() {
+ // don't rotate a freaking tower, it won't work
+ return (d, r, f) -> d.offsetY == 0 && r.isNotRotated() && !f.isVerticallyFliped();
+ }
+
+ @Override
+ public IStructureDefinition<GregtechMetaTileEntity_SpargeTower> getStructureDefinition() {
+ return STRUCTURE_DEFINITION;
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ // reset
+ mOutputHatchesByLayer.forEach(List::clear);
+ mHeight = 1;
+ mTopLayerFound = false;
+ mCasing = 0;
+
+ // check base
+ if (!checkPiece(STRUCTURE_PIECE_BASE, 1, 0, 0)) {
+ Logger.INFO("Bad Base. Height: "+mHeight);
+ return false;
+ }
+
+ // check each layer
+ while (mHeight < 8 && checkPiece(STRUCTURE_PIECE_LAYER, 1, mHeight, 0) && !mTopLayerFound) {
+ if (mOutputHatchesByLayer.get(mHeight - 1).isEmpty()) {
+ // layer without output hatch
+ Logger.INFO("Height: "+mHeight + " - Missing output on "+(mHeight - 1));
+ return false;
+ }
+ // not top
+ mHeight++;
+ }
+
+ // validate final invariants...
+ Logger.INFO("Height: "+mHeight);
+ Logger.INFO("Casings: "+mCasing);
+ Logger.INFO("Required: "+(7 * mHeight - 5));
+ Logger.INFO("Found Top: "+mTopLayerFound);
+ return mCasing >= 45 && mTopLayerFound && mMaintenanceHatches.size() == 1;
+ }
+
+ @Override
+ public int getMaxEfficiency(ItemStack aStack) {
+ return 10000;
+ }
+
+ @Override
+ public int getPollutionPerTick(ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
+ public int getDamageToComponent(ItemStack aStack) {
+ return 0;
+ }
+
+ @Override
+ public boolean explodesOnComponentBreak(ItemStack aStack) {
+ return false;
+ }
+
+ @Override
+ protected void addFluidOutputs(FluidStack[] mOutputFluids2) {
+ for (int i = 0; i < mOutputFluids2.length && i < mOutputHatchesByLayer.size(); i++) {
+ FluidStack tStack = mOutputFluids2[i] != null ? mOutputFluids2[i].copy() : null;
+ if (tStack == null) {
+ continue;
+ }
+ if (!dumpFluid(mOutputHatchesByLayer.get(i), tStack, true)) {
+ dumpFluid(mOutputHatchesByLayer.get(i), tStack, false);
+ }
+ }
+ }
+
+ @Override
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ buildPiece(STRUCTURE_PIECE_BASE, stackSize, hintsOnly, 1, 0, 0);
+ int tTotalHeight = 8; // min 2 output layer, so at least 1 + 2 height
+ for (int i = 1; i < tTotalHeight - 1; i++) {
+ buildPiece(STRUCTURE_PIECE_LAYER_HINT, stackSize, hintsOnly, 1, i, 0);
+ }
+ buildPiece(STRUCTURE_PIECE_TOP_HINT, stackSize, hintsOnly, 1, tTotalHeight - 1, 0);
+ }
+
+ @Override
+ public boolean hasSlotInGUI() {
+ return false;
+ }
+
+ @Override
+ public String getCustomGUIResourceName() {
+ return null;
+ }
+
+ @Override
+ public boolean requiresVanillaGtGUI() {
+ return true;
+ }
+
+ @Override
+ public String getMachineType() {
+ return "Gas Sparger";
+ }
+
+ @Override
+ public int getMaxParallelRecipes() {
+ return 1;
+ }
+
+ @Override
+ public int getEuDiscountForParallelism() {
+ return 0;
+ }
+
+ @Override
+ public boolean onPlungerRightClick(EntityPlayer aPlayer, byte aSide, float aX, float aY, float aZ) {
+ int aLayerIndex = 0;
+ PlayerUtils.messagePlayer(aPlayer, "Trying to clear "+mOutputHatchesByLayer.size()+" layers of output hatches.");
+ for (List<GT_MetaTileEntity_Hatch_Output> layer : this.mOutputHatchesByLayer) {
+ int aHatchIndex = 0;
+ for (GT_MetaTileEntity_Hatch_Output hatch : layer) {
+ if (hatch.mFluid != null) {
+ PlayerUtils.messagePlayer(aPlayer, "Clearing "+hatch.mFluid.amount+"L of "+hatch.mFluid.getLocalizedName()+" from hatch "+aHatchIndex+" on layer "+aLayerIndex+".");
+ hatch.mFluid = null;
+ }
+ aHatchIndex++;
+ }
+ aLayerIndex++;
+ }
+ return aLayerIndex > 0;
+ }
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java
index 78c72bed69..6d8ca49d7d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_DistillationTower.java
@@ -98,20 +98,15 @@ public class GregtechMetaTileEntity_Adv_DistillationTower extends GregtechMeta_M
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
@@ -123,8 +118,7 @@ public class GregtechMetaTileEntity_Adv_DistillationTower extends GregtechMeta_M
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
@@ -136,11 +130,9 @@ public class GregtechMetaTileEntity_Adv_DistillationTower extends GregtechMeta_M
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
@@ -166,7 +158,7 @@ public class GregtechMetaTileEntity_Adv_DistillationTower extends GregtechMeta_M
.addEnergyHatch("Bottom Casing", 1)
.addOutputHatch("One per layer except bottom", 2)
.addMufflerHatch("Top Center Casing", 3)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java
index 098642978d..ce54aef282 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java
@@ -32,6 +32,7 @@ import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
@@ -106,7 +107,7 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase
.addEnergyHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -164,31 +165,23 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_CustomFluidBase && aMetaTileEntity.getBaseMetaTileEntity().getMetaTileID() == 968) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
mHaveHatch = true;
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java
index 385826d0df..56206f8178 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Fusion_MK4.java
@@ -15,6 +15,7 @@ import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.common.tileentities.machines.multi.GT_MetaTileEntity_FusionComputer;
import gtPlusPlus.core.block.ModBlocks;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.block.Block;
@@ -52,7 +53,7 @@ public class GregtechMetaTileEntity_Adv_Fusion_MK4 extends GT_MetaTileEntity_Fus
.addInputHatch("2-16, Specified casings", 1)
.addOutputHatch("1-16, Specified casings", 3)
.addStructureInfo("ALL Hatches must be UHV or better")
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java
index cece6c9daf..aff614184a 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_Implosion.java
@@ -69,7 +69,7 @@ extends GregtechMeta_MultiBlockBase {
.addEnergyHatch("Any casing", 1)
.addMaintenanceHatch("Any casing", 1)
.addMufflerHatch("Any casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -107,20 +107,15 @@ extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java
index 6deead6c48..3191f56889 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/steam/GregtechMetaTileEntity_SteamMacerator.java
@@ -15,6 +15,7 @@ import gregtech.api.metatileentity.implementations.*;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusInput;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusOutput;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GT_MetaTileEntity_Hatch_CustomFluidBase;
@@ -71,7 +72,7 @@ public class GregtechMetaTileEntity_SteamMacerator extends GregtechMeta_SteamMul
.addStructureHint("Input Bus (Steam)", 1)
.addStructureHint("Output Bus (Steam)", 1)
.addStructureHint("Steam Hatch", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -109,14 +110,11 @@ public class GregtechMetaTileEntity_SteamMacerator extends GregtechMeta_SteamMul
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_CustomFluidBase && aMetaTileEntity.getBaseMetaTileEntity().getMetaTileID() == 31040){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mSteamInputFluids.add((GT_MetaTileEntity_Hatch_CustomFluidBase)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusInput){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mSteamInputs.add((GT_MetaTileEntity_Hatch_Steam_BusInput)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Steam_BusOutput){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mSteamOutputs.add((GT_MetaTileEntity_Hatch_Steam_BusOutput)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java
index 5e9b9685f4..eae51e5c1d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_AutoCrafter.java
@@ -144,7 +144,7 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase {
.addEnergyHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -207,23 +207,17 @@ public class GT4Entity_AutoCrafter extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java
index 991f2b54ed..65474d38ed 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java
@@ -222,7 +222,7 @@ extends GregtechMeta_MultiBlockBase
.addOutputHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -280,23 +280,17 @@ extends GregtechMeta_MultiBlockBase
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java
index 6f8f082065..326cc01de7 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_ElementalDuplicator.java
@@ -1,6 +1,9 @@
-/*
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls;
import java.util.ArrayList;
@@ -9,6 +12,11 @@ import java.util.List;
import org.apache.commons.lang3.ArrayUtils;
+import com.gtnewhorizon.structurelib.StructureLibAPI;
+import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
+import com.gtnewhorizon.structurelib.structure.IStructureElement;
+import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.GregTech_API;
@@ -16,15 +24,22 @@ import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GTPP_Recipe;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.data.AutoMap;
import gtPlusPlus.api.objects.data.Triplet;
-import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.item.chemistry.general.ItemGenericChemBase;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.recipe.common.CI;
@@ -32,14 +47,11 @@ import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_ElementalDataOrbHolder;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
-import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.nbthandlers.GT_MetaTileEntity_Hatch_Catalysts;
-import gtPlusPlus.xmod.gregtech.common.Meta_GT_Proxy;
-import gtPlusPlus.xmod.gregtech.common.StaticFields59;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.block.Block;
-import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
@@ -48,12 +60,19 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
private int mSolidCasingTier = 0;
private int mMachineCasingTier = 0;
private int mPipeCasingTier = 0;
- private int mCoilTier = 0;
+ private int mCoilTier = 0;
+ private int checkCoil;
+ private int[] checkCasing = new int[8];
+ private int checkMachine;
+ private int checkPipe;
+ private int maxTierOfHatch;
+ private int mCasing;
+ private IStructureDefinition<GregtechMTE_ElementalDuplicator> STRUCTURE_DEFINITION = null;
+
+ private ArrayList<GT_MetaTileEntity_Hatch_ElementalDataOrbHolder> mReplicatorDataOrbHatches = new ArrayList<GT_MetaTileEntity_Hatch_ElementalDataOrbHolder>();
- private ArrayList<GT_MetaTileEntity_Hatch_ElementalDataOrbHolder> mDataHolders = new ArrayList<GT_MetaTileEntity_Hatch_ElementalDataOrbHolder>();
-
private static final HashMap<Integer, Triplet<Block, Integer, Integer>> mTieredBlockRegistry = new HashMap<Integer, Triplet<Block, Integer, Integer>>();
-
+
public GregtechMTE_ElementalDuplicator(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
}
@@ -61,7 +80,7 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
public GregtechMTE_ElementalDuplicator(final String aName) {
super(aName);
}
-
+
public static boolean registerMachineCasingForTier(int aTier, Block aBlock, int aMeta, int aCasingTextureID) {
int aSize = mTieredBlockRegistry.size();
int aSize2 = aSize;
@@ -73,21 +92,14 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
aSize = mTieredBlockRegistry.size();
return aSize > aSize2;
}
-
- private static Block getBlockForTier(int aTier) {
- if (!mTieredBlockRegistry.containsKey(aTier)) {
- return Blocks.bedrock;
- }
- return mTieredBlockRegistry.get(aTier).getValue_1();
- }
- private static int getMetaForTier(int aTier) {
+
+ private static int getCasingTextureIdForTier(int aTier) {
if (!mTieredBlockRegistry.containsKey(aTier)) {
- return 32;
+ return 10;
}
- return mTieredBlockRegistry.get(aTier).getValue_2();
- }
- private static int getCasingTextureIdForTier(int aTier) {
- return 67;
+ int aCasingID = mTieredBlockRegistry.get(aTier).getValue_3();
+ //Logger.INFO("Found casing texture ID "+aCasingID+" for tier "+aTier);
+ return aCasingID;
}
@Override
@@ -97,20 +109,288 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
@Override
public String getMachineType() {
- return "Chemical Plant";
+ return "Replicator";
+ }
+
+ @Override
+ protected GT_Multiblock_Tooltip_Builder createTooltip() {
+ GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
+ tt.addMachineType(getMachineType())
+ .addInfo("Controller Block for the Industrial Replication Machine")
+ .addInfo("Now replication is less painful")
+ .addInfo("Please read to user manual for more information on construction & usage")
+ .addSeparator()
+ .addController("Bottom Center")
+ .addStructureHint("Catalyst Housing", 1)
+ .addInputBus("Bottom Casing", 1)
+ .addOutputBus("Bottom Casing", 1)
+ .addInputHatch("Bottom Casing", 1)
+ .addOutputHatch("Bottom Casing", 1)
+ .addEnergyHatch("Bottom Casing", 1)
+ .addMaintenanceHatch("Bottom Casing", 1)
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
+ return tt;
+ }
+
+ public void setMachineMeta(int meta) {
+ checkMachine = meta;
+ }
+
+ public int getMachineMeta() {
+ return checkMachine;
+ }
+
+ public void setPipeMeta(int meta) {
+ checkPipe = meta;
+ }
+
+ public int getPipeMeta() {
+ return checkPipe;
+ }
+
+ public void setCoilMeta(int meta) {
+ checkCoil = meta;
+ }
+
+ public int getCoilMeta() {
+ return checkCoil;
+ }
+
+ public int coilTier(int meta) {
+ switch (meta) {
+ case 0: return 1;
+ case 1: return 2;
+ case 2: return 3;
+ case 3: return 4;
+ case 4: return 5;
+ case 5: return 7;
+ case 6: return 8;
+ case 7: return 10;
+ case 8: return 11;
+ case 9: return 6;
+ case 10: return 9;
+ }
+ return 0;
}
@Override
- public String[] getTooltip() {
- return new String[] {
- "Controller Block for the Industrial Replication Machine",
- "Now replication is less painful",
- "Please read to user manual for more information on construction & usage",
- TAG_HIDE_MAINT
+ public IStructureDefinition<GregtechMTE_ElementalDuplicator> getStructureDefinition() {
+ if (STRUCTURE_DEFINITION == null) {
+ STRUCTURE_DEFINITION = StructureDefinition.<GregtechMTE_ElementalDuplicator>builder()
+ .addShape(mName, transpose(new String[][]{
+ {"XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX", "XXXXXXX"},
+ {"X X", " MMMMM ", " MHHHM ", " MHHHM ", " MHHHM ", " MMMMM ", "X X"},
+ {"X X", " ", " PPP ", " PPP ", " PPP ", " ", "X X"},
+ {"X X", " ", " HHH ", " HHH ", " HHH ", " ", "X X"},
+ {"X X", " ", " PPP ", " PPP ", " PPP ", " ", "X X"},
+ {"X X", " MMMMM ", " MHHHM ", " MHHHM ", " MHHHM ", " MMMMM ", "X X"},
+ {"CCC~CCC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CMMMMMC", "CCCCCCC"},
+ }))
+ .addElement(
+ 'C',
+ ofChain(
+ ofHatchAdder(
+ GregtechMTE_ElementalDuplicator::addChemicalPlantList, getCasingTextureID(), 1
+ ),
+ onElementPass(
+ x -> {++x.checkCasing[0]; ++x.mCasing;},
+ ofSolidCasing(0)
+ ),
+ onElementPass(
+ x -> {++x.checkCasing[1]; ++x.mCasing;},
+ ofSolidCasing(1)
+ ),
+ onElementPass(
+ x -> {++x.checkCasing[2]; ++x.mCasing;},
+ ofSolidCasing(2)
+ ),
+ onElementPass(
+ x -> {++x.checkCasing[3]; ++x.mCasing;},
+ ofSolidCasing(3)
+ ),
+ onElementPass(
+ x -> {++x.checkCasing[4]; ++x.mCasing;},
+ ofSolidCasing(4)
+ ),
+ onElementPass(
+ x -> {++x.checkCasing[5]; ++x.mCasing;},
+ ofSolidCasing(5)
+ ),
+ onElementPass(
+ x -> {++x.checkCasing[6]; ++x.mCasing;},
+ ofSolidCasing(6)
+ ),
+ onElementPass(
+ x -> {++x.checkCasing[7]; ++x.mCasing;},
+ ofSolidCasing(7)
+ )
+ )
+ )
+ .addElement(
+ 'X',
+ ofChain(
+ onElementPass(
+ x -> {++x.checkCasing[0]; ++x.mCasing;},
+ ofSolidCasing(0)
+ ),
+ onElementPass(
+ x -> {++x.checkCasing[1]; ++x.mCasing;},
+ ofSolidCasing(1)
+ ),
+ onElementPass(
+ x -> {++x.checkCasing[2]; ++x.mCasing;},
+ ofSolidCasing(2)
+ ),
+ onElementPass(
+ x -> {++x.checkCasing[3]; ++x.mCasing;},
+ ofSolidCasing(3)
+ ),
+ onElementPass(
+ x -> {++x.checkCasing[4]; ++x.mCasing;},
+ ofSolidCasing(4)
+ ),
+ onElementPass(
+ x -> {++x.checkCasing[5]; ++x.mCasing;},
+ ofSolidCasing(5)
+ ),
+ onElementPass(
+ x -> {++x.checkCasing[6]; ++x.mCasing;},
+ ofSolidCasing(6)
+ ),
+ onElementPass(
+ x -> {++x.checkCasing[7]; ++x.mCasing;},
+ ofSolidCasing(7)
+ )
+ )
+ )
+ .addElement(
+ 'M',
+ addTieredBlock(
+ GregTech_API.sBlockCasings1, GregtechMTE_ElementalDuplicator::setMachineMeta, GregtechMTE_ElementalDuplicator::getMachineMeta, 10
+ )
+ )
+ .addElement(
+ 'H',
+ addTieredBlock(
+ GregTech_API.sBlockCasings5, GregtechMTE_ElementalDuplicator::setCoilMeta, GregtechMTE_ElementalDuplicator::getCoilMeta, 11
+ )
+ )
+ .addElement(
+ 'P',
+ addTieredBlock(
+ GregTech_API.sBlockCasings2, GregtechMTE_ElementalDuplicator::setPipeMeta, GregtechMTE_ElementalDuplicator::getPipeMeta, 12, 16
+ )
+ )
+ .build();
+ }
+ return STRUCTURE_DEFINITION;
+ }
+
+ public static <T> IStructureElement<T> ofSolidCasing(int aIndex) {
+ return new IStructureElement<T>() {
+ @Override
+ public boolean check(T t, World world, int x, int y, int z) {
+ Block block = world.getBlock(x, y, z);
+ int meta = world.getBlockMetadata(x, y, z);
+ Block target = mTieredBlockRegistry.get(aIndex).getValue_1();
+ int targetMeta = mTieredBlockRegistry.get(aIndex).getValue_2();
+ return target.equals(block) && meta == targetMeta;
+ }
+
+ int getIndex(int size) {
+ if (size > 8) size = 8;
+ return size - 1;
+ }
+
+ @Override
+ public boolean spawnHint(T t, World world, int x, int y, int z, ItemStack trigger) {
+ StructureLibAPI.hintParticle(world, x, y, z, mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_1(), mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_2());
+ return true;
+ }
+
+ @Override
+ public boolean placeBlock(T t, World world, int x, int y, int z, ItemStack trigger) {
+ return world.setBlock(x, y, z, mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_1(), mTieredBlockRegistry.get(getIndex(trigger.stackSize)).getValue_2(), 3);
+ }
};
}
@Override
+ public void construct(ItemStack stackSize, boolean hintsOnly) {
+ buildPiece(mName , stackSize, hintsOnly, 3, 6, 0);
+ }
+
+ @Override
+ public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ mCasing = 0;
+ for (int i = 0; i < 8; i++) {
+ checkCasing[i] = 0;
+ }
+ checkCoil = 0;
+ checkPipe = 0;
+ checkMachine = 0;
+ mSolidCasingTier = 0;
+ mMachineCasingTier = 0;
+ mPipeCasingTier = 0;
+ mCoilTier = 0;
+ mReplicatorDataOrbHatches.clear();
+ if (checkPiece(mName, 3, 6, 0) && mCasing >= 80) {
+ for (int i = 0; i < 8; i++) {
+ if (checkCasing[i] == mCasing) {
+ mSolidCasingTier = i;
+ }
+ else if (checkCasing[i] > 0)
+ return false;
+ }
+ mMachineCasingTier = checkMachine - 1;
+ mPipeCasingTier = checkPipe - 12;
+ mCoilTier = coilTier(checkCoil - 1);
+ updateHatchTexture();
+ return mMachineCasingTier >= maxTierOfHatch;
+ }
+ return false;
+ }
+
+ public void updateHatchTexture() {
+ for (GT_MetaTileEntity_Hatch h : mReplicatorDataOrbHatches) h.updateTexture(getCasingTextureID());
+ for (GT_MetaTileEntity_Hatch h : mInputBusses) h.updateTexture(getCasingTextureID());
+ for (GT_MetaTileEntity_Hatch h : mMaintenanceHatches) h.updateTexture(getCasingTextureID());
+ for (GT_MetaTileEntity_Hatch h : mEnergyHatches) h.updateTexture(getCasingTextureID());
+ for (GT_MetaTileEntity_Hatch h : mOutputBusses) h.updateTexture(getCasingTextureID());
+ for (GT_MetaTileEntity_Hatch h : mInputHatches) h.updateTexture(getCasingTextureID());
+ for (GT_MetaTileEntity_Hatch h : mOutputHatches) h.updateTexture(getCasingTextureID());
+ }
+
+ public final boolean addChemicalPlantList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
+ if (aTileEntity == null) {
+ return false;
+ } else {
+ IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_ElementalDataOrbHolder){
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
+ } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
+ maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mTier);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
+ } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
+ } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
+ maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity).mTier);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
+ } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
+ maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity).mTier);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
+ } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
+ maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mTier);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
+ } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
+ maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity).mTier);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
+ }
+ }
+ return false;
+ }
+
+ @Override
public String getSound() {
return GregTech_API.sSoundList.get(Integer.valueOf(207));
}
@@ -140,21 +420,19 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
@Override
public GT_Recipe.GT_Recipe_Map getRecipeMap() {
+ if (GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT.mRecipeList.size() == 0) {
+ generateRecipes();
+ }
return GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT;
}
public static void generateRecipes() {
- for (GTPP_Recipe i : GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlantRecipes.mRecipeList) {
+ for (GT_Recipe i : GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlantRecipes.mRecipeList) {
GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT.add(i);
}
}
@Override
- public boolean isFacingValid(final byte aFacing) {
- return aFacing > 1;
- }
-
- @Override
public int getMaxParallelRecipes() {
return 2 * getPipeCasingTier();
}
@@ -171,12 +449,10 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
private int getMachineCasingTier() {
return mMachineCasingTier;
}
+
private int getPipeCasingTier() {
return mPipeCasingTier;
}
- private int getCoilTier() {
- return mCoilTier;
- }
private int getCasingTextureID() {
// Check the Tier Client Side
@@ -192,15 +468,15 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
GT_MetaTileEntity_TieredMachineBlock aMachineBlock = (GT_MetaTileEntity_TieredMachineBlock) aMetaTileEntity;
int aTileTier = aMachineBlock.mTier;
if (aTileTier > aMaxTier) {
- Logger.INFO("Hatch tier too high.");
+ log("Hatch tier too high.");
return false;
}
- else {
+ else {
return addToMachineList(aTileEntity, getCasingTextureID());
}
}
else {
- Logger.INFO("Bad Tile Entity being added to hatch map."); // Shouldn't ever happen, but.. ya know..
+ log("Bad Tile Entity being added to hatch map."); // Shouldn't ever happen, but.. ya know..
return false;
}
}
@@ -223,368 +499,6 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
mCoilTier = aNBT.getInteger("mCoilTier");
}
- private static boolean isBlockSolidCasing(int aCurrentTier, Block aBlock, int aMeta) {
- if (aBlock == null || (aMeta < 0 || aMeta > 16)) {
- return false;
- }
- Block aTieredCasing = ModBlocks.blockCasings5Misc;
- int aTieredMeta = 3;
- if (aBlock == aTieredCasing && aMeta == aTieredMeta) {
- return true;
- }
- return false;
- }
- private static boolean isBlockMachineCasing(Block aBlock, int aMeta) {
- Block aCasingBlock1 = GregTech_API.sBlockCasings1;
- if (aBlock == aCasingBlock1) {
- if (aMeta > 9 || aMeta < 0) {
- return false;
- }
- else {
- return true;
- }
- }
- else {
- return false;
- }
- }
- private static boolean isBlockPipeCasing(Block aBlock, int aMeta) {
- Block aCasingBlock2 = GregTech_API.sBlockCasings2;
- if (aBlock == aCasingBlock2) {
- int aMetaBronzePipeCasing = 12;
- //int aMetaSteelPipeCasing = 13;
- //int aMetaTitaniumPipeCasing = 14;
- int aMetaTungstenPipeCasing = 15;
- if (aMeta > aMetaTungstenPipeCasing || aMeta < aMetaBronzePipeCasing) {
- return false;
- }
- else {
- return true;
- }
- }
- else {
- return false;
- }
- }
-
- private static AutoMap<Integer> mValidCoilMetaCache;
-
- private static boolean isBlockCoil(Block aBlock, int aMeta) {
- Block aCasingBlock;
- if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
- aCasingBlock = StaticFields59.getBlockCasings5();
- }
- else {
- aCasingBlock = GregTech_API.sBlockCasings1;
- }
- // Cache the meta values for later
- if (mValidCoilMetaCache == null || mValidCoilMetaCache.isEmpty()) {
- AutoMap<Integer> aValidCoilMeta = new AutoMap<Integer>();
- // Only use the right meta values available.
- if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
- aValidCoilMeta = Meta_GT_Proxy.GT_ValidHeatingCoilMetas;
- }
- else {
- aValidCoilMeta.put(12);
- aValidCoilMeta.put(13);
- aValidCoilMeta.put(14);
- }
- mValidCoilMetaCache = aValidCoilMeta;
- }
- if (aBlock == aCasingBlock) {
- for (int i: mValidCoilMetaCache.values()) {
- if (i == aMeta) {
- return true;
- }
- }
- }
- return false;
- }
-
-
- @Override
- public boolean checkMultiblock(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack) {
-
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 3;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 3;
-
- Logger.INFO("Checking ChemPlant Structure");
-
- // Require Air above controller
- boolean aAirCheck = aBaseMetaTileEntity.getAirOffset(0, 1, 0);
-
- if (!aAirCheck) {
- Logger.INFO("No Air Above Controller");
- return false;
- } else {
-
- //String aName = aInitStructureCheck != null ? ItemUtils.getLocalizedNameOfBlock(aInitStructureCheck, aInitStructureCheckMeta) : "Air";
-
- mSolidCasingTier = getSolidCasingTierCheck(aBaseMetaTileEntity, xDir, zDir);
- mMachineCasingTier = getMachineCasingTierCheck(aBaseMetaTileEntity, xDir, zDir);
-
- Logger.INFO("Initial Casing Check Complete, Solid Casing Tier: "+mSolidCasingTier+", Machine Casing Tier: "+mMachineCasingTier);
-
- int aSolidCasingCount = 0;
- int aMachineCasingCount = 0;
- int aPipeCount = 0;
- int aCoilCount = 0;
-
- aSolidCasingCount = checkSolidCasings(aBaseMetaTileEntity, aStack, xDir, zDir);
- aMachineCasingCount = checkMachineCasings(aBaseMetaTileEntity, aStack, xDir, zDir);
- aPipeCount = checkPipes(aBaseMetaTileEntity, aStack, xDir, zDir);
- aCoilCount = checkCoils(aBaseMetaTileEntity, aStack, xDir, zDir);
-
- Logger.INFO("Casing Counts: ");
- Logger.INFO("Solid: "+aSolidCasingCount+", Machine: "+aMachineCasingCount);
- Logger.INFO("Pipe: "+aPipeCount+", Coil: "+aCoilCount);
-
-
- Logger.INFO("Casing Tiers: ");
- Logger.INFO("Solid: "+getSolidCasingTier()+", Machine: "+getMachineCasingTier());
- Logger.INFO("Pipe: "+getPipeCasingTier()+", Coil: "+getCoilTier());
-
- // Attempt to sync fields here, so that it updates client side values.
- aBaseMetaTileEntity.getWorld().markBlockForUpdate(aBaseMetaTileEntity.getXCoord(), aBaseMetaTileEntity.getYCoord(), aBaseMetaTileEntity.getZCoord());
-
-
-
- // Minimum 80/93 Solid Casings
- if (aSolidCasingCount < 80) {
- Logger.INFO("Not enough solid casings. Found "+aSolidCasingCount+", require: 80.");
- return false;
- }
- if (aMachineCasingCount != 57) {
- Logger.INFO("Not enough machine casings. Found "+aMachineCasingCount+", require: 57.");
- return false;
- }
- if (aPipeCount != 18) {
- Logger.INFO("Not enough pipe casings. Found "+aPipeCount+", require: 18.");
- return false;
- }
- if (aCoilCount != 27) {
- Logger.INFO("Not enough coils. Found "+aCoilCount+", require: 27.");
- return false;
- }
-
- Logger.INFO("Structure Check Complete!");
-
- return true;
- }
- }
-
-
- public int checkCoils(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack, int aOffsetX, int aOffsetZ) {
- int tAmount = 0;
- int aCurrentCoilMeta = -1;
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- for (int h = 0; h < 8; h++) {
- if (h == 1 || h == 3 || h == 5) {
- Block aBlock = aBaseMetaTileEntity.getBlockOffset(aOffsetX + i, h, aOffsetZ + j);
- int aMeta = aBaseMetaTileEntity.getMetaIDOffset(aOffsetX + i, h, aOffsetZ + j);
- if (isBlockCoil(aBlock, aMeta)) {
- if (aCurrentCoilMeta < 0) {
- aCurrentCoilMeta = aMeta;
- }
- if (aCurrentCoilMeta != aMeta) {
- return tAmount;
- }
- else {
- tAmount++;
- }
- }
- }
- }
- }
- }
-
- if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
- this.mCoilTier = (aCurrentCoilMeta+1);
- }
- else {
- if (aCurrentCoilMeta == 12) {
- this.mCoilTier = 1;
- }
- else if (aCurrentCoilMeta == 13) {
- this.mCoilTier = 2;
- }
- else if (aCurrentCoilMeta == 14) {
- this.mCoilTier = 3;
- }
- else {
- this.mCoilTier = 0;
- }
- }
-
- return tAmount;
- }
-
-
- public int checkPipes(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack, int aOffsetX, int aOffsetZ) {
- int tAmount = 0;
- int aCurrentPipeMeta = -1;
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- for (int h = 0; h < 8; h++) {
- if (h == 2 || h == 4) {
- Block aBlock = aBaseMetaTileEntity.getBlockOffset(aOffsetX + i, h, aOffsetZ + j);
- int aMeta = aBaseMetaTileEntity.getMetaIDOffset(aOffsetX + i, h, aOffsetZ + j);
- if (isBlockPipeCasing(aBlock, aMeta)) {
- if (aCurrentPipeMeta < 0) {
- aCurrentPipeMeta = aMeta;
- }
- if (aCurrentPipeMeta != aMeta) {
- return tAmount;
- }
- else {
- tAmount++;
- }
- }
- }
- }
- }
- }
-
- if (aCurrentPipeMeta == 12) {
- this.mPipeCasingTier = 1;
- }
- else if (aCurrentPipeMeta == 13) {
- this.mPipeCasingTier = 2;
- }
- else if (aCurrentPipeMeta == 14) {
- this.mPipeCasingTier = 3;
- }
- else if (aCurrentPipeMeta == 15) {
- this.mPipeCasingTier = 4;
- }
- else {
- this.mPipeCasingTier = 0;
- }
-
- return tAmount;
- }
-
-
- public int checkSolidCasings(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack, int aOffsetX, int aOffsetZ) {
-
- int tAmount = 0;
-
- // Only check a 7x7
- for (int i = -3; i < 4; i++) {
- for (int j = -3; j < 4; j++) {
- // If we are on the 7x7 ring, proceed
- IGregTechTileEntity aTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(aOffsetX + i, 0, aOffsetZ + j);
- Block aBlock = aBaseMetaTileEntity.getBlockOffset(aOffsetX + i, 0, aOffsetZ + j);
- int aMeta = aBaseMetaTileEntity.getMetaIDOffset(aOffsetX + i, 0, aOffsetZ + j);
-
- if (aTileEntity != null) {
-
- if (this.addToMachineList(aTileEntity)) {
- tAmount++;
- }
- else {
- if (aTileEntity != null) {
- Logger.INFO("Adding "+aTileEntity.getInventoryName());
- }
- final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity == null) {
- Logger.INFO("Error counting Bottom Layer Casing Ring. Bad Tile Entity. Found "+aTileEntity.getInventoryName());
- return tAmount;
- }
- //Handle controller
- if (aMetaTileEntity instanceof GregtechMTE_ElementalDuplicator) {
- continue;
- }
- else {
- Logger.INFO("Error counting Bottom Layer Casing Ring. Bad Tile Entity. Found "+aMetaTileEntity.getInventoryName());
- return tAmount;
- }
- }
- }
- else {
- if (isBlockSolidCasing(mSolidCasingTier, aBlock, aMeta)) {
- tAmount++;
- }
- else {
- Logger.INFO("Error counting Bottom Layer Casing Ring. Found "+aBlock.getLocalizedName()+":"+aMeta);
- return tAmount;
- }
- }
-
- }
- }
-
- return tAmount;
- }
-
-
- public int checkMachineCasings(final IGregTechTileEntity aBaseMetaTileEntity, final ItemStack aStack, int aOffsetX, int aOffsetZ) {
- int tAmount = 0;
- int aHeight = 0;
- // Iterate once for each layer
- for (int aIteration=0;aIteration<3;aIteration++) {
- // Dynamically set height
- aHeight = (aIteration == 0 ? 0 : aIteration == 1 ? 1 : 5);
- // Only check a 5x5 area
- for (int i = -2; i < 3; i++) {
- for (int j = -2; j < 3; j++) {
- // If we are on the 5x5 ring, proceed
- if (i == -2 || i == 2 || j == -2 || j == 2) {
- // If the second axis is on the outer ring, continue
- if (i < -2 || i > 2 || j < -2 || j > 2) {
- continue;
- }
- Block aBlock = aBaseMetaTileEntity.getBlockOffset(aOffsetX + i, aHeight, aOffsetZ + j);
- int aMeta = aBaseMetaTileEntity.getMetaIDOffset(aOffsetX + i, aHeight, aOffsetZ + j);
- if (isBlockMachineCasing(aBlock, aMeta)) {
- tAmount++;
- }
- else {
- return tAmount;
- }
- }
- }
- }
- }
-
- // Check bottom layer inner 3x3
- for (int i = -1; i < 2; i++) {
- for (int j = -1; j < 2; j++) {
- Block aBlock = aBaseMetaTileEntity.getBlockOffset(aOffsetX + i, 0, aOffsetZ + j);
- int aMeta = aBaseMetaTileEntity.getMetaIDOffset(aOffsetX + i, 0, aOffsetZ + j);
- if (isBlockMachineCasing(aBlock, aMeta)) {
- tAmount++;
- }
- else {
- return tAmount;
- }
- }
- }
-
- return tAmount;
- }
-
- public int getSolidCasingTierCheck(IGregTechTileEntity aBaseMetaTileEntity, int xDir, int zDir) {
- Block aInitStructureCheck;
- int aInitStructureCheckMeta;
- if (xDir == 0) {
- aInitStructureCheck = aBaseMetaTileEntity.getBlockOffset(zDir, 1, 0);
- aInitStructureCheckMeta = aBaseMetaTileEntity.getMetaIDOffset(zDir, 1, 0);
- }
- else {
- aInitStructureCheck = aBaseMetaTileEntity.getBlockOffset(0, 1, xDir);
- aInitStructureCheckMeta = aBaseMetaTileEntity.getMetaIDOffset(0, 1, xDir);
- }
- for (int aTier : mTieredBlockRegistry.keySet()) {
- Triplet<Block, Integer, Integer> aData = mTieredBlockRegistry.get(aTier);
- if (aData.getValue_1() == aInitStructureCheck && aData.getValue_2() == aInitStructureCheckMeta) {
- return aTier;
- }
- }
- return 0;
- }
-
@Override
public boolean addToMachineList(IGregTechTileEntity aTileEntity, int aBaseCasingIndex) {
final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
@@ -593,16 +507,12 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
}
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_ElementalDataOrbHolder) {
log("Found GT_MetaTileEntity_Hatch_ElementalDataOrbHolder");
- return addToMachineListInternal(mDataHolders, aMetaTileEntity, aBaseCasingIndex);
+ ((GT_MetaTileEntity_Hatch_ElementalDataOrbHolder) aTileEntity).mRecipeMap = getRecipeMap();
+ return addToMachineListInternal(mReplicatorDataOrbHatches, aMetaTileEntity, aBaseCasingIndex);
}
return super.addToMachineList(aTileEntity, aBaseCasingIndex);
}
- public int getMachineCasingTierCheck(IGregTechTileEntity aBaseMetaTileEntity, int xDir, int zDir) {
- return 10;
- }
-
-
@Override
public int getMaxEfficiency(final ItemStack aStack) {
return 10000;
@@ -610,7 +520,7 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
@Override
public int getPollutionPerTick(final ItemStack aStack) {
- return 0;
+ return 100;
}
@Override
@@ -633,24 +543,13 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
return 50 * (this.mCoilTier - 2);
}
- public int getMaxCatalystDurability() {
- return 50;
- }
-
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (aBaseMetaTileEntity.isServerSide()) {
if (this.mUpdate == 1 || this.mStartUpCheck == 1) {
- this.mDataHolders.clear();
+ this.mReplicatorDataOrbHatches.clear();
}
}
- // Silly Client Syncing
- if (aBaseMetaTileEntity.isClientSide()) {
- if (this != null && this.getBaseMetaTileEntity() != null && this.getBaseMetaTileEntity().getWorld() != null) {
- this.mSolidCasingTier = getCasingTierOnClientSide();
- markDirty();
- }
- }
super.onPostTick(aBaseMetaTileEntity, aTick);
}
@@ -669,325 +568,177 @@ public class GregtechMTE_ElementalDuplicator extends GregtechMeta_MultiBlockBase
public boolean checkRecipeGeneric(
ItemStack[] aItemInputs, FluidStack[] aFluidInputs,
int aMaxParallelRecipes, int aEUPercent,
- int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe) {
-
- // Based on the Processing Array. A bit overkill, but very flexible.
-
- // Reset outputs and progress stats
- this.mEUt = 0;
- this.mMaxProgresstime = 0;
- this.mOutputItems = new ItemStack[]{};
- this.mOutputFluids = new FluidStack[]{};
-
- long tVoltage = getMaxInputVoltage();
- byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
- long tEnergy = getMaxInputEnergy();
- log("Running checkRecipeGeneric(0)");
-
- // checks if it has a catalyst with enough durability
- ItemStack tCatalystRecipe = findCatalyst(aItemInputs);
- if (tCatalystRecipe == null) {
- log("does not have catalyst");
- return false;
- }
-
- GT_Recipe tRecipe = findRecipe(
- getBaseMetaTileEntity(), mLastRecipe, false,
- gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs);
-
-
- log("Running checkRecipeGeneric(1)");
- // Remember last recipe - an optimization for findRecipe()
- this.mLastRecipe = tRecipe;
-
-
- if (tRecipe == null) {
- log("BAD RETURN - 1");
- return false;
- }
-
- if (tRecipe.mSpecialValue > this.mSolidCasingTier) {
- log("solid tier is too low");
- return false;
- }
-
-
- aMaxParallelRecipes = this.canBufferOutputs(tRecipe, aMaxParallelRecipes);
- if (aMaxParallelRecipes == 0) {
- log("BAD RETURN - 2");
- return false;
- }
-
- // checks if it has enough catalyst durabilety
- ArrayList<ItemStack>tCatalysts = null;
- int tMaxParrallelCatalyst = aMaxParallelRecipes;
- if (tCatalystRecipe != null) {
- tCatalysts = new ArrayList<ItemStack>();
- tMaxParrallelCatalyst = getCatalysts(aItemInputs, tCatalystRecipe, aMaxParallelRecipes, tCatalysts);
- log("Can process "+tMaxParrallelCatalyst+" recipes. If less than "+aMaxParallelRecipes+", catalyst does not have enough durability.");
- }
-
- if (tMaxParrallelCatalyst == 0) {
- log("found not enough catalysts");
- return false;
- }
-
- // EU discount
- float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f;
- float tTotalEUt = 0.0f;
- log("aEUPercent "+aEUPercent);
- log("mEUt "+tRecipe.mEUt);
-
- int parallelRecipes = 0;
-
- log("parallelRecipes: "+parallelRecipes);
- log("aMaxParallelRecipes: "+tMaxParrallelCatalyst);
- log("tTotalEUt: "+tTotalEUt);
- log("tVoltage: "+tVoltage);
- log("tEnergy: "+tEnergy);
- log("tRecipeEUt: "+tRecipeEUt);
- // Count recipes to do in parallel, consuming input items and fluids and considering input voltage limits
- for (; parallelRecipes < tMaxParrallelCatalyst && tTotalEUt < (tEnergy - tRecipeEUt); parallelRecipes++) {
- if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) {
- log("Broke at "+parallelRecipes+".");
- break;
- }
- log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+".");
- tTotalEUt += tRecipeEUt;
- }
-
- if (parallelRecipes == 0) {
- log("BAD RETURN - 3");
- return false;
- }
-
- // -- Try not to fail after this point - inputs have already been consumed! --
-
-
- // Convert speed bonus to duration multiplier
- // e.g. 100% speed bonus = 200% speed = 100%/200% = 50% recipe duration.
- aSpeedBonusPercent = Math.max(-99, aSpeedBonusPercent);
- float tTimeFactor = 100.0f / (100.0f + aSpeedBonusPercent);
- this.mMaxProgresstime = (int)(tRecipe.mDuration * tTimeFactor);
-
- this.mEUt = (int)Math.ceil(tTotalEUt);
-
- this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
+ int aSpeedBonusPercent, int aOutputChanceRoll, GT_Recipe aRecipe, boolean isOC) {
+ return false;
+ }
- // Overclock
- if (this.mEUt <= 16) {
- this.mEUt = (this.mEUt * (1 << tTier - 1) * (1 << tTier - 1));
- this.mMaxProgresstime = (this.mMaxProgresstime / (1 << tTier - 1));
- } else {
- while (this.mEUt <= gregtech.api.enums.GT_Values.V[(tTier - 1)]) {
- this.mEUt *= 4;
- this.mMaxProgresstime /= 2;
+ private static final HashMap<Long, AutoMap<GT_Recipe>> mTieredRecipeMap = new HashMap<Long, AutoMap<GT_Recipe>>();
+ private static final AutoMap<GT_Recipe> aTier0Recipes = new AutoMap<GT_Recipe>();
+ private static final AutoMap<GT_Recipe> aTier1Recipes = new AutoMap<GT_Recipe>();
+ private static final AutoMap<GT_Recipe> aTier2Recipes = new AutoMap<GT_Recipe>();
+ private static final AutoMap<GT_Recipe> aTier3Recipes = new AutoMap<GT_Recipe>();
+ private static final AutoMap<GT_Recipe> aTier4Recipes = new AutoMap<GT_Recipe>();
+ private static final AutoMap<GT_Recipe> aTier5Recipes = new AutoMap<GT_Recipe>();
+ private static final AutoMap<GT_Recipe> aTier6Recipes = new AutoMap<GT_Recipe>();
+ private static final AutoMap<GT_Recipe> aTier7Recipes = new AutoMap<GT_Recipe>();
+ private static boolean mInitRecipeCache = false;
+
+ private static void initRecipeCaches() {
+ if (!mInitRecipeCache) {
+ mTieredRecipeMap.put((long) 0, aTier0Recipes);
+ mTieredRecipeMap.put((long) 1, aTier1Recipes);
+ mTieredRecipeMap.put((long) 2, aTier2Recipes);
+ mTieredRecipeMap.put((long) 3, aTier3Recipes);
+ mTieredRecipeMap.put((long) 4, aTier4Recipes);
+ mTieredRecipeMap.put((long) 5, aTier5Recipes);
+ mTieredRecipeMap.put((long) 6, aTier6Recipes);
+ mTieredRecipeMap.put((long) 7, aTier7Recipes);
+ for (GT_Recipe aRecipe : GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT.mRecipeList) {
+ if (aRecipe != null) {
+ switch (aRecipe.mSpecialValue) {
+ case 0:
+ aTier0Recipes.add(aRecipe);
+ continue;
+ case 1:
+ aTier1Recipes.add(aRecipe);
+ continue;
+ case 2:
+ aTier2Recipes.add(aRecipe);
+ continue;
+ case 3:
+ aTier3Recipes.add(aRecipe);
+ continue;
+ case 4:
+ aTier4Recipes.add(aRecipe);
+ continue;
+ case 5:
+ aTier5Recipes.add(aRecipe);
+ continue;
+ case 6:
+ aTier6Recipes.add(aRecipe);
+ continue;
+ case 7:
+ aTier7Recipes.add(aRecipe);
+ continue;
+ }
+ }
}
- }
-
- if (this.mEUt > 0) {
- this.mEUt = (-this.mEUt);
- }
-
-
- this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
-
- // Collect fluid outputs
- FluidStack[] tOutputFluids = new FluidStack[tRecipe.mFluidOutputs.length];
- for (int h = 0; h < tRecipe.mFluidOutputs.length; h++) {
- if (tRecipe.getFluidOutput(h) != null) {
- tOutputFluids[h] = tRecipe.getFluidOutput(h).copy();
- tOutputFluids[h].amount *= parallelRecipes;
+ mInitRecipeCache = true;
+ }
+ }
+
+ private static boolean areInputsEqual(GT_Recipe aComparator, ItemStack[] aInputs, FluidStack[] aFluids) {
+ int aInputCount = aComparator.mInputs.length;
+ if (aInputCount > 0) {
+ //Logger.INFO("Looking for recipe with "+aInputCount+" Items");
+ int aMatchingInputs = 0;
+ recipe : for (ItemStack a : aComparator.mInputs) {
+ for (ItemStack b : aInputs) {
+ if (a.getItem() == b.getItem()) {
+ if (a.getItemDamage() == b.getItemDamage()) {
+ //Logger.INFO("Found matching Item Input - "+b.getUnlocalizedName());
+ aMatchingInputs++;
+ continue recipe;
+ }
+ }
+ }
}
- }
-
- // Collect output item types
- ItemStack[] tOutputItems = new ItemStack[tRecipe.mOutputs.length];
- for (int h = 0; h < tRecipe.mOutputs.length; h++) {
- if (tRecipe.getOutput(h) != null) {
- tOutputItems[h] = tRecipe.getOutput(h).copy();
- tOutputItems[h].stackSize = 0;
+ if (aMatchingInputs != aInputCount) {
+ return false;
}
}
-
- // Set output item stack sizes (taking output chance into account)
- for (int f = 0; f < tOutputItems.length; f++) {
- if (tRecipe.mOutputs[f] != null && tOutputItems[f] != null) {
- for (int g = 0; g < parallelRecipes; g++) {
- if (getBaseMetaTileEntity().getRandomNumber(aOutputChanceRoll) < tRecipe.getOutputChance(f))
- tOutputItems[f].stackSize += tRecipe.mOutputs[f].stackSize;
+ int aFluidInputCount = aComparator.mFluidInputs.length;
+ if (aFluidInputCount > 0) {
+ //Logger.INFO("Looking for recipe with "+aFluidInputCount+" Fluids");
+ int aMatchingFluidInputs = 0;
+ recipe : for (FluidStack b : aComparator.mFluidInputs) {
+ //Logger.INFO("Checking for fluid "+b.getLocalizedName());
+ for (FluidStack a : aFluids) {
+ if (GT_Utility.areFluidsEqual(a, b)) {
+ //Logger.INFO("Found matching Fluid Input - "+b.getLocalizedName());
+ aMatchingFluidInputs++;
+ continue recipe;
+ }
+ else {
+ //Logger.INFO("Found fluid which did not match - "+a.getLocalizedName());
+ }
}
}
- }
-
- tOutputItems = removeNulls(tOutputItems);
-
- // Sanitize item stack size, splitting any stacks greater than max stack size
- List<ItemStack> splitStacks = new ArrayList<ItemStack>();
- for (ItemStack tItem : tOutputItems) {
- while (tItem.getMaxStackSize() < tItem.stackSize) {
- ItemStack tmp = tItem.copy();
- tmp.stackSize = tmp.getMaxStackSize();
- tItem.stackSize = tItem.stackSize - tItem.getMaxStackSize();
- splitStacks.add(tmp);
+ if (aMatchingFluidInputs != aFluidInputCount) {
+ return false;
}
}
-
- if (splitStacks.size() > 0) {
- ItemStack[] tmp = new ItemStack[splitStacks.size()];
- tmp = splitStacks.toArray(tmp);
- tOutputItems = ArrayUtils.addAll(tOutputItems, tmp);
- }
-
- // Strip empty stacks
- List<ItemStack> tSList = new ArrayList<ItemStack>();
- for (ItemStack tS : tOutputItems) {
- if (tS.stackSize > 0) tSList.add(tS);
- }
- tOutputItems = tSList.toArray(new ItemStack[tSList.size()]);
-
- // Damage catalyst once all is said and done.
- if (tCatalystRecipe != null) {
- log("damaging catalyst");
- damageCatalyst(tCatalystRecipe, parallelRecipes);
- }
-
- // Commit outputs
- this.mOutputItems = tOutputItems;
- this.mOutputFluids = tOutputFluids;
- updateSlots();
-
- // Play sounds (GT++ addition - GT multiblocks play no sounds)
- startProcess();
-
- log("GOOD RETURN - 1");
+ Logger.INFO("Recipes Match!");
return true;
}
- private int getCatalysts(ItemStack[] aItemInputs, ItemStack aRecipeCatalyst, int aMaxParrallel, ArrayList<ItemStack> aOutPut) {
- int allowedParrallel = 0;
- for (final ItemStack aInput : aItemInputs) {
- if (aRecipeCatalyst.isItemEqual(aInput)) {
- int aDurabilityRemaining = getMaxCatalystDurability() - getDamage(aInput);
- return Math.min(aMaxParrallel, aDurabilityRemaining);
- }
+ public GT_Recipe findRecipe(final GT_Recipe aRecipe, final long aVoltage, final long aSpecialValue, ItemStack[] aInputs, final FluidStack[] aFluids) {
+ if (!mInitRecipeCache) {
+ initRecipeCaches();
}
- return allowedParrallel;
- }
-
- private ItemStack findCatalyst(ItemStack[] aItemInputs) {
- if (aItemInputs != null) {
- for (final ItemStack aInput : aItemInputs) {
- if (aInput != null) {
- if (ItemUtils.isCatalyst(aInput)) {
- return aInput;
+ if (this.getRecipeMap().mRecipeList.isEmpty()) {
+ log("No Recipes in Map to search through.");
+ return null;
+ }
+ else {
+ log("Checking tier "+aSpecialValue+" recipes and below. Using Input Voltage of "+aVoltage+"V.");
+ log("We have "+aInputs.length+" Items and "+aFluids.length+" Fluids.");
+ // Try check the cached recipe first
+ if (aRecipe != null) {
+ if (areInputsEqual(aRecipe, aInputs, aFluids)) {
+ if (aRecipe.mEUt <= aVoltage) {
+ Logger.INFO("Using cached recipe.");
+ return aRecipe;
}
}
}
- }
- return null;
- }
-
- private void damageCatalyst(ItemStack aStack, int parallelRecipes) {
- for (int i=0; i<parallelRecipes; i++){
- if (MathUtils.randFloat(0, 10000000)/10000000f < (1.2f - (0.2 * this.mPipeCasingTier))) {
- int damage = getDamage(aStack) + 1;
- log("damage catalyst "+damage);
- if (damage >= getMaxCatalystDurability()) {
- log("consume catalyst");
- addOutput(CI.getEmptyCatalyst(1));
- aStack = null;
- }
- else {
- log("damaging catalyst");
- setDamage(aStack, damage);
+ // Get all recipes for the tier
+ AutoMap<AutoMap<GT_Recipe>> aMasterMap = new AutoMap<AutoMap<GT_Recipe>>();
+ for (long i=0;i<=aSpecialValue;i++) {
+ aMasterMap.add(mTieredRecipeMap.get(i));
+ }
+ GT_Recipe aFoundRecipe = null;
+
+ // Iterate the tiers recipes until we find the one with all inputs matching
+ master : for (AutoMap<GT_Recipe> aTieredMap : aMasterMap) {
+ for (GT_Recipe aRecipeToCheck : aTieredMap) {
+ if (areInputsEqual(aRecipeToCheck, aInputs, aFluids)) {
+ log("Found recipe with matching inputs!");
+ if (aRecipeToCheck.mSpecialValue <= aSpecialValue) {
+ if (aRecipeToCheck.mEUt <= aVoltage) {
+ aFoundRecipe = aRecipeToCheck;
+ break master;
+ }
+ }
+ }
}
- }
- else {
- log("not consuming catalyst");
}
- }
-
-
-
- }
-
- private int getDamage(ItemStack aStack) {
- return ItemGenericChemBase.getCatalystDamage(aStack);
- }
- private void setDamage(ItemStack aStack,int aAmount) {
- ItemGenericChemBase.setCatalystDamage(aStack, aAmount);
- }
-
-
-
- @SideOnly(Side.CLIENT)
- private final int getCasingTierOnClientSide() {
-
- if (this == null || this.getBaseMetaTileEntity().getWorld() == null) {
- return 0;
- }
- try {
- Block aInitStructureCheck;
- int aInitStructureCheckMeta;
- IGregTechTileEntity aBaseMetaTileEntity = this.getBaseMetaTileEntity();
- int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX * 3;
- int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ * 3;
- if (xDir == 0) {
- aInitStructureCheck = aBaseMetaTileEntity.getBlockOffset(zDir, 1, 0);
- aInitStructureCheckMeta = aBaseMetaTileEntity.getMetaIDOffset(zDir, 1, 0);
- }
- else {
- aInitStructureCheck = aBaseMetaTileEntity.getBlockOffset(0, 1, xDir);
- aInitStructureCheckMeta = aBaseMetaTileEntity.getMetaIDOffset(0, 1, xDir);
- }
- for (int aTier : mTieredBlockRegistry.keySet()) {
- Triplet<Block, Integer, Integer> aData = mTieredBlockRegistry.get(aTier);
- if (aData.getValue_1() == aInitStructureCheck && aData.getValue_2() == aInitStructureCheckMeta) {
- return aTier;
- }
+ // If we found a recipe, return it
+ if (aFoundRecipe != null) {
+ log("Found valid recipe.");
+ return aFoundRecipe;
}
- return 0;
}
- catch (Throwable t) {
- t.printStackTrace();
- return 0;
- }
-
+ log("Did not find valid recipe.");
+ return null;
}
-
-
- */
-/*
+ /*
* Catalyst Handling
- *//*
+ */
-
-
-
@Override
- public ArrayList<ItemStack> getStoredInputs() {
+ public ArrayList<ItemStack> getStoredInputs() {
ArrayList<ItemStack> tItems = super.getStoredInputs();
- for (GT_MetaTileEntity_Hatch_ElementalDataOrbHolder tHatch : mDataHolders) {
- tHatch.mRecipeMap = getRecipeMap();
- if (isValidMetaTileEntity(tHatch)) {
- ArrayList<ItemStack> aTempList = new ArrayList();
- for (ItemStack s : tHatch.mInventory) {
- aTempList.add(s);
- }
- tItems.addAll(aTempList);
- }
- }
+ for (GT_MetaTileEntity_Hatch_ElementalDataOrbHolder tHatch : mReplicatorDataOrbHatches) {
+ tHatch.mRecipeMap = getRecipeMap();
+ if (isValidMetaTileEntity(tHatch)) {
+ tItems.addAll(tHatch.getInventory());
+ }
+ }
return tItems;
}
-
-
-
-
}
-*/
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java
index 8f4fb2f706..8a936525f0 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_FrothFlotationCell.java
@@ -26,6 +26,7 @@ import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.GTPP_Recipe;
import gtPlusPlus.core.block.ModBlocks;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.helpers.FlotationRecipeHandler;
@@ -72,7 +73,7 @@ public class GregtechMTE_FrothFlotationCell extends GregtechMeta_MultiBlockBase
.addOutputHatch("Bottom Casing", 1)
.addEnergyHatch("Bottom Casing", 1)
.addMaintenanceHatch("Bottom Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -173,20 +174,15 @@ public class GregtechMTE_FrothFlotationCell extends GregtechMeta_MultiBlockBase
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java
index acfa1e7c5a..1f6ae41be2 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMTE_NuclearReactor.java
@@ -1,46 +1,48 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production;
-import java.util.ArrayList;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+
import java.util.Collection;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
-import gregtech.api.enums.Materials;
+
import gregtech.api.enums.TAE;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.*;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GTPP_Recipe;
+import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.ELEMENT;
-import gtPlusPlus.core.material.nuclear.FLUORIDES;
import gtPlusPlus.core.material.nuclear.NUCLIDE;
import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.fluids.FluidStack;
-import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
-import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
-import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
+public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase<GregtechMTE_NuclearReactor> {
-public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase {
+ protected int mFuelRemaining = 0;
- protected int fuelConsumption = 0;
- protected int fuelValue = 0;
- protected int fuelRemaining = 0;
- protected boolean boostEu = false;
- protected boolean heliumSparging = false;
private int mCasing;
private IStructureDefinition<GregtechMTE_NuclearReactor> STRUCTURE_DEFINITION = null;
@@ -64,30 +66,36 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase {
}
@Override
+ public GT_Recipe_Map getRecipeMap() {
+ return GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes;
+ }
+
+ @Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
tt.addMachineType(getMachineType())
- .addInfo("Controller Block for the Liquid Fluoride Thorium Reactor.")
- .addInfo("Produces Heat & Energy from Radioactive Beta Decay.")
- .addInfo("Outputs U233 every 10 seconds, on average")
- .addInfo("Input Fluorine and Helium for bonus byproducts")
- .addInfo("Input Li2BeF4 and a molten salt as fuel.")
- .addInfo("LiFBeF2ThF4UF4, LiFBeF2ZrF4UF4 or LiFBeF2ZrF4U235")
- .addPollutionAmount(getPollutionPerSecond(null))
- .addSeparator()
- .beginStructureBlock(7, 4, 7, true)
- .addController("Bottom Center")
- .addCasingInfo("Hastelloy-N Reactor Casing", 27)
- .addCasingInfo("Zeron-100 Reactor Shielding", 26)
- .addInputHatch("Top or bottom layer edges", 1)
- .addOutputHatch("Top or bottom layer edges", 1)
- .addDynamoHatch("Top or bottom layer edges", 1)
- .addMaintenanceHatch("Top or bottom layer edges", 1)
- .addMufflerHatch("Top 3x3", 2)
- .addStructureInfo("All hatches must have IV+ tier.")
- .addStructureInfo("10+ Output Hatches, 4+ Input Hatches, 4x Dynamo Hatches")
- .addStructureInfo("2x Maintenance Hatches, 4x Mufflers")
- .toolTipFinisher("GT++");
+ .addInfo("Controller Block for the Liquid Fluoride Thorium Reactor.")
+ .addInfo("Produces Heat & Energy from Radioactive Beta Decay.")
+ .addInfo("Outputs U233 every 10 seconds, on average")
+ .addInfo("Input Fluorine and Helium for bonus byproducts")
+ .addInfo("Input Li2BeF4 and a molten salt as fuel.")
+ .addInfo("LiFBeF2ThF4UF4, LiFBeF2ZrF4UF4 or LiFBeF2ZrF4U235")
+ .addPollutionAmount(getPollutionPerSecond(null))
+ .addSeparator()
+ .beginStructureBlock(7, 4, 7, true)
+ .addController("Bottom Center")
+ .addCasingInfo("Hastelloy-N Reactor Casing", 27)
+ .addCasingInfo("Zeron-100 Reactor Shielding", 26)
+ .addInputHatch("Top or bottom layer edges", 1)
+ .addOutputHatch("Top or bottom layer edges", 1)
+ .addDynamoHatch("Top or bottom layer edges", 1)
+ .addMaintenanceHatch("Top or bottom layer edges", 1)
+ .addMufflerHatch("Top 3x3", 2)
+ .addStructureInfo("All dynamos must be IV or LuV tier.")
+ .addStructureInfo("All other hatches must be IV+ tier.")
+ .addStructureInfo("3x Output Hatches, 2x Input Hatches, 4x Dynamo Hatches")
+ .addStructureInfo("2x Maintenance Hatches, 4x Mufflers")
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -101,14 +109,10 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase {
tRunning,
tMaintainance,
"Current Output: "+this.mEUt+" EU/t",
- "Fuel Consumption: "+this.fuelConsumption+"L/t",
- "Fuel Value: "+this.fuelValue+" EU/L",
- "Fuel Remaining: "+this.fuelRemaining+" Litres",
+ "Fuel Remaining: "+this.mFuelRemaining+" Litres",
"Current Efficiency: "+(this.mEfficiency/5)+"%",
"Current Efficiency (Raw): "+(this.mEfficiency),
- "Boosted Output: "+this.boostEu+".",
- "Boosted Output gives 4x EU/t for double fuel usage.",
- "It requires you to have 100% Efficiency."};
+ "It requires you to have 100% Efficiency."};
}
@Override
@@ -118,14 +122,15 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase {
@Override
public ITexture[] getTexture(final IGregTechTileEntity aBaseMetaTileEntity, final byte aSide, final byte aFacing, final byte aColorIndex, final boolean aActive, final boolean aRedstone) {
- if (!aBaseMetaTileEntity.isActive() || this.mEfficiency < 500){
+ boolean aWarmedUp = this.mEfficiency == this.getMaxEfficiency(null);
+ if (!aBaseMetaTileEntity.isActive() || !aWarmedUp){
if (aSide == aFacing) {
return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12)),
new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR)};
}
return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12))};
}
- else if(aBaseMetaTileEntity.isActive() && this.mEfficiency >= 500){
+ else if(aBaseMetaTileEntity.isActive() && aWarmedUp){
if (aSide == aFacing) {
return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(13)),
new GT_RenderedTexture(aActive ? Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR_ACTIVE : Textures.BlockIcons.OVERLAY_FRONT_REPLICATOR)};
@@ -133,7 +138,7 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase {
return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(13))};
}
return new ITexture[]{Textures.BlockIcons.getCasingTextureForId(TAE.GTPP_INDEX(12))};
-
+
}
@Override
@@ -152,17 +157,13 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
- } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo && ((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity).mTier >= 5){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
+ } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo && (((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity).mTier >= 5 && ((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity).mTier <= 6)){
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input && ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mTier >= 5) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output && ((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity).mTier >= 5) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
@@ -174,8 +175,7 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler && ((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity).mTier >= 5) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
@@ -186,52 +186,51 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase {
if (STRUCTURE_DEFINITION == null) {
STRUCTURE_DEFINITION = StructureDefinition.<GregtechMTE_NuclearReactor>builder()
.addShape(mName, transpose(new String[][]{
- {"CCCCCCC", "COOOOOC", "COXXXOC", "COXXXOC", "COXXXOC", "COOOOOC", "CCCCCCC"},
- {"GGGGGGG", "G-----G", "G-----G", "G-----G", "G-----G", "G-----G", "GGGGGGG"},
- {"GGGGGGG", "G-----G", "G-----G", "G-----G", "G-----G", "G-----G", "GGGGGGG"},
- {"CCC~CCC", "COOOOOC", "COOOOOC", "COOOOOC", "COOOOOC", "COOOOOC", "CCCCCCC"},
+ {"CCCCCCC", "COOOOOC", "COXXXOC", "COXXXOC", "COXXXOC", "COOOOOC", "CCCCCCC"},
+ {"GGGGGGG", "G-----G", "G-----G", "G-----G", "G-----G", "G-----G", "GGGGGGG"},
+ {"GGGGGGG", "G-----G", "G-----G", "G-----G", "G-----G", "G-----G", "GGGGGGG"},
+ {"CCC~CCC", "COOOOOC", "COOOOOC", "COOOOOC", "COOOOOC", "COOOOOC", "CCCCCCC"},
}))
.addElement(
'C',
ofChain(
ofHatchAdder(
GregtechMTE_NuclearReactor::addNuclearReactorEdgeList, TAE.GTPP_INDEX(12), 1
- ),
+ ),
onElementPass(
x -> ++x.mCasing,
ofBlock(
ModBlocks.blockCasingsMisc, 12
+ )
)
)
)
- )
.addElement(
'X',
ofChain(
ofHatchAdder(
GregtechMTE_NuclearReactor::addNuclearReactorTopList, TAE.GTPP_INDEX(12), 2
- ),
+ ),
onElementPass(
x -> ++x.mCasing,
ofBlock(
ModBlocks.blockCasingsMisc, 12
+ )
)
)
)
-
- )
.addElement(
'O',
ofBlock(
ModBlocks.blockCasingsMisc, 12
+ )
)
- )
.addElement(
'G',
ofBlock(
ModBlocks.blockCasingsMisc, 13
+ )
)
- )
.build();
}
return STRUCTURE_DEFINITION;
@@ -246,23 +245,23 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase {
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
mCasing = 0;
if (checkPiece(mName, 3, 3, 0) && mCasing >= 27) {
- if (mOutputHatches.size() >= 10 && mInputHatches.size() >= 4 && mDynamoHatches.size() == 4 &&
+ if (mOutputHatches.size() >= 3 && mInputHatches.size() >= 2 && mDynamoHatches.size() == 4 &&
mMufflerHatches.size() == 4 && mMaintenanceHatches.size() == 2) {
- this.mWrench = true;
- this.mScrewdriver = true;
- this.mSoftHammer = true;
- this.mHardHammer = true;
- this.mSolderingTool = true;
- this.mCrowbar = true;
- this.turnCasingActive(false);
- return true;
+ this.mWrench = true;
+ this.mScrewdriver = true;
+ this.mSoftHammer = true;
+ this.mHardHammer = true;
+ this.mSolderingTool = true;
+ this.mCrowbar = true;
+ this.turnCasingActive(false);
+ return true;
}
}
return false;
}
- // Alk's Life Lessons from Greg.
- /*
+ // Alk's Life Lessons from Greg.
+ /*
[23:41:15] <GregoriusTechneticies> xdir and zdir are x2 and not x3
[23:41:26] <GregoriusTechneticies> thats you issue
[23:44:33] <Alkalus> mmm?
@@ -277,7 +276,7 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase {
[23:45:51] <Alkalus> Ahh
[23:45:57] <GregoriusTechneticies> and not 2
[23:46:06] <Alkalus> Noted, thanks :D
- */
+ */
@Override
public boolean isCorrectMachinePart(final ItemStack aStack) {
@@ -286,13 +285,12 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase {
@Override
public int getMaxEfficiency(final ItemStack aStack) {
- return this.boostEu ? 30000 : 10000;
+ return 10000;
}
@Override
- public int getPollutionPerSecond(final ItemStack aStack) {
- if (this.boostEu) return CORE.ConfigSwitches.pollutionPerSecondMultiNuclearReactor_ModeBoosted;
- return CORE.ConfigSwitches.pollutionPerSecondMultiNuclearReactor_ModeNormal;
+ public int getPollutionPerTick(final ItemStack aStack) {
+ return 0;
}
@Override
@@ -310,10 +308,6 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase {
return new GregtechMTE_NuclearReactor(this.mName);
}
- public static int overclock(final int mStartEnergy) {
- return mStartEnergy < 160000000 ? 4 : mStartEnergy < 320000000 ? 2 : 1;
- }
-
public boolean turnCasingActive(final boolean status) {
//TODO
if (this.mDynamoHatches != null) {
@@ -344,155 +338,94 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase {
return true;
}
+ public FluidStack[] getStoredFluidsAsArray() {
+ return getStoredFluids().toArray(new FluidStack[0]);
+ }
+
+ public int getStoredFuel(GT_Recipe aRecipe) {
+ int aFuelStored = 0;
+ FluidStack aFuelFluid = null;
+ for (FluidStack aFluidInput : aRecipe.mFluidInputs) {
+ if (!aFluidInput.getFluid().equals(NUCLIDE.Li2BeF4.getFluid())) {
+ aFuelFluid = aFluidInput;
+ break;
+ }
+ }
+ if (aFuelFluid != null) {
+ for (GT_MetaTileEntity_Hatch_Input aInputHatch : this.mInputHatches) {
+ if (aInputHatch.getFluid() != null && aInputHatch.getFluidAmount() > 0) {
+ if (aInputHatch.getFluid().isFluidEqual(aFuelFluid)) {
+ aFuelStored += aInputHatch.getFluidAmount();
+ }
+ }
+ }
+ }
+ return aFuelStored;
+ }
+
@Override
public boolean checkRecipe(final ItemStack aStack) {
- final ArrayList<FluidStack> tFluids = this.getStoredFluids();
- final Collection<GT_Recipe> tRecipeList = GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.mRecipeList;
- if((tFluids.size() > 0) && (tRecipeList != null)) { //Does input hatch have a LFTR fuel?
+ // Warm up for 4~ minutes
+ Logger.WARNING("Checking LFTR recipes.");
+ if (mEfficiency < this.getMaxEfficiency(null)) {
+ this.mProgresstime = 0;
+ this.mMaxProgresstime = 1;
+ this.mEfficiencyIncrease = 2;
+ Logger.WARNING("Warming Up! "+this.mEfficiency+"/"+this.getMaxEfficiency(null));
+ return true;
+ }
+ Logger.WARNING("Warmed up, checking LFTR recipes.");
+
+ final FluidStack[] tFluids = getStoredFluidsAsArray();
+ final Collection<GT_Recipe> tRecipeList = getRecipeMap().mRecipeList;
+ if(tFluids.length > 0 && tRecipeList != null && tRecipeList.size() > 0) { //Does input hatch have a LFTR fuel?
Logger.WARNING("Found more than one input fluid and a list of valid recipes.");
- for (final FluidStack hatchFluid1 : tFluids) { //Loops through hatches
- Logger.WARNING("Looping through Input hatches - Found "+hatchFluid1.getLocalizedName());
- for(final GT_Recipe aFuel : tRecipeList) { //Loops through LFTR fuel recipes
- Logger.WARNING("Looping through Recipes. "+aFuel.mSpecialValue);
- FluidStack tLiquid;
- final FluidStack testStack = aFuel.mFluidInputs[1];
- if ((tLiquid = testStack) != null) { //Create fluidstack from current recipe
- Logger.WARNING("Creating a fluidstack from the current recipe. "+testStack.getLocalizedName());
- if (hatchFluid1.isFluidEqual(tLiquid)) { //Has a LFTR fluid
- this.fuelConsumption = this.boostEu ? (aFuel.mSpecialValue/4096) : (aFuel.mSpecialValue/2048); //Calc fuel consumption
-
- this.mMaxProgresstime = 500;
-
- if(tFluids.contains(NUCLIDE.LiFBeF2ThF4UF4.getFluid(1)) ||
- tFluids.contains(NUCLIDE.LiFBeF2ZrF4UF4.getFluid(2)) ||
- tFluids.contains(NUCLIDE.LiFBeF2ZrF4U235.getFluid(10))) { //Has a Primary fuel salt?
- //Deplete Primary Salt. 1000L should = 1 hour of runtime (if baseEU = 2048) && using 1l each time
- if(((this.mRuntime % 72) == 0) || (this.mRuntime == 0)){
- //U235 fuel is 10x less efficient than UF4 with Thorium, UF4 with Zirconium is only 2x less efficient than UF4 with Thorium.
- //Most Efficient
- if(tFluids.contains(NUCLIDE.LiFBeF2ThF4UF4.getFluid(2))){
-
- FluidStack depletionStack = FluidUtils.getFluidStack(tLiquid, (this.boostEu ? (aFuel.mSpecialValue/4096) : (aFuel.mSpecialValue/2048)));
- Logger.WARNING("Input hatch contains some FLiBe Fuel, using "+this.fuelConsumption+" | "+aFuel.mSpecialValue+" | "+depletionStack.amount);
- if(this.depleteInput(depletionStack)) { //Deplete that amount
- Logger.WARNING("Depleted some FLiBe fluid");
- }
-
- this.depleteInput(NUCLIDE.LiFBeF2ThF4UF4.getFluid(this.boostEu ? 2 : 1));
- Logger.WARNING("Depleted "+(this.boostEu ? 2 : 1)+"L of LiFBeF2ThF4UF4 fluid");
- }
- //1/2 as Efficient
- if (tFluids.contains(NUCLIDE.LiFBeF2ZrF4UF4.getFluid(4))){
-
- FluidStack depletionStack = FluidUtils.getFluidStack(tLiquid, (this.boostEu ? (aFuel.mSpecialValue/4096) : (aFuel.mSpecialValue/2048)));
- Logger.WARNING("Input hatch contains some FLiBe Fuel, using "+this.fuelConsumption+" | "+aFuel.mSpecialValue+" | "+depletionStack.amount);
- if(this.depleteInput(depletionStack)) { //Deplete that amount
- Logger.WARNING("Depleted some FLiBe fluid");
- }
-
- this.depleteInput(NUCLIDE.LiFBeF2ZrF4UF4.getFluid(this.boostEu ? 4 : 2));
- Logger.WARNING("Depleted "+(this.boostEu ? 4 : 2)+"L of LiFBeF2ZrF4UF4 fluid");
- }
- //10x less Efficient.
- if (tFluids.contains(NUCLIDE.LiFBeF2ZrF4U235.getFluid(20))) {
-
- FluidStack depletionStack = FluidUtils.getFluidStack(tLiquid, (this.boostEu ? (aFuel.mSpecialValue/4096) : (aFuel.mSpecialValue/2048)));
- Logger.WARNING("Input hatch contains some FLiBe Fuel, using "+this.fuelConsumption+" | "+aFuel.mSpecialValue+" | "+depletionStack.amount);
- if(this.depleteInput(depletionStack)) { //Deplete that amount
- Logger.WARNING("Depleted some FLiBe fluid");
- }
-
- this.depleteInput(NUCLIDE.LiFBeF2ZrF4U235.getFluid(this.boostEu ? 20 : 10));
- Logger.WARNING("Depleted "+(this.boostEu ? 20 : 10)+"L of LiFBeF2ZrF4U235 fluid");
- }
- }
- } else {
- return false;
- }
-
-
- if (this.getBaseMetaTileEntity().getWorld().getTotalWorldTime() % 100 == 0) {
- //Try Sparge Noble Gases
- if (this.heliumSparging){
- if (this.depleteInput(Materials.Helium.getGas(1000L))){
- //Make an empty fluid stack for possible sparging output
- FluidStack[] spargeOutput = new FluidStack[]{};
- Logger.WARNING("Doing a Sparge with Helium - "+this.heliumSparging);
- this.heliumSparging = false;
- spargeOutput = this.getByproductsOfSparge(Materials.Helium.getGas(1000L));
-
- //If Sparging occurred, try add the outputs to the output hatches.
- try {
- if (spargeOutput.length >= 1){
- for (final FluidStack F : spargeOutput){
- Logger.WARNING("Adding Sparge Output - "+F.getLocalizedName());
- this.addOutput(F);
- }
- }
- } catch (final Throwable T){}
- }
- }
- //Try Sparge Fluorides
- else {
- if (this.depleteInput(Materials.Fluorine.getGas(100L))){
- //Make an empty fluid stack for possible sparging output
- FluidStack[] spargeOutput = new FluidStack[]{};
- Logger.WARNING("Doing a Sparge with Fluorine");
- spargeOutput = this.getByproductsOfSparge(Materials.Fluorine.getGas(100L));
- this.heliumSparging = true;
- //If Sparging occurred, try add the outputs to the output hatches.
- if (spargeOutput.length > 0){
- for (final FluidStack F : spargeOutput){
- Logger.WARNING("Adding Sparge Output - "+F.getLocalizedName());
- this.addOutput(F);
- }
- }
- }
- }
- }
-
-
- if (aFuel != null){
- //Utils.LOG_WARNING("Saving previous Recipe.");
- //this.mLastRecipe = aFuel;
- }
-
- this.fuelValue = aFuel.mSpecialValue;
- this.fuelRemaining = hatchFluid1.amount; //Record available fuel
-
- if (this.mEfficiency < 500){
- this.mEfficiency++;
- this.mMaxProgresstime = 500;
- }
- else if (this.mEfficiency == 500) {
- this.mMaxProgresstime = 300;
- }
- else if (this.mEfficiency > 500){
- this.mEfficiency = 500;
- }
- Logger.WARNING("Efficiency == "+this.mEfficiency);
-
- this.mEUt = (this.mEfficiency < 500 ? 2048 : (8196)); //Output 0 if startup is less than 20%
- Logger.WARNING("Generating "+this.mEUt+"EU/t @ an efficiency level of "+this.mEfficiency);
-
- this.mProgresstime = 1;
- this.mMaxProgresstime = 1;
- this.mEfficiencyIncrease = 15;
-
- //Best output some Fluids
- //this.mOutputFluids = this.mLastRecipe.mFluidOutputs;
-
- return true;
- }
- }
- }
- }
+ // Find a valid recipe
+ GT_Recipe aFuelProcessing = this.findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, 0, tFluids, new ItemStack[] {});
+ if (aFuelProcessing == null) {
+ Logger.WARNING("Did not find valid recipe for given inputs.");
+ return false;
+ }
+ else {
+ Logger.WARNING("Found recipe? "+(aFuelProcessing != null ? "true" : "false"));
+ for (FluidStack aFluidInput : aFuelProcessing.mFluidInputs) {
+ Logger.WARNING("Using "+aFluidInput.getLocalizedName());
+ }
+ }
+ // Reset outputs and progress stats
+ this.mEUt = 0;
+ this.mMaxProgresstime = 0;
+ this.mOutputItems = new ItemStack[]{};
+ this.mOutputFluids = new FluidStack[]{};
+ this.mLastRecipe = aFuelProcessing;
+ // Deplete Inputs
+ if (aFuelProcessing.mFluidInputs.length > 0) {
+ for (FluidStack aInputToConsume : aFuelProcessing.mFluidInputs) {
+ Logger.WARNING("Depleting "+aInputToConsume.getLocalizedName()+" - "+aInputToConsume.amount+"L");
+ this.depleteInput(aInputToConsume);
+ }
+ }
+ // -- Try not to fail after this point - inputs have already been consumed! --
+ this.mMaxProgresstime = (int)(aFuelProcessing.mDuration);
+ this.mEUt = aFuelProcessing.mSpecialValue * 4;
+ Logger.WARNING("Outputting "+this.mEUt+"eu/t");
+ this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ this.mEfficiencyIncrease = 10000;
+ this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
+ Logger.WARNING("Recipe time: "+this.mMaxProgresstime);
+ mFuelRemaining = getStoredFuel(aFuelProcessing); //Record available fuel
+
+ this.mOutputFluids = aFuelProcessing.mFluidOutputs.clone();
+ updateSlots();
+ Logger.WARNING("Recipe Good!");
+ return true;
}
this.mEUt = 0;
this.mEfficiency = 0;
+ Logger.WARNING("Recipe Bad!");
return false;
}
-
+
@Override
public int getMaxParallelRecipes() {
return 1;
@@ -503,10 +436,6 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase {
return 0;
}
- public int getAmountOfOutputs() {
- return 10;
- }
-
@Override
public void explodeMultiblock() {
this.mInventory[1] = null;
@@ -547,86 +476,48 @@ public class GregtechMTE_NuclearReactor extends GregtechMeta_MultiBlockBase {
this.getBaseMetaTileEntity().doExplosion(explodevalue);
}
-
- protected FluidStack[] getByproductsOfSparge(final FluidStack spargeGas){
- FluidStack[] outputArrayOfGases = new FluidStack[]{};
- if (spargeGas != null){
- if (spargeGas.isFluidEqual(Materials.Helium.getGas(1000))){
- final int outputChances[] = {
- MathUtils.roundToClosestInt(MathUtils.randInt(10, 1000)/10),
- MathUtils.roundToClosestInt(MathUtils.randInt(10, 600)/10),
- MathUtils.roundToClosestInt(MathUtils.randInt(10, 400)/10),
- MathUtils.roundToClosestInt(MathUtils.randInt(10, 1000)/10),
- MathUtils.roundToClosestInt(MathUtils.randInt(10, 100)/10)
- };
- final int heliumContent = (1000-outputChances[0]-outputChances[1]-outputChances[2]-outputChances[3]-outputChances[4]);
- Logger.WARNING("Helium remaining: "+heliumContent);
- outputArrayOfGases = new FluidStack[]{
- ELEMENT.getInstance().XENON.getFluid(outputChances[0]),
- ELEMENT.getInstance().NEON.getFluid(outputChances[1]),
- ELEMENT.getInstance().ARGON.getFluid(outputChances[2]),
- ELEMENT.getInstance().KRYPTON.getFluid(outputChances[3]),
- ELEMENT.getInstance().RADON.getFluid(outputChances[4]),
- Materials.Helium.getGas(heliumContent)
- };
- }
- else if (spargeGas.isFluidEqual(Materials.Fluorine.getGas(100))){
- final int outputChances[] = {
- MathUtils.roundToClosestInt(MathUtils.randDouble(10, 100)),
- MathUtils.roundToClosestInt(MathUtils.randDouble(1, 50)/10),
- MathUtils.roundToClosestInt(MathUtils.randDouble(1, 50)/10),
- MathUtils.roundToClosestInt(MathUtils.randDouble(1, 50)/10)
- };
- final int fluorineContent = (100-outputChances[0]-outputChances[1]-outputChances[2]-outputChances[3]);
- Logger.WARNING("Fluorine remaining: "+fluorineContent);
- outputArrayOfGases = new FluidStack[]{
- FLUORIDES.LITHIUM_FLUORIDE.getFluid(outputChances[0]),
- FLUORIDES.NEPTUNIUM_HEXAFLUORIDE.getFluid(outputChances[1]),
- FLUORIDES.TECHNETIUM_HEXAFLUORIDE.getFluid(outputChances[2]),
- FLUORIDES.SELENIUM_HEXAFLUORIDE.getFluid(outputChances[3]),
- Materials.Fluorine.getGas(fluorineContent)
- };
- }
- }
- return outputArrayOfGases;
- }
-
@Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
- //Add Power if active
- if (aBaseMetaTileEntity.isActive()){
- //this.getBaseMetaTileEntity().increaseStoredEnergyUnits(this.mEUt, false);
-
- if (this.mEfficiency >= 500){
- this.boostEu = true;
- this.turnCasingActive(true);
+ if (aBaseMetaTileEntity.getWorld().isRemote) {
+ if (aBaseMetaTileEntity.isActive()){
+ // Set casings active if we're warmed up.
+ if (this.mEfficiency == this.getMaxEfficiency(null)){
+ this.turnCasingActive(true);
+ }
+ else {
+ this.turnCasingActive(false);
+ }
}
else {
- this.boostEu = false;
this.turnCasingActive(false);
}
-
- if (MathUtils.randInt(1, 200) == 1){
- //Utils.LOG_INFO("Adding U233");
- this.addOutput(ELEMENT.getInstance().URANIUM233.getFluid(MathUtils.randInt(1, 10)));
- }
-
- if (this.mDynamoHatches != null) {
- for (GT_MetaTileEntity_Hatch_Dynamo tHatch : this.mDynamoHatches) {
- if (tHatch.mTier >= 5){
- if (isValidMetaTileEntity(tHatch)){
- tHatch.getBaseMetaTileEntity().increaseStoredEnergyUnits(this.mEUt, false);
- //Utils.LOG_WARNING("Adding "+this.mEUt+"eu to internal storage of dynamo "+hatchNo+".");
- }
- }
- }
+ }
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+ }
+
+ @Override
+ public boolean onRunningTick(ItemStack aStack) {
+ // See if we're warmed up.
+ if (this.mEfficiency == this.getMaxEfficiency(null)){
+ // Try output some Uranium-233
+ if (MathUtils.randInt(1, 300) == 1){
+ this.addOutput(ELEMENT.getInstance().URANIUM233.getFluidStack(MathUtils.randInt(1, 10)));
}
}
- else {
- this.turnCasingActive(false);
- }
- super.onPostTick(aBaseMetaTileEntity, aTick);
+ return super.onRunningTick(aStack);
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ aNBT.setInteger("mFuelRemaining", this.mFuelRemaining);
+ super.saveNBTData(aNBT);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ this.mFuelRemaining = aNBT.getInteger("mFuelRemaining");
+ super.loadNBTData(aNBT);
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java
index db922e0841..cccee84c99 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityGeneratorArray.java
@@ -22,6 +22,7 @@ import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.GTPP_Recipe;
import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
@@ -72,7 +73,7 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc
.addOutputHatch("Any Casing", 1)
.addDynamoHatch("Any casing", 1)
.addMaintenanceHatch("Any casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -364,23 +365,17 @@ public class GregtechMetaTileEntityGeneratorArray extends GregtechMeta_MultiBloc
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java
index 4fd39740a1..83b8eae458 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java
@@ -89,7 +89,7 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase
.addEnergyHatch("Any casing", 1)
.addMaintenanceHatch("Any casing", 1)
.addMufflerHatch("Any casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java
index b36e32d092..c84c5e162e 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_AlloyBlastSmelter.java
@@ -81,7 +81,7 @@ extends GregtechMeta_MultiBlockBase {
.addEnergyHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -137,23 +137,17 @@ extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java
index d8e91a3170..ecd4882516 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Cyclotron.java
@@ -202,23 +202,17 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus && ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mTier >= 5){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy && ((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity).mTier >= 5){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus && ((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity).mTier >= 5) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler && ((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity).mTier >= 5) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input && ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mTier >= 5) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
@@ -264,7 +258,7 @@ public class GregtechMetaTileEntity_Cyclotron extends GregtechMeta_MultiBlockBas
.addEnergyHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java
index 50ae499ff7..80eb09640d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_IndustrialFishingPond.java
@@ -85,7 +85,7 @@ public class GregtechMetaTileEntity_IndustrialFishingPond extends GregtechMeta_M
.addEnergyHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -129,23 +129,17 @@ public class GregtechMetaTileEntity_IndustrialFishingPond extends GregtechMeta_M
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java
index 13240c78e2..d9162cea89 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeRocketEngine.java
@@ -18,6 +18,7 @@ import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GTPP_Recipe;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.item.chemistry.RocketFuels;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.MISC_MATERIALS;
import gtPlusPlus.core.util.minecraft.FluidUtils;
@@ -36,7 +37,7 @@ import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
-public class GregtechMetaTileEntity_LargeRocketEngine extends GregtechMeta_MultiBlockBase
+public class GregtechMetaTileEntity_LargeRocketEngine extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_LargeRocketEngine>
{
protected int fuelConsumption;
protected int fuelValue;
@@ -56,8 +57,6 @@ public class GregtechMetaTileEntity_LargeRocketEngine extends GregtechMeta_Multi
private IStructureDefinition<GregtechMetaTileEntity_LargeRocketEngine> STRUCTURE_DEFINITION = null;
private final static int CASING_ID = TAE.getIndexFromPage(3, 11);
-
- public ArrayList<GT_MetaTileEntity_Hatch> mAllDynamoHatches = new ArrayList<GT_MetaTileEntity_Hatch>();
public GregtechMetaTileEntity_LargeRocketEngine(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
@@ -115,7 +114,7 @@ public class GregtechMetaTileEntity_LargeRocketEngine extends GregtechMeta_Multi
.addMaintenanceHatch("Side center line", 1)
.addDynamoHatch("Top center line", 2)
.addMufflerHatch("Back Center", 3)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -199,15 +198,12 @@ public class GregtechMetaTileEntity_LargeRocketEngine extends GregtechMeta_Multi
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mAllDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} if (LoadedMods.TecTech) {
if (isThisHatchMultiDynamo(aMetaTileEntity)) {
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mAllDynamoHatches.add((GT_MetaTileEntity_Hatch) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
}
@@ -220,17 +216,13 @@ public class GregtechMetaTileEntity_LargeRocketEngine extends GregtechMeta_Multi
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_AirIntake) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mAirIntakes.add(aMetaTileEntity) && this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
@@ -242,8 +234,7 @@ public class GregtechMetaTileEntity_LargeRocketEngine extends GregtechMeta_Multi
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
@@ -274,8 +265,7 @@ public class GregtechMetaTileEntity_LargeRocketEngine extends GregtechMeta_Multi
else {
int totalAir = 0;
FluidStack airstack = FluidUtils.getFluidStack("air", 1);
- for (Object U : this.mAirIntakes) {
- GT_MetaTileEntity_Hatch_AirIntake u = (GT_MetaTileEntity_Hatch_AirIntake) U;
+ for (GT_MetaTileEntity_Hatch_AirIntake u : this.mAirIntakes) {
if (u != null && u.mFluid != null) {
// had this trow errors cousing the machine to stop probebly fixed
FluidStack f = u.mFluid;
@@ -317,7 +307,7 @@ public class GregtechMetaTileEntity_LargeRocketEngine extends GregtechMeta_Multi
if (tFluids.size() > 0 && tRecipeList != null) {
- if (tFluids.contains(MISC_MATERIALS.CARBON_DIOXIDE.getFluid(this.boostEu ? 3 : 1)) || tFluids.contains(FluidUtils.getFluidStack("carbondioxide", (this.boostEu ? 3 : 1)))) {
+ if (tFluids.contains(MISC_MATERIALS.CARBON_DIOXIDE.getFluidStack(this.boostEu ? 3 : 1)) || tFluids.contains(FluidUtils.getFluidStack("carbondioxide", (this.boostEu ? 3 : 1)))) {
if (this.mRuntime % 72 == 0 || this.mRuntime == 0) {
if (!consumeCO2()) {
freeFuelTicks = 0;
@@ -420,7 +410,7 @@ public class GregtechMetaTileEntity_LargeRocketEngine extends GregtechMeta_Multi
}
public boolean consumeCO2() {
- if (this.depleteInput(MISC_MATERIALS.CARBON_DIOXIDE.getFluid(this.boostEu ? 3 : 1)) || this.depleteInput(FluidUtils.getFluidStack("carbondioxide", (this.boostEu ? 3 : 1)))) {
+ if (this.depleteInput(MISC_MATERIALS.CARBON_DIOXIDE.getFluidStack(this.boostEu ? 3 : 1)) || this.depleteInput(FluidUtils.getFluidStack("carbondioxide", (this.boostEu ? 3 : 1)))) {
return true;
}
else {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java
index 3860d27706..9be787e922 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_LargeSemifluidGenerator.java
@@ -67,7 +67,7 @@ public class GregtechMetaTileEntity_LargeSemifluidGenerator extends GregtechMeta
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
.addDynamoHatch("Back Center", 2)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -213,14 +213,11 @@ public class GregtechMetaTileEntity_LargeSemifluidGenerator extends GregtechMeta
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
@@ -231,9 +228,8 @@ public class GregtechMetaTileEntity_LargeSemifluidGenerator extends GregtechMeta
return false;
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
- if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo)aMetaTileEntity);
+ if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo || this.isThisHatchMultiDynamo(aTileEntity)){
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java
index 4d9df7deea..f016288547 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_MassFabricator.java
@@ -121,7 +121,7 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
.addEnergyHatch("Any Casing", 1)
.addMaintenanceHatch("Any Casing", 1)
.addMufflerHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -239,26 +239,19 @@ public class GregtechMetaTileEntity_MassFabricator extends GregtechMeta_MultiBlo
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java
index 9f21154707..f86ecf3196 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntity_Refinery.java
@@ -58,10 +58,10 @@ public class GregtechMetaTileEntity_Refinery extends GregtechMeta_MultiBlockBase
.addMufflerHatch("Base platform", 1)
.addMaintenanceHatch("Base platform", 1)
.addEnergyHatch("Base platform", 1)
- .addStructureInfo("Muffler's Tier must be ZPM/ZPM+")
+ .addStructureInfo("Muffler's Tier must be LuV+")
.addStructureInfo("4x Input Hatches, 2x Output Hatches, 1x Output Bus")
.addStructureInfo("1x Muffler, 1x Maintenance Hatch, 1x Energy Hatch")
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -115,23 +115,17 @@ public class GregtechMetaTileEntity_Refinery extends GregtechMeta_MultiBlockBase
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
- } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler && ((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity).mTier >= 7) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mMufflerHatches.add((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
+ } else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Muffler && ((GT_MetaTileEntity_Hatch_Muffler) aMetaTileEntity).mTier >= 6) {
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java
index c06f764bfe..4759457d8d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/algae/GregtechMTE_AlgaePondBase.java
@@ -28,6 +28,7 @@ import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.item.chemistry.AgriculturalChem;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
@@ -85,7 +86,7 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase {
.addInputBus("Any Casing", 1)
.addOutputBus("Any Casing", 1)
.addInputHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -154,14 +155,11 @@ public class GregtechMTE_AlgaePondBase extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
- ((GT_MetaTileEntity_Hatch) aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java
index 5edff05e48..42912c4fa8 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/chemplant/GregtechMTE_ChemicalPlant.java
@@ -1,6 +1,8 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.chemplant;
-import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls;
@@ -8,14 +10,12 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
+import org.apache.commons.lang3.ArrayUtils;
+
import com.gtnewhorizon.structurelib.StructureLibAPI;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.IStructureElement;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
-import gregtech.api.metatileentity.implementations.*;
-import gregtech.api.util.*;
-import net.minecraft.world.World;
-import org.apache.commons.lang3.ArrayUtils;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
@@ -24,7 +24,19 @@ import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_OutputBus;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
import gregtech.api.objects.GT_RenderedTexture;
+import gregtech.api.util.GTPP_Recipe;
+import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.data.AutoMap;
import gtPlusPlus.api.objects.data.Triplet;
@@ -39,6 +51,7 @@ import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
@@ -115,7 +128,7 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase {
.addOutputHatch("Bottom Casing", 1)
.addEnergyHatch("Bottom Casing", 1)
.addMaintenanceHatch("Bottom Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -354,24 +367,24 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase {
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Catalysts){
- return addToMachineListInternal(mCatalystBuses, aMetaTileEntity, aBaseCasingIndex);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_InputBus){
maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_InputBus) aMetaTileEntity).mTier);
- return this.mInputBusses.add((GT_MetaTileEntity_Hatch_InputBus)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Maintenance){
- return this.mMaintenanceHatches.add((GT_MetaTileEntity_Hatch_Maintenance)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy){
maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_Energy) aMetaTileEntity).mTier);
- return this.mEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_OutputBus) {
maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity).mTier);
- return this.mOutputBusses.add((GT_MetaTileEntity_Hatch_OutputBus) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Input) {
maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity).mTier);
- return this.mInputHatches.add((GT_MetaTileEntity_Hatch_Input) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Output) {
maxTierOfHatch = Math.max(maxTierOfHatch, ((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity).mTier);
- return this.mOutputHatches.add((GT_MetaTileEntity_Hatch_Output) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
return false;
@@ -414,7 +427,7 @@ public class GregtechMTE_ChemicalPlant extends GregtechMeta_MultiBlockBase {
}
public static void generateRecipes() {
- for (GTPP_Recipe i : GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlantRecipes.mRecipeList) {
+ for (GT_Recipe i : GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlantRecipes.mRecipeList) {
GTPP_Recipe.GTPP_Recipe_Map.sChemicalPlant_GT.add(i);
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java
index b09c5e611b..a90c962cae 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/storage/GregtechMetaTileEntity_PowerSubStationController.java
@@ -1,18 +1,25 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.storage;
-import java.util.ArrayList;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.onElementPass;
+import static com.gtnewhorizon.structurelib.structure.StructureUtility.transpose;
+import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
import com.gtnewhorizon.structurelib.StructureLibAPI;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.IStructureElement;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
+
import gregtech.api.enums.TAE;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.*;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Dynamo;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Energy;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Utility;
@@ -37,11 +44,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
-import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
-import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
-import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
-
-public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMeta_MultiBlockBase {
+public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMeta_MultiBlockBase<GregtechMetaTileEntity_PowerSubStationController> {
protected long mAverageEuUsage = 0;
protected long mTotalEnergyAdded = 0;
@@ -56,10 +59,6 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMe
private int[] cellCount = new int[6];
private IStructureDefinition<GregtechMetaTileEntity_PowerSubStationController> STRUCTURE_DEFINITION = null;
- //TecTech Support
- public ArrayList<GT_MetaTileEntity_Hatch> mAllEnergyHatches = new ArrayList<GT_MetaTileEntity_Hatch>();
- public ArrayList<GT_MetaTileEntity_Hatch> mAllDynamoHatches = new ArrayList<GT_MetaTileEntity_Hatch>();
-
public GregtechMetaTileEntity_PowerSubStationController(final int aID, final String aName, final String aNameRegional) {
super(aID, aName, aNameRegional);
}
@@ -89,7 +88,7 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMe
.addCasingInfo("Sub-Station External Casings", 10)
.addDynamoHatch("Any Casing", 1)
.addEnergyHatch("Any Casing", 1)
- .toolTipFinisher("GT++");
+ .toolTipFinisher(CORE.GT_Tooltip_Builder);
return tt;
}
@@ -345,18 +344,14 @@ public class GregtechMetaTileEntity_PowerSubStationController extends GregtechMe
} else {
IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity();
if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Energy) {
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mAllEnergyHatches.add((GT_MetaTileEntity_Hatch_Energy)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (aMetaTileEntity instanceof GT_MetaTileEntity_Hatch_Dynamo) {
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mAllDynamoHatches.add((GT_MetaTileEntity_Hatch_Dynamo)aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} if (LoadedMods.TecTech) {
if (isThisHatchMultiDynamo(aMetaTileEntity)) {
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mAllDynamoHatches.add((GT_MetaTileEntity_Hatch) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
} else if (isThisHatchMultiEnergy(aMetaTileEntity)) {
- ((GT_MetaTileEntity_Hatch)aMetaTileEntity).updateTexture(aBaseCasingIndex);
- return this.mAllEnergyHatches.add((GT_MetaTileEntity_Hatch) aMetaTileEntity);
+ return addToMachineList(aTileEntity, aBaseCasingIndex);
}
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java
index e6d825ea8f..a3c11d486b 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_ConnectableCrate.java
@@ -19,6 +19,7 @@ import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.data.AutoMap;
import gtPlusPlus.api.objects.minecraft.BlockPos;
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.data.ArrayUtils;
import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_SuperChest;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_SuperChest;
@@ -73,6 +74,13 @@ public class GT_MetaTileEntity_ConnectableCrate extends GT_MetaTileEntity_Tiered
public GT_MetaTileEntity_ConnectableCrate(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
super(aName, aTier, 3, aDescription, aTextures);
}
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{
+ this.mDescription,
+ CORE.GT_Tooltip};
+ }
public boolean isSimpleMachine() {
return true;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredChest.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredChest.java
index bb46a0060d..951b4223dc 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredChest.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredChest.java
@@ -12,7 +12,7 @@ import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_TieredMachineBlock;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Utility;
-
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_SuperChest;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_SuperChest;
@@ -33,6 +33,13 @@ public class GT_MetaTileEntity_TieredChest extends GT_MetaTileEntity_TieredMachi
/*public GT_MetaTileEntity_TieredChest(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
super(aName, aTier, 3, aDescription, aTextures);
}*/
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{
+ this.mDescription,
+ CORE.GT_Tooltip};
+ }
public boolean isSimpleMachine() {
return true;
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java
index ad9876bcf0..ef7fe829d4 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GT_MetaTileEntity_TieredTank.java
@@ -29,13 +29,13 @@ public class GT_MetaTileEntity_TieredTank extends GT_MetaTileEntity_BasicTank {
public String[] getDescription() {
String[] aTip;
- String aTankPortableness = CORE.GTNH ? "non-portable" : "portable";
+ String aTankPortableness = "portable";
if (this.mFluid == null) {
- aTip = new String[] {this.mDescription, "A "+aTankPortableness+" tank."};
+ aTip = new String[] {this.mDescription, "A "+aTankPortableness+" tank.", CORE.GT_Tooltip};
}
else {
- aTip = new String[] {this.mDescription, "A "+aTankPortableness+" tank.", "Fluid: "+mFluid.getLocalizedName()+" "+mFluid.amount+"L"};
+ aTip = new String[] {this.mDescription, "A "+aTankPortableness+" tank.", "Fluid: "+mFluid.getLocalizedName()+" "+mFluid.amount+"L", CORE.GT_Tooltip};
}
return aTip;
}
@@ -146,7 +146,7 @@ public class GT_MetaTileEntity_TieredTank extends GT_MetaTileEntity_BasicTank {
@Override
public void setItemNBT(NBTTagCompound aNBT) {
- if (CORE.NBT_PERSISTENCY_PATCH_APPLIED && !CORE.GTNH) {
+ if (CORE.NBT_PERSISTENCY_PATCH_APPLIED) {
if (mFluid != null){
Logger.WARNING("Setting item fluid nbt");
aNBT.setTag("mFluid", mFluid.writeToNBT(new NBTTagCompound()));
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java
index 4f0197c060..320e2175b0 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaEnergyBuffer.java
@@ -38,7 +38,11 @@ public class GregtechMetaEnergyBuffer extends GregtechMetaTileEntity {
@Override
public String[] getDescription() {
- return new String[] {this.mDescription, "Defaults 4A In/Out", "Change output Amperage with a screwdriver", "Now Portable!"};
+ return new String[] {this.mDescription,
+ "Defaults 4A In/Out",
+ "Change output Amperage with a screwdriver",
+ "Now Portable!",
+ CORE.GT_Tooltip};
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java
index b52ed040f4..63042d4702 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/GregtechMetaSafeBlock.java
@@ -16,11 +16,6 @@ import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.machines
public class GregtechMetaSafeBlock
extends GregtechMetaSafeBlockBase {
- @Override
- public String[] getDescription() {
- return new String[] {this.mDescription};
- }
-
public GregtechMetaSafeBlock(final int aID, final String aName, final String aNameRegional, final int aTier) {
super(aID, aName, aNameRegional, aTier, 28, "Protecting your items from sticky fingers.");
}
@@ -32,6 +27,13 @@ extends GregtechMetaSafeBlockBase {
public GregtechMetaSafeBlock(final String aName, final int aTier, final int aInvSlotCount, final String aDescription, final ITexture[][][] aTextures) {
super(aName, aTier, aInvSlotCount, aDescription, aTextures);
}
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{
+ this.mDescription,
+ CORE.GT_Tooltip};
+ }
@Override
public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/creative/GT_MetaTileEntity_InfiniteItemHolder.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/creative/GT_MetaTileEntity_InfiniteItemHolder.java
index 529a0b79f6..fb37f33055 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/creative/GT_MetaTileEntity_InfiniteItemHolder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/storage/creative/GT_MetaTileEntity_InfiniteItemHolder.java
@@ -7,7 +7,7 @@ import net.minecraft.item.ItemStack;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-
+import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.core.util.sys.KeyboardUtils;
import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest;
@@ -21,6 +21,13 @@ public class GT_MetaTileEntity_InfiniteItemHolder extends GT_MetaTileEntity_Tier
public GT_MetaTileEntity_InfiniteItemHolder(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
}
+
+ @Override
+ public String[] getDescription() {
+ return new String[]{
+ this.mDescription,
+ CORE.GT_Tooltip};
+ }
@Override
public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngelGrinder.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java
index 905164802c..27f118e363 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngelGrinder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_AngleGrinder.java
@@ -26,7 +26,7 @@ import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IChatComponent;
import net.minecraftforge.event.world.BlockEvent;
-public class TOOL_Gregtech_AngelGrinder
+public class TOOL_Gregtech_AngleGrinder
extends GT_Tool {
public static final List<String> mEffectiveList = Arrays.asList(new String[]{EntityIronGolem.class.getName(), "EntityTowerGuardian"});
@@ -162,7 +162,7 @@ extends GT_Tool {
}
public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return !aIsToolHead
+ return aIsToolHead
? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa
: Materials.TungstenSteel.mRGBa;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java
index 3da1763634..2277ce339f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricSnips.java
@@ -1,6 +1,7 @@
package gtPlusPlus.xmod.gregtech.common.tools;
import gregtech.GT_Mod;
+import gregtech.api.enums.Materials;
import gregtech.api.enums.Textures.ItemIcons;
import gregtech.api.interfaces.IIconContainer;
import gregtech.api.items.GT_MetaGenerated_Tool;
@@ -70,9 +71,9 @@ extends GT_Tool_WireCutter {
}
public short[] getRGBa(boolean aIsToolHead, ItemStack aStack) {
- return !aIsToolHead
+ return aIsToolHead
? GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa
- : GT_MetaGenerated_Tool.getPrimaryMaterial(aStack).mRGBa;
+ : Materials.TungstenSteel.mRGBa;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java
index 9e00ada163..9e58d486d3 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_BlastSmelter.java
@@ -131,13 +131,13 @@ public class RecipeGen_BlastSmelter extends RecipeGen_Base {
//Generate Recipes for all singular materials that can be made molten.
if (hasMoreInputThanACircuit){
if (M.requiresBlastFurnace()) {
- if (CORE.RA.addBlastSmelterRecipe(tItemStackTest, M.getFluid(fluidAmount), 100, (duration/(mTotalPartsCounter > 0 ? mTotalPartsCounter : 1)), (int) aVoltage)){
+ if (CORE.RA.addBlastSmelterRecipe(tItemStackTest, M.getFluidStack(fluidAmount), 100, (duration/(mTotalPartsCounter > 0 ? mTotalPartsCounter : 1)), (int) aVoltage)){
Logger.WARNING("[BAS] Success.");
Logger.WARNING("[BAS] Success, Also added a Fluid solidifier recipe.");
- if (GT_Values.RA.addFluidExtractionRecipe(M.getIngot(1), null, M.getFluid(144), 100, duration, 120)){
+ if (GT_Values.RA.addFluidExtractionRecipe(M.getIngot(1), null, M.getFluidStack(144), 100, duration, 120)){
Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
- if (GT_Values.RA.addFluidExtractionRecipe(M.getNugget(1), null, M.getFluid(16), 100, duration/9, 120)){
+ if (GT_Values.RA.addFluidExtractionRecipe(M.getNugget(1), null, M.getFluidStack(16), 100, duration/9, 120)){
Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
/*if (GT_Values.RA.addFluidExtractionRecipe(M.getSmallDust(1), null, M.getFluid(36), 100, duration/4, 120)){
@@ -153,14 +153,14 @@ public class RecipeGen_BlastSmelter extends RecipeGen_Base {
}
}
else {
- if (CORE.RA.addBlastSmelterRecipe(tItemStackTest, M.getFluid(fluidAmount), 100, duration/(mTotalPartsCounter > 0 ? mTotalPartsCounter : 1)/2, (int) aVoltage)){
+ if (CORE.RA.addBlastSmelterRecipe(tItemStackTest, M.getFluidStack(fluidAmount), 100, duration/(mTotalPartsCounter > 0 ? mTotalPartsCounter : 1)/2, (int) aVoltage)){
Logger.WARNING("[BAS] Success.");
- if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0), M.getFluid(144), M.getIngot(1), duration/2, 60)){
+ if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0), M.getFluidStack(144), M.getIngot(1), duration/2, 60)){
Logger.WARNING("[BAS] Success, Also added a Fluid solidifier recipe.");
- if (GT_Values.RA.addFluidExtractionRecipe(M.getIngot(1), null, M.getFluid(144), 100, duration/2, 60)){
+ if (GT_Values.RA.addFluidExtractionRecipe(M.getIngot(1), null, M.getFluidStack(144), 100, duration/2, 60)){
Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
- if (GT_Values.RA.addFluidExtractionRecipe(M.getNugget(1), null, M.getFluid(16), 100, duration/2/9, 60)){
+ if (GT_Values.RA.addFluidExtractionRecipe(M.getNugget(1), null, M.getFluidStack(16), 100, duration/2/9, 60)){
Logger.WARNING("[BAS] Success, Also added a Fluid Extractor recipe.");
}
/*if (GT_Values.RA.addFluidExtractionRecipe(M.getSmallDust(1), null, M.getFluid(36), 100, duration/2/4, 60)){
@@ -212,7 +212,7 @@ public class RecipeGen_BlastSmelter extends RecipeGen_Base {
final int xr = r;
if ((xr > 0) && (xr <= 100)){
final int mathmatics = (r*1000);
- componentsFluid = FluidUtils.getFluidStack(M.getComposites().get(irc).getStackMaterial().getFluid(mathmatics), mathmatics);
+ componentsFluid = FluidUtils.getFluidStack(M.getComposites().get(irc).getStackMaterial().getFluidStack(mathmatics), mathmatics);
}
}
else {
@@ -254,7 +254,7 @@ public class RecipeGen_BlastSmelter extends RecipeGen_Base {
//Adds Recipe
if (M.requiresBlastFurnace()) {
- if (CORE.RA.addBlastSmelterRecipe(components, componentsFluid, M.getFluid(fluidAmount), 100, duration, (int) aVoltage)){
+ if (CORE.RA.addBlastSmelterRecipe(components, componentsFluid, M.getFluidStack(fluidAmount), 100, duration, (int) aVoltage)){
Logger.WARNING("[BAS] Success.");
}
else {
@@ -262,7 +262,7 @@ public class RecipeGen_BlastSmelter extends RecipeGen_Base {
}
}
else {
- if (CORE.RA.addBlastSmelterRecipe(components, componentsFluid, M.getFluid(fluidAmount), 100, duration, (int) aVoltage/2)){
+ if (CORE.RA.addBlastSmelterRecipe(components, componentsFluid, M.getFluidStack(fluidAmount), 100, duration, (int) aVoltage/2)){
Logger.WARNING("[BAS] Success.");
}
else {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
index a346464eeb..24c8eb488f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
@@ -38,71 +38,72 @@ public class RecipeGen_DustGeneration extends RecipeGen_Base {
this.toGenerate = M;
this.disableOptional = O;
mRecipeGenMap.add(this);
- }
-
- @Override
- public void run() {
- generateRecipes(this.toGenerate, this.disableOptional);
- }
-
- private void generateRecipes(final Material material, final boolean disableOptional){
-
- Logger.WARNING("Generating Shaped Crafting recipes for "+material.getLocalizedName());
-
- final ItemStack normalDust = material.getDust(1);
- final ItemStack smallDust = material.getSmallDust(1);
- final ItemStack tinyDust = material.getTinyDust(1);
-
- final ItemStack[] inputStacks = material.getMaterialComposites();
- final ItemStack outputStacks = material.getDust(material.smallestStackSizeWhenProcessing);
-
-
- if (ItemUtils.checkForInvalidItems(tinyDust) && ItemUtils.checkForInvalidItems(normalDust)) {
+ final ItemStack normalDust = M.getDust(1);
+ final ItemStack smallDust = M.getSmallDust(1);
+ final ItemStack tinyDust = M.getTinyDust(1);
+ if (tinyDust != null && normalDust != null) {
if (RecipeUtils.addShapedRecipe(
- tinyDust, tinyDust, tinyDust,
+ tinyDust, tinyDust, tinyDust,
tinyDust, tinyDust, tinyDust,
tinyDust, tinyDust, tinyDust,
normalDust)){
- Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.INFO("9 Tiny dust to 1 Dust Recipe: "+M.getLocalizedName()+" - Success");
}
else {
- Logger.WARNING("9 Tiny dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.INFO("9 Tiny dust to 1 Dust Recipe: "+M.getLocalizedName()+" - Failed");
}
if (RecipeUtils.addShapedRecipe(
normalDust, null, null,
null, null, null,
null, null, null,
- material.getTinyDust(9))){
- Logger.WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Success");
+ M.getTinyDust(9))){
+ Logger.INFO("9 Tiny dust from 1 Recipe: "+M.getLocalizedName()+" - Success");
}
else {
- Logger.WARNING("9 Tiny dust from 1 Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.INFO("9 Tiny dust from 1 Recipe: "+M.getLocalizedName()+" - Failed");
}
}
- if (ItemUtils.checkForInvalidItems(smallDust) && ItemUtils.checkForInvalidItems(normalDust)) {
+ if (smallDust != null && normalDust != null) {
if (RecipeUtils.addShapedRecipe(
smallDust, smallDust, null,
smallDust, smallDust, null,
null, null, null,
normalDust)){
- Logger.WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Success");
+ Logger.INFO("4 Small dust to 1 Dust Recipe: "+M.getLocalizedName()+" - Success");
}
else {
- Logger.WARNING("4 Small dust to 1 Dust Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.INFO("4 Small dust to 1 Dust Recipe: "+M.getLocalizedName()+" - Failed");
}
if (RecipeUtils.addShapedRecipe(
null, normalDust, null,
null, null, null,
null, null, null,
- material.getSmallDust(4))){
- Logger.WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Success");
+ M.getSmallDust(4))){
+ Logger.INFO("4 Small dust from 1 Dust Recipe: "+M.getLocalizedName()+" - Success");
}
else {
- Logger.WARNING("4 Small dust from 1 Dust Recipe: "+material.getLocalizedName()+" - Failed");
+ Logger.INFO("4 Small dust from 1 Dust Recipe: "+M.getLocalizedName()+" - Failed");
}
}
+ }
+
+ @Override
+ public void run() {
+ generateRecipes(this.toGenerate, this.disableOptional);
+ }
+
+ private void generateRecipes(final Material material, final boolean disableOptional){
+
+ Logger.INFO("Generating Shaped Crafting recipes for "+material.getLocalizedName());
+
+ final ItemStack normalDust = material.getDust(1);
+ final ItemStack smallDust = material.getSmallDust(1);
+ final ItemStack tinyDust = material.getTinyDust(1);
+
+ final ItemStack[] inputStacks = material.getMaterialComposites();
+ final ItemStack outputStacks = material.getDust(material.smallestStackSizeWhenProcessing);
//Macerate blocks back to dusts.
final ItemStack materialBlock = material.getBlock(1);
@@ -192,7 +193,7 @@ public class RecipeGen_DustGeneration extends RecipeGen_Base {
if (x.getStackMaterial() != null){
if (x.getStackMaterial().getDust(1) == null){
if (x.getStackMaterial().getState() != MaterialState.SOLID && x.getStackMaterial().getState() != MaterialState.ORE && x.getStackMaterial().getState() != MaterialState.PLASMA){
- oxygen = x.getStackMaterial().getFluid(1000);
+ oxygen = x.getStackMaterial().getFluidStack(1000);
break;
}
}
@@ -297,8 +298,8 @@ public class RecipeGen_DustGeneration extends RecipeGen_Base {
if (x.getStackMaterial() != null){
if (x.getStackMaterial().getDust(1) == null){
MaterialState f = x.getStackMaterial().getState();
- if (f == MaterialState.GAS || f == MaterialState.LIQUID || f == MaterialState.PURE_LIQUID){
- oxygen = x.getStackMaterial().getFluid((int) (material.vSmallestRatio[compSlot] * 1000));
+ if (f == MaterialState.GAS || f == MaterialState.LIQUID || f == MaterialState.PURE_LIQUID || f == MaterialState.PURE_GAS){
+ oxygen = x.getStackMaterial().getFluidStack((int) (material.vSmallestRatio[compSlot] * 1000));
}
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java
index 3c74c4166d..e87fc08c90 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Fluids.java
@@ -41,8 +41,8 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
}
// Melting Shapes to fluid
- if (material.getFluid(1) != null
- && !material.getFluid(1).getUnlocalizedName().toLowerCase().contains("plasma")) {
+ if (material.getFluidStack(1) != null
+ && !material.getFluidStack(1).getUnlocalizedName().toLowerCase().contains("plasma")) {
if (!material.requiresBlastFurnace()) {
@@ -50,7 +50,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
if (ItemUtils.checkForInvalidItems(material.getIngot(1)))
if (CORE.RA.addFluidExtractionRecipe(
material.getIngot(1), // Input
- material.getFluid(144), // Fluid Output
+ material.getFluidStack(144), // Fluid Output
1 * 20, // Duration
material.vVoltageMultiplier // Eu Tick
)) {
@@ -65,7 +65,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
if (ItemUtils.checkForInvalidItems(material.getPlate(1)))
if (CORE.RA.addFluidExtractionRecipe(
material.getPlate(1), // Input
- material.getFluid(144), // Fluid Output
+ material.getFluidStack(144), // Fluid Output
1 * 20, // Duration
material.vVoltageMultiplier // Eu Tick
)) {
@@ -80,7 +80,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
if (ItemUtils.checkForInvalidItems(material.getPlateDouble(1)))
if (CORE.RA.addFluidExtractionRecipe(
material.getPlateDouble(1), // Input
- material.getFluid(288), // Fluid Output
+ material.getFluidStack(288), // Fluid Output
1 * 20, // Duration
material.vVoltageMultiplier // Eu Tick
)) {
@@ -95,7 +95,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
if (ItemUtils.checkForInvalidItems(material.getNugget(1)))
if (CORE.RA.addFluidExtractionRecipe(
material.getNugget(1), // Input
- material.getFluid(16), // Fluid Output
+ material.getFluidStack(16), // Fluid Output
16, // Duration
material.vVoltageMultiplier // Eu Tick
)) {
@@ -110,7 +110,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
if (ItemUtils.checkForInvalidItems(material.getBlock(1)))
if (CORE.RA.addFluidExtractionRecipe(
material.getBlock(1), // Input
- material.getFluid(144 * 9), // Fluid Output
+ material.getFluidStack(144 * 9), // Fluid Output
288, // Duration
material.vVoltageMultiplier // Eu Tick
)) {
@@ -128,7 +128,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
// Ingot
if (ItemUtils.checkForInvalidItems(material.getIngot(1)))
if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ingot.get(0), // Item Shape
- material.getFluid(144), // Fluid Input
+ material.getFluidStack(144), // Fluid Input
material.getIngot(1), // output
32, // Duration
material.vVoltageMultiplier // Eu Tick
@@ -143,7 +143,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
// Plate
if (ItemUtils.checkForInvalidItems(material.getPlate(1)))
if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Plate.get(0), // Item Shape
- material.getFluid(144), // Fluid Input
+ material.getFluidStack(144), // Fluid Input
material.getPlate(1), // output
32, // Duration
material.vVoltageMultiplier // Eu Tick
@@ -158,7 +158,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
// Nugget
if (ItemUtils.checkForInvalidItems(material.getNugget(1)))
if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Nugget.get(0), // Item Shape
- material.getFluid(16), // Fluid Input
+ material.getFluidStack(16), // Fluid Input
material.getNugget(1), // output
16, // Duration
material.vVoltageMultiplier // Eu Tick
@@ -173,7 +173,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
// Gears
if (ItemUtils.checkForInvalidItems(material.getGear(1)))
if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Gear.get(0), // Item Shape
- material.getFluid(576), // Fluid Input
+ material.getFluidStack(576), // Fluid Input
material.getGear(1), // output
128, // Duration
material.vVoltageMultiplier // Eu Tick
@@ -187,7 +187,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
// Blocks
if (ItemUtils.checkForInvalidItems(material.getBlock(1)))
if (GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Block.get(0), // Item Shape
- material.getFluid(144 * 9), // Fluid Input
+ material.getFluidStack(144 * 9), // Fluid Input
material.getBlock(1), // output
288, // Duration
material.vVoltageMultiplier // Eu Tick
@@ -219,7 +219,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
// Rod
if (ItemUtils.checkForInvalidItems(material.getRod(1)))
if (mold_Rod != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Rod.get(0), // Item Shape
- material.getFluid(72), // Fluid Input
+ material.getFluidStack(72), // Fluid Input
material.getRod(1), // output
150, // Duration
material.vVoltageMultiplier // Eu Tick
@@ -235,7 +235,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
if (ItemUtils.checkForInvalidItems(material.getLongRod(1)))
if (mold_Rod_Long != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Rod_Long.get(0), // Item
// Shape
- material.getFluid(144), // Fluid Input
+ material.getFluidStack(144), // Fluid Input
material.getLongRod(1), // output
300, // Duration
material.vVoltageMultiplier // Eu Tick
@@ -250,7 +250,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
// Bolt
if (ItemUtils.checkForInvalidItems(material.getBolt(1)))
if (mold_Bolt != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Bolt.get(0), // Item Shape
- material.getFluid(18), // Fluid Input
+ material.getFluidStack(18), // Fluid Input
material.getBolt(1), // output
50, // Duration
material.vVoltageMultiplier // Eu Tick
@@ -265,7 +265,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
// Screw
if (ItemUtils.checkForInvalidItems(material.getScrew(1)))
if (mold_Screw != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Screw.get(0), // Item Shape
- material.getFluid(18), // Fluid Input
+ material.getFluidStack(18), // Fluid Input
material.getScrew(1), // output
50, // Duration
material.vVoltageMultiplier // Eu Tick
@@ -280,7 +280,7 @@ public class RecipeGen_Fluids extends RecipeGen_Base {
// Ring
if (ItemUtils.checkForInvalidItems(material.getRing(1)))
if (mold_Ring != null && GT_Values.RA.addFluidSolidifierRecipe(mold_Ring.get(0), // Item Shape
- material.getFluid(36), // Fluid Input
+ material.getFluidStack(36), // Fluid Input
material.getRing(1), // output
100, // Duration
material.vVoltageMultiplier // Eu Tick
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java
index 90bd1d8f1a..f8108852f4 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MaterialProcessing.java
@@ -18,6 +18,7 @@ import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.material.MaterialGenerator;
import gtPlusPlus.core.material.MaterialStack;
import gtPlusPlus.core.material.state.MaterialState;
+import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import net.minecraftforge.fluids.FluidStack;
@@ -186,7 +187,7 @@ public class RecipeGen_MaterialProcessing extends RecipeGen_Base {
ItemStack emptyCell = null;
if (mCellCount > 0){
- emptyCell = ItemUtils.getItemStackOfAmountFromOreDict("cellEmpty", mCellCount);
+ emptyCell = CI.emptyCells(mCellCount);
Logger.MATERIALS("[Dehydrator] Recipe now requires "+mCellCount+" empty cells as input.");
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java
new file mode 100644
index 0000000000..830fae78ab
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MetalRecipe.java
@@ -0,0 +1,119 @@
+package gtPlusPlus.xmod.gregtech.loaders;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.interfaces.RunnableWithInfo;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.material.Material;
+import gtPlusPlus.core.material.MaterialGenerator;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+
+import java.util.HashSet;
+import java.util.Set;
+
+public class RecipeGen_MetalRecipe extends RecipeGen_Base {
+
+ public final static Set<RunnableWithInfo<Material>> mRecipeGenMap = new HashSet<RunnableWithInfo<Material>>();
+ static {
+ MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap);
+ }
+
+ public RecipeGen_MetalRecipe(final Material M){
+ this.toGenerate = M;
+ mRecipeGenMap.add(this);
+ }
+
+ @Override
+ public void run() {
+ generateRecipes(this.toGenerate);
+ }
+
+ private void generateRecipes(final Material material) {
+
+ Logger.WARNING("Generating Metal recipes for "+material.getLocalizedName());
+ if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getBlock(1)))
+ if (GT_ModHandler.addCompressionRecipe(
+ material.getIngot(9),
+ material.getBlock(1)
+ )){
+ Logger.WARNING("Compress Block Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("Compress Block Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+
+ if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getRod(1)))
+ if (GT_Values.RA.addLatheRecipe(
+ material.getIngot(1),
+ material.getRod(1),
+ material.getSmallDust(2),
+ (int) Math.max(material.getMass() / 8L, 1L),
+ material.vVoltageMultiplier)){
+ Logger.WARNING("Lathe Rod Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("Lathe Rod Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+
+ if (ItemUtils.checkForInvalidItems(material.getRod(1)) && ItemUtils.checkForInvalidItems(material.getBolt(1)))
+ if (GT_Values.RA.addCutterRecipe(
+ material.getRod(1),
+ material.getBolt(4),
+ null,
+ (int) Math.max(material.getMass() * 2L, 1L),
+ material.vVoltageMultiplier)){
+ Logger.WARNING("Cut Bolt Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("Cut Bolt Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+
+ if (ItemUtils.checkForInvalidItems(material.getIngot(1)) && ItemUtils.checkForInvalidItems(material.getHotIngot(1)))
+ if (CORE.RA.addVacuumFreezerRecipe(
+ material.getHotIngot(1),
+ material.getIngot(1),
+ (int) Math.max(material.getMass() * 3L, 1L),
+ material.vVoltageMultiplier)
+ ){
+ Logger.WARNING("Cool Hot Ingot Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("Cool Hot Ingot Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+
+ if (ItemUtils.checkForInvalidItems(material.getRod(1)) && ItemUtils.checkForInvalidItems(material.getLongRod(1))) {
+ if (GT_Values.RA.addForgeHammerRecipe(
+ material.getRod(2),
+ material.getLongRod(1),
+ (int) Math.max(material.getMass(), 1L),
+ 16)){
+ Logger.WARNING("Hammer Long Rod Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("Hammer Long Rod Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+
+ GT_Values.RA.addCutterRecipe(
+ material.getLongRod(1),
+ material.getRod(2),
+ null,
+ (int) Math.max(material.getMass(), 1L),
+ 4);
+ }
+
+ if (ItemUtils.checkForInvalidItems(material.getBolt(1)) && ItemUtils.checkForInvalidItems(material.getScrew(1)))
+ if (GT_Values.RA.addLatheRecipe(
+ material.getBolt(1),
+ material.getScrew(1),
+ null,
+ (int) Math.max(material.getMass() / 8L, 1L),
+ 4)){
+ Logger.WARNING("Lathe Screw Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("Lathe Screw Recipe: "+material.getLocalizedName()+" - Failed");
+ }
+
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java
index 90d7aaa806..a76322e4f4 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_MultisUsingFluidInsteadOfCells.java
@@ -151,6 +151,11 @@ public class RecipeGen_MultisUsingFluidInsteadOfCells {
for (int i = 0; i < aOutputFluidsMap.size(); i++) {
aNewFluidOutputs[i] = aOutputFluidsMap.get(i);
}
+
+ if (!ItemUtils.checkForInvalidItems(aNewItemInputs, aNewItemOutputs)) {
+ aInvalidRecipesToConvert++;
+ continue recipe; // Skip this recipe entirely if we find an item we don't like
+ }
// Add Recipe to map
GT_Recipe aNewRecipe = new GTPP_Recipe(
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java
new file mode 100644
index 0000000000..5f53defc2f
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plasma.java
@@ -0,0 +1,42 @@
+package gtPlusPlus.xmod.gregtech.loaders;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.util.GT_Utility;
+import gtPlusPlus.api.interfaces.RunnableWithInfo;
+import gtPlusPlus.core.material.Material;
+import gtPlusPlus.core.material.MaterialGenerator;
+import net.minecraft.item.ItemStack;
+
+public class RecipeGen_Plasma extends RecipeGen_Base {
+
+ public final static Set<RunnableWithInfo<Material>> mRecipeGenMap = new HashSet<RunnableWithInfo<Material>>();
+ static {
+ MaterialGenerator.mRecipeMapsToGenerate.put(mRecipeGenMap);
+ }
+
+ public RecipeGen_Plasma(final Material M){
+ this.toGenerate = M;
+ mRecipeGenMap.add(this);
+ }
+
+ @Override
+ public void run() {
+ generateRecipes(this.toGenerate);
+ }
+
+ private void generateRecipes(final Material material) {
+ // Cool Plasma
+ ItemStack aPlasmaCell = material.getPlasmaCell(1);
+ ItemStack aCell = material.getCell(1);
+ if (material.getPlasmaCell(1) != null){
+ GT_Values.RA.addFuel(GT_Utility.copyAmount(1L, aPlasmaCell), GT_Utility.getFluidForFilledItem(aPlasmaCell, true) == null ? GT_Utility.getContainerItem(aPlasmaCell, true) : null, (int) Math.max(1024L, 1024L * material.getMass()), 4);
+ }
+ if (material.getCell(1) != null && material.getPlasmaCell(1) != null){
+ GT_Values.RA.addVacuumFreezerRecipe(aPlasmaCell, aCell, (int) Math.max(material.getMass() * 2L, 1L));
+ }
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java
index 84188a44aa..acb7e5fe02 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Recycling.java
@@ -137,9 +137,9 @@ public class RecipeGen_Recycling implements Runnable {
//Fluid Extractor
if (ItemUtils.checkForInvalidItems(tempStack)) {
// mValidItems[mSlotIndex++] = tempStack;
- if ((mDust != null) && CORE.RA.addFluidExtractionRecipe(tempStack, material.getFluid(mFluidAmount), 30, material.vVoltageMultiplier)) {
+ if ((mDust != null) && CORE.RA.addFluidExtractionRecipe(tempStack, material.getFluidStack(mFluidAmount), 30, material.vVoltageMultiplier)) {
Logger.WARNING("Fluid Recycle Recipe: " + material.getLocalizedName() + " - Success - Recycle "
- + tempStack.getDisplayName() + " and obtain " + mFluidAmount+"mb of "+material.getFluid(1).getLocalizedName()+".");
+ + tempStack.getDisplayName() + " and obtain " + mFluidAmount+"mb of "+material.getFluidStack(1).getLocalizedName()+".");
}
else {
Logger.WARNING("Fluid Recycle Recipe: " + material.getLocalizedName() + " - Failed");
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_GTNH.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_GTNH.java
new file mode 100644
index 0000000000..0197142e96
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_GTNH.java
@@ -0,0 +1,22 @@
+package gtPlusPlus.xmod.gregtech.loaders.recipe;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gtPlusPlus.core.material.ELEMENT;
+import net.minecraft.init.Items;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidRegistry;
+import net.minecraftforge.fluids.FluidStack;
+
+public class RecipeLoader_GTNH {
+
+ public static void generate() {
+ GT_Values.RA.addFluidSolidifierRecipe(ItemList.Shape_Mold_Ball.get(0L), new FluidStack(FluidRegistry.getFluid("ender"), 250), new ItemStack(Items.ender_pearl, 1, 0), 100, 30);
+ //MK4
+ GT_Values.RA.addFusionReactorRecipe(Materials.Plutonium241.getMolten(144), Materials.Helium.getGas(1000), ELEMENT.getInstance().CURIUM.getFluidStack(144), 96, 98304, 500000000);
+ GT_Values.RA.addFusionReactorRecipe(ELEMENT.getInstance().CURIUM.getFluidStack(144), Materials.Helium.getPlasma(144), ELEMENT.getInstance().CALIFORNIUM.getFluidStack(144), 128, 196608, 750000000);
+ GT_Values.RA.addFusionReactorRecipe(Materials.Plutonium241.getMolten(144), Materials.Calcium.getPlasma(144), Materials.Flerovium.getMolten(144), 160, 196608, 1000000000);
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_LFTR.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_LFTR.java
index 424c2ecce5..a09cbcce0d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_LFTR.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_LFTR.java
@@ -1,24 +1,47 @@
package gtPlusPlus.xmod.gregtech.loaders.recipe;
-import java.util.Collection;
-
-import net.minecraft.item.ItemStack;
-
-import gregtech.api.util.GT_Recipe;
+import gregtech.api.enums.Materials;
import gregtech.api.util.GTPP_Recipe;
-
-import gtPlusPlus.api.objects.minecraft.NoConflictGTRecipeMap;
-import gtPlusPlus.core.recipe.common.CI;
-import gtPlusPlus.core.util.minecraft.FluidUtils;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GasSpargingRecipeMap;
+import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.core.material.ELEMENT;
+import gtPlusPlus.core.material.nuclear.FLUORIDES;
+import gtPlusPlus.core.material.nuclear.NUCLIDE;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.Fluid;
import net.minecraftforge.fluids.FluidStack;
-public class RecipeLoader_LFTR {
-
+public class RecipeLoader_LFTR {
- protected final static NoConflictGTRecipeMap mRecipesLFTR = new NoConflictGTRecipeMap();
+ private static AutoMap<Fluid> mNobleGases;
+ private static AutoMap<Fluid> mFluorideGases;
+ private static AutoMap<Fluid> mSpargeGases;
- public static Collection<GT_Recipe> getRecipes(){
- return mRecipesLFTR.getRecipeMap();
+ private static void configureSparging() {
+ if (mSpargeGases == null) {
+ mSpargeGases = new AutoMap<Fluid>();
+ mSpargeGases.add(Materials.Helium.getGas(1).getFluid());
+ mSpargeGases.add(Materials.Fluorine.getGas(1).getFluid());
+ }
+ if (mNobleGases == null) {
+ mNobleGases = new AutoMap<Fluid>();
+ mNobleGases.add(mSpargeGases.get(0));
+ mNobleGases.add(ELEMENT.getInstance().XENON.getFluid());
+ mNobleGases.add(ELEMENT.getInstance().NEON.getFluid());
+ mNobleGases.add(ELEMENT.getInstance().ARGON.getFluid());
+ mNobleGases.add(ELEMENT.getInstance().KRYPTON.getFluid());
+ mNobleGases.add(ELEMENT.getInstance().RADON.getFluid());
+ }
+ if (mFluorideGases == null) {
+ mFluorideGases = new AutoMap<Fluid>();
+ mFluorideGases.add(mSpargeGases.get(1));
+ mFluorideGases.add(FLUORIDES.LITHIUM_FLUORIDE.getFluid());
+ mFluorideGases.add(FLUORIDES.NEPTUNIUM_HEXAFLUORIDE.getFluid());
+ mFluorideGases.add(FLUORIDES.TECHNETIUM_HEXAFLUORIDE.getFluid());
+ mFluorideGases.add(FLUORIDES.SELENIUM_HEXAFLUORIDE.getFluid());
+ mFluorideGases.add(FLUORIDES.THORIUM_TETRAFLUORIDE.getFluid());
+ }
}
public static void generate() {
@@ -29,70 +52,122 @@ public class RecipeLoader_LFTR {
//1l/20t= 1000l/2.5hr LiFBeF2ZrF4UF4
//1l/10t= 1000l/2.5hr LiFBeF2ZrF4U235
- //LiFBeF2ThF4UF4
+ configureSparging();
+ FluidStack Li2BeF4 = NUCLIDE.Li2BeF4.getFluidStack(200);
+
+ //LiFBeF2ThF4UF4 - T3
GT_Recipe LFTR1 = new GTPP_Recipe(
- true,
- new ItemStack[] {CI.getNumberedCircuit(1)},
+ false,
new ItemStack[] {},
- null, new int[] {5000, 2500},
+ new ItemStack[] {},
+ null, new int[] {10000, 10000, 5000, 2500},
new FluidStack[] {
- FluidUtils.getFluidStack("molten.li2bef4", 34),
- FluidUtils.getFluidStack("molten.LiFBeF2ThF4UF4".toLowerCase(), 17)
+ NUCLIDE.LiFBeF2ThF4UF4.getFluidStack(100),
+ Li2BeF4
},
new FluidStack[] {
- FluidUtils.getFluidStack("molten.uraniumhexafluoride", 10),
- FluidUtils.getFluidStack("molten.uraniumhexafluoride", 5)
+ NUCLIDE.LiFBeF2UF4FP.getFluidStack(100),
+ NUCLIDE.LiFBeF2ThF4.getFluidStack(200),
+ FLUORIDES.URANIUM_HEXAFLUORIDE.getFluidStack(20),
+ FLUORIDES.URANIUM_HEXAFLUORIDE.getFluidStack(10)
},
- 12000,//time
+ 400 * 20,//time
0,//cost
- 4096//fuel value
+ 8192*4//fuel value
);
- //LiFBeF2ZrF4UF4
+ //LiFBeF2ZrF4UF4 - T2
GT_Recipe LFTR2 = new GTPP_Recipe(
- true,
- new ItemStack[] {CI.getNumberedCircuit(2)},
+ false,
+ new ItemStack[] {},
new ItemStack[] {},
- null, new int[] {2500, 1250},
+ null, new int[] {10000, 10000, 2500, 1250},
new FluidStack[] {
- FluidUtils.getFluidStack("molten.li2bef4", 34),
- FluidUtils.getFluidStack("molten.LiFBeF2ZrF4UF4".toLowerCase(), 17)
+ NUCLIDE.LiFBeF2ZrF4UF4.getFluidStack(100),
+ Li2BeF4
},
new FluidStack[] {
- FluidUtils.getFluidStack("molten.uraniumhexafluoride", 4),
- FluidUtils.getFluidStack("molten.uraniumhexafluoride", 2)
+ NUCLIDE.LiFBeF2UF4FP.getFluidStack(50),
+ NUCLIDE.LiFBeF2ThF4.getFluidStack(100),
+ FLUORIDES.URANIUM_HEXAFLUORIDE.getFluidStack(10),
+ FLUORIDES.URANIUM_HEXAFLUORIDE.getFluidStack(5)
},
- 6000,//time
+ 400 * 20,//time
0,//cost
- 4096//fuel value
+ 8192//fuel value
);
- //LiFBeF2ZrF4U235
+ //LiFBeF2ZrF4U235 - T1
GT_Recipe LFTR3 = new GTPP_Recipe(
- true,
- new ItemStack[] {CI.getNumberedCircuit(3)},
+ false,
new ItemStack[] {},
- null, new int[] {1000, 500},
+ new ItemStack[] {},
+ null, new int[] {10000, 10000, 1000, 500},
new FluidStack[] {
- FluidUtils.getFluidStack("molten.li2bef4", 34),
- FluidUtils.getFluidStack("molten.LiFBeF2ZrF4U235".toLowerCase(), 17)
+ NUCLIDE.LiFBeF2ZrF4U235.getFluidStack(100),
+ Li2BeF4
},
new FluidStack[] {
- FluidUtils.getFluidStack("molten.uraniumhexafluoride", 2),
- FluidUtils.getFluidStack("molten.uraniumhexafluoride", 1)
+ NUCLIDE.LiFBeF2UF4FP.getFluidStack(25),
+ NUCLIDE.LiFThF4.getFluidStack(50),
+ FLUORIDES.URANIUM_HEXAFLUORIDE.getFluidStack(4),
+ FLUORIDES.URANIUM_HEXAFLUORIDE.getFluidStack(2)
},
- 3000,//time
+ 100 *20,//time
0,//cost
- 4096//fuel value
+ 8192//fuel value
);
- /*mRecipesLFTR.add(LFTR1);
- mRecipesLFTR.add(LFTR2);
- mRecipesLFTR.add(LFTR3);*/
- GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipesEx.add(LFTR1);
- GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipesEx.add(LFTR2);
- GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipesEx.add(LFTR3);
-
+ // Sparging NEI Recipes
+ GasSpargingRecipeMap.addRecipe(
+ new FluidStack(mSpargeGases.get(0), 50),
+ NUCLIDE.LiFBeF2UF4FP.getFluidStack(50),
+ NUCLIDE.Sparged_LiFBeF2UF4FP.getFluidStack(50),
+ new FluidStack[] {
+ new FluidStack(mNobleGases.get(1), 10),
+ new FluidStack(mNobleGases.get(2), 10),
+ new FluidStack(mNobleGases.get(3), 10),
+ new FluidStack(mNobleGases.get(4), 10),
+ new FluidStack(mNobleGases.get(5), 10)
+ },
+ new int[] {
+ 1000, 1000, 1000, 1000, 1000
+ });
+
+ GasSpargingRecipeMap.addRecipe(
+ new FluidStack(mSpargeGases.get(1), 50),
+ NUCLIDE.LiFThF4.getFluidStack(50),
+ NUCLIDE.Sparged_LiFThF4.getFluidStack(50),
+ new FluidStack[] {
+ new FluidStack(mFluorideGases.get(1), 5),
+ new FluidStack(mFluorideGases.get(2), 5),
+ new FluidStack(mFluorideGases.get(3), 5),
+ new FluidStack(mFluorideGases.get(4), 5),
+ new FluidStack(mFluorideGases.get(5), 5)
+ },
+ new int[] {
+ 500, 500, 500, 500, 500
+ });
+
+ GasSpargingRecipeMap.addRecipe(
+ new FluidStack(mSpargeGases.get(1), 50),
+ NUCLIDE.LiFBeF2ThF4.getFluidStack(50),
+ NUCLIDE.Sparged_LiFBeF2ThF4.getFluidStack(50),
+ new FluidStack[] {
+ new FluidStack(mFluorideGases.get(1), 10),
+ new FluidStack(mFluorideGases.get(2), 10),
+ new FluidStack(mFluorideGases.get(3), 10),
+ new FluidStack(mFluorideGases.get(4), 10),
+ new FluidStack(mFluorideGases.get(5), 10)
+ },
+ new int[] {
+ 1000, 1000, 1000, 1000, 1000
+ });
+
+ GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.add(LFTR1);
+ GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.add(LFTR2);
+ GTPP_Recipe.GTPP_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.add(LFTR3);
+
}
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_Nuclear.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_Nuclear.java
new file mode 100644
index 0000000000..330d507115
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_Nuclear.java
@@ -0,0 +1,695 @@
+package gtPlusPlus.xmod.gregtech.loaders.recipe;
+
+import static gtPlusPlus.core.lib.CORE.GTNH;
+
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.util.GT_ModHandler;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.item.chemistry.GenericChem;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.lib.LoadedMods;
+import gtPlusPlus.core.material.ELEMENT;
+import gtPlusPlus.core.material.MISC_MATERIALS;
+import gtPlusPlus.core.material.nuclear.FLUORIDES;
+import gtPlusPlus.core.material.nuclear.NUCLIDE;
+import gtPlusPlus.core.recipe.common.CI;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.minecraft.FluidUtils;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+public class RecipeLoader_Nuclear {
+
+
+
+ public static void generate() {
+ createRecipes();
+ RecipeLoader_LFTR.generate();
+ RecipeLoader_NuclearFuelProcessing.generate();
+ }
+
+ private static void createRecipes() {
+ autoclave();
+ blastFurnace();
+ centrifugeRecipes();
+ chemicalBathRecipes();
+ chemicalReactorRecipes();
+ dehydratorRecipes();
+ electroMagneticSeperator();
+ fluidExtractorRecipes();
+ fluidHeater();
+ macerator();
+ mixerRecipes();
+ sifter();
+ }
+
+ private static void autoclave() {
+
+ GT_Values.RA.addAutoclaveRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 9),
+ FluidUtils.getFluidStack("chlorine", 9 * 4 * 144),
+ ItemUtils.getItemStackOfAmountFromOreDict("pelletZirconium", 9),
+ 0,
+ 120 * 20,
+ 30);
+
+ }
+
+ private static void blastFurnace() {
+
+ GT_Values.RA.addBlastRecipe(
+ FLUORIDES.LITHIUM_FLUORIDE.getDust(2),
+ FLUORIDES.BERYLLIUM_FLUORIDE.getDust(1),
+ GT_Values.NF,
+ GT_Values.NF,
+ NUCLIDE.Li2BeF4.getDust(3),
+ null,
+ 60 * 20, 2000,
+ 3000);
+
+ GT_Values.RA.addBlastRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("dustZrCl4", 1),
+ null,
+ GT_Values.NF,
+ GT_Values.NF,
+ ItemUtils.getItemStackOfAmountFromOreDict("dustCookedZrCl4", 1),
+ null,
+ 60 * 20,
+ 340,
+ 300);
+
+ }
+
+
+ private static void centrifugeRecipes() {
+
+ //Process Used Fuel Rods for Krypton
+
+ //Uranium
+ GT_Values.RA.addCentrifugeRecipe(
+ CI.getNumberedCircuit(20),
+ ItemUtils.getItemStackFromFQRN("IC2:reactorUraniumSimpledepleted", 8),
+ GT_Values.NF,
+ ELEMENT.getInstance().KRYPTON.getFluidStack(60),
+ ItemList.IC2_Fuel_Rod_Empty.get(8),
+ ELEMENT.getInstance().URANIUM238.getDust(2),
+ ELEMENT.getInstance().URANIUM232.getSmallDust(1),
+ ELEMENT.getInstance().URANIUM233.getSmallDust(1),
+ ELEMENT.getInstance().URANIUM235.getSmallDust(1),
+ ELEMENT.getInstance().PLUTONIUM239.getTinyDust(1),
+ new int[] { 0, 0, 1000, 1000, 1000, 500 }, 500 * 20, 4000);
+ //Mox
+ GT_Values.RA.addCentrifugeRecipe(
+ CI.getNumberedCircuit(20),
+ ItemUtils.getItemStackFromFQRN("IC2:reactorMOXSimpledepleted", 8),
+ GT_Values.NF,
+ ELEMENT.getInstance().KRYPTON.getFluidStack(90),
+ ItemList.IC2_Fuel_Rod_Empty.get(8),
+ ELEMENT.getInstance().PLUTONIUM244.getDust(2),
+ ELEMENT.getInstance().PLUTONIUM241.getTinyDust(1),
+ ELEMENT.getInstance().PLUTONIUM239.getTinyDust(1),
+ ELEMENT.getInstance().PLUTONIUM238.getTinyDust(1),
+ ELEMENT.getInstance().PLUTONIUM239.getTinyDust(1),
+ new int[] { 0, 0, 500, 500, 500, 500 }, 750 * 20, 4000);
+
+ //Thorium
+ GT_Values.RA.addCentrifugeRecipe(
+ CI.getNumberedCircuit(20),
+ ItemList.Depleted_Thorium_1.get(8),
+ GT_Values.NF,
+ ELEMENT.getInstance().KRYPTON.getFluidStack(30),
+ ItemList.IC2_Fuel_Rod_Empty.get(8),
+ ELEMENT.getInstance().THORIUM.getDust(2),
+ ELEMENT.getInstance().THORIUM232.getDust(1),
+ ELEMENT.getInstance().LUTETIUM.getSmallDust(1),
+ ELEMENT.getInstance().POLONIUM.getSmallDust(1),
+ ELEMENT.getInstance().THALLIUM.getTinyDust(1),
+ new int[] { 0, 0, 5000, 5000, 5000, 2500 }, 250 * 20, 4000);
+
+ }
+
+
+ private static void chemicalBathRecipes() {
+
+ int[] chances = {9000, 6000, 3000};
+ GT_Values.RA.addChemicalBathRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustTin", 12),
+ FluidUtils.getFluidStack("chlorine", 2400),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 3),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 4),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 5),
+ chances,
+ 30 * 20,
+ 480);
+
+ chances = new int[]{9000, 3000, 1000};
+ GT_Values.RA.addChemicalBathRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustRutile", 5),
+ FluidUtils.getFluidStack("chlorine", 4000),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 3),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustTitanium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustHafnium", 1),
+ chances,
+ 30 * 20,
+ 1024);
+
+ GT_Values.RA.addChemicalBathRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumCarbonate", 10),
+ FluidUtils.getFluidStack("hydrofluoricacid", 10 * 144),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumFluoride", 10),
+ null,
+ null,
+ new int[] {},
+ 90 * 20,
+ 500);
+
+ }
+
+
+ private static void chemicalReactorRecipes() {
+
+ ItemStack aGtHydrofluoricAcid = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cellHydrofluoricAcid_GT5U", 2);
+
+ GT_Values.RA.addChemicalRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumCarbonate", 5), // Input
+ ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumHydroxide", 5), // Input
+ null, // Fluid Input
+ null, // Fluid Output
+ ItemUtils.getItemStackOfAmountFromOreDict("dustLi2CO3CaOH2", 10),
+ 600 * 20);
+
+ GT_Values.RA.addChemicalRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 5), // Input
+ null, // Input Stack 2
+ FluidUtils.getFluidStack("hydrofluoricacid", 5 * 144),
+ FluidUtils.getFluidStack("water", 5 * 144), // Fluid Output
+ ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumFluoride", 5),
+ 600 * 20);
+
+ GT_Values.RA.addChemicalRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 1), null,
+ FluidUtils.getFluidStack("sulfuricacid", 144 * 8),
+ FluidUtils.getFluidStack("sulfuriclithium", 144 * 2),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustSmallLithium7", 1),
+ 20 * 20);
+
+ GT_Values.RA.addChemicalRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 16),
+ FluidUtils.getFluidStack("water", 1000),
+ FluidUtils.getFluidStack("lithiumhydroxide", 144 * 4),
+ CI.emptyCells(1),
+ 300 * 20);
+
+ // LFTR Fuel Related Compounds
+ if (GTNH) {
+ // Hydroxide
+ GT_Values.RA.addChemicalRecipe(
+ ItemUtils.getGregtechCircuit(3),
+ ELEMENT.getInstance().OXYGEN.getCell(1),
+ ELEMENT.getInstance().HYDROGEN.getFluidStack(1000),
+ MISC_MATERIALS.HYDROXIDE.getFluidStack(2000),
+ CI.emptyCells(2),
+ GT_Values.NI,
+ 8 * 20,
+ 30);
+ // Beryllium Hydroxide
+ GT_Values.RA.addChemicalRecipe(
+ ItemUtils.getGregtechCircuit(3),
+ ELEMENT.getInstance().BERYLLIUM.getDust(7),
+ MISC_MATERIALS.HYDROXIDE.getFluidStack(1000),
+ FLUORIDES.BERYLLIUM_HYDROXIDE.getFluidStack(2000),
+ GT_Values.NI,
+ 8 * 20,
+ 30);
+ // Ammonium Bifluoride
+ GT_Values.RA.addChemicalRecipe(
+ ItemUtils.getGregtechCircuit(3),
+ ItemUtils.getItemStackOfAmountFromOreDict("cellHydrofluoricAcid", 1),
+ MISC_MATERIALS.AMMONIUM.getFluidStack(1000),
+ FLUORIDES.AMMONIUM_BIFLUORIDE.getFluidStack(2000),
+ CI.emptyCells(1),
+ 20 * 20,
+ 30);
+ if (aGtHydrofluoricAcid != null) {
+ // Ammonium Bifluoride
+ GT_Values.RA.addChemicalRecipe(
+ ItemUtils.getGregtechCircuit(3),
+ aGtHydrofluoricAcid,
+ MISC_MATERIALS.AMMONIUM.getFluidStack(1000),
+ FLUORIDES.AMMONIUM_BIFLUORIDE.getFluidStack(2000),
+ CI.emptyCells(2),
+ 40 * 20,
+ 30);
+ }
+ // Ammonium
+ GT_Values.RA.addChemicalRecipe(
+ ItemUtils.getGregtechCircuit(3),
+ ELEMENT.getInstance().HYDROGEN.getCell(1),
+ MISC_MATERIALS.AMMONIA.getFluidStack(1000),
+ MISC_MATERIALS.AMMONIUM.getFluidStack(2000),
+ CI.emptyCells(1),
+ GT_Values.NI,
+ 20 * 20,
+ 30);
+ }
+
+ if (!GTNH) {
+ // Hydroxide
+ GT_Values.RA.addChemicalRecipe(
+ ItemUtils.getGregtechCircuit(3),
+ ELEMENT.getInstance().OXYGEN.getCell(1),
+ ELEMENT.getInstance().HYDROGEN.getFluidStack(1000),
+ MISC_MATERIALS.HYDROXIDE.getFluidStack(2000),
+ CI.emptyCells(2),
+ GT_Values.NI,
+ 8 * 20,
+ 30);
+ // Beryllium Hydroxide
+ GT_Values.RA.addChemicalRecipe(
+ ItemUtils.getGregtechCircuit(3),
+ ELEMENT.getInstance().BERYLLIUM.getDust(7),
+ MISC_MATERIALS.HYDROXIDE.getFluidStack(1000),
+ FLUORIDES.BERYLLIUM_HYDROXIDE.getFluidStack(2000),
+ GT_Values.NI,
+ 8 * 20,
+ 30);
+ // Ammonium Bifluoride
+ GT_Values.RA.addChemicalRecipe(
+ ItemUtils.getGregtechCircuit(3),
+ ItemUtils.getItemStackOfAmountFromOreDict("cellHydrofluoricAcid", 1),
+ MISC_MATERIALS.AMMONIUM.getFluidStack(1000),
+ FLUORIDES.AMMONIUM_BIFLUORIDE.getFluidStack(3000),
+ CI.emptyCells(1),
+ 20 * 20,
+ 30);
+
+ if (aGtHydrofluoricAcid != null) {
+ // Ammonium Bifluoride
+ GT_Values.RA.addChemicalRecipe(
+ ItemUtils.getGregtechCircuit(3),
+ aGtHydrofluoricAcid,
+ MISC_MATERIALS.AMMONIUM.getFluidStack(1000),
+ FLUORIDES.AMMONIUM_BIFLUORIDE.getFluidStack(2000),
+ CI.emptyCells(2),
+ 40 * 20,
+ 30);
+ }
+
+ // Ammonium
+ GT_Values.RA.addChemicalRecipe(
+ ItemUtils.getGregtechCircuit(3),
+ ELEMENT.getInstance().HYDROGEN.getCell(1),
+ MISC_MATERIALS.AMMONIA.getFluidStack(1000),
+ MISC_MATERIALS.AMMONIUM.getFluidStack(2000),
+ CI.emptyCells(1),
+ GT_Values.NI,
+ 20 * 20,
+ 30);
+ // Ammonia
+ GT_Values.RA.addChemicalRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 3),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustMagnetite", 0),
+ FluidUtils.getFluidStack("nitrogen", 1000),
+ FluidUtils.getFluidStack("ammonia", 1000),
+ CI.emptyCells(3),
+ 14 * 20);
+ }
+
+
+ //Technetium
+ GT_Values.RA.addChemicalRecipe(
+ CI.getNumberedAdvancedCircuit(22),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustTechnetium99", 1),
+ FluidUtils.getFluidStack("sulfuricacid", 1000),
+ FluidUtils.getFluidStack("sulfuricacid", 144 * 2),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustTechnetium", 1),
+ 100 * 20);
+
+ // Sodium Hydroxide
+ GT_Values.RA.addChemicalRecipe(
+ CI.getNumberedBioCircuit(15),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustSodiumHydroxide", 1),
+ FluidUtils.getFluidStack("hydrofluoricacid", 500),
+ FluidUtils.getWater(1000),
+ FLUORIDES.SODIUM_FLUORIDE.getDust(1),
+ 60 * 20);
+
+ if (FluidUtils.doesFluidExist("hydrofluoricacid_gt5u")) {
+ GT_Values.RA.addChemicalRecipe(
+ CI.getNumberedBioCircuit(15),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustSodiumHydroxide", 1),
+ FluidUtils.getFluidStack("hydrofluoricacid_gt5u", 1000),
+ FluidUtils.getWater(1000),
+ FLUORIDES.SODIUM_FLUORIDE.getDust(1),
+ 60 * 20);
+ }
+
+ }
+
+ private static void dehydratorRecipes() {
+
+ // Makes 7-Lithium
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[] {
+ CI.getNumberedAdvancedCircuit(14),
+ ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricLithium", 1)
+ },
+ FluidUtils.getFluidStack("sulfuriclithium", 440),
+ null,
+ new ItemStack[] {
+ CI.emptyCells(1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustSulfur", 3),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustCopper", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustSodium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustCarbon", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 4)
+ },
+ new int[] {10000, 10000, 10000, 10000, 10000},
+ 30 * 20,
+ 30);
+
+ // Makes Lithium Carbonate
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[] {
+ CI.emptyCells(12),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustLepidolite", 20)
+ }, // Item input (Array, up to 2)
+ FluidUtils.getFluidStack("sulfuricacid", 10000),
+ FluidUtils.getFluidStack("sulfuriclithium", 10000),
+ new ItemStack[] {
+ ItemUtils.getItemStackOfAmountFromOreDict("dustPotassium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustAluminium", 4),
+ ItemUtils.getItemStackOfAmountFromOreDict("cellOxygen", 10),
+ ItemUtils.getItemStackOfAmountFromOreDict("cellFluorine", 2),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumCarbonate", 3), // LithiumCarbonate
+ }, // Output Array of Items - Upto 9,
+ new int[] { 10000, 10000, 10000, 10000, 10000 },
+ 75 * 20, // Time in ticks
+ 1000); // EU
+
+ // Calcium Hydroxide
+ if ((ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 1))) || LoadedMods.IHL) {
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[] {
+ CI.getNumberedBioCircuit(20),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 10)
+ },
+ FluidUtils.getFluidStack("water", 10000),
+ null, // Fluid output (slot 2)
+ new ItemStack[] {
+ ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumHydroxide", 20)
+ }, // Output
+ new int[] { 10000 },
+ 120 * 20, // Time in ticks
+ 120); // EU
+ }
+ else {
+ Logger.INFO("[dustCalciumHydroxide] FAILED TO LOAD RECIPE");
+ if (!ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 1))) {
+ Logger.INFO("Could not find dustQuicklime, cannot make dustCalciumHydroxide.");
+ }
+ else if (!LoadedMods.IHL) {
+ Logger.INFO("IHL not loaded.");
+ }
+ }
+
+ // 2 LiOH + CaCO3
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[] {
+ CI.getNumberedAdvancedCircuit(20),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustLi2CO3CaOH2", 5)
+ }, // Item
+ null, // Fluid input (slot 1)
+ null, // Fluid output (slot 2)
+ new ItemStack[] {
+ ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 2),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustCalciumCarbonate", 3)
+ }, // Output
+ new int[] { 10000, 10000 },
+ 120 * 20, // Time in ticks
+ 1000); // EU
+
+ // LiOH Liquid to Dust
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[] {
+ CI.getNumberedAdvancedCircuit(22)
+ },
+ FluidUtils.getFluidStack("lithiumhydroxide", 144),
+ null,
+ new ItemStack[] {
+ ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumHydroxide", 1)
+ },
+ new int[] { 10000 },
+ 1 * 20, // Time in ticks
+ 64); // EU
+
+ // Zirconium Chloride -> TetraFluoride
+ FluidStack aHydrogenChloride = new FluidStack(GenericChem.HydrochloricAcid, 9000);
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[] {
+ CI.getNumberedAdvancedCircuit(11),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustCookedZrCl4", 9),
+ }, // Item
+ FluidUtils.getFluidStack("hydrofluoricacid", 9 * 144),
+ aHydrogenChloride,
+ new ItemStack[] {
+ FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getDust(9)
+ },
+ new int[] { 10000 },
+ 120 * 20, // Time in ticks
+ 500); // EU
+
+ // Zirconium Chloride -> TetraFluoride
+ FluidStack aGregtechHydro = FluidUtils.getFluidStack("hydrofluoricacid_gt5u", 1);
+ if (aGregtechHydro != null || Utils.getGregtechVersionAsInt() >= 50929) {
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[] {
+ CI.getNumberedAdvancedCircuit(10),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustCookedZrCl4", 9)
+ },
+ FluidUtils.getFluidStack("hydrofluoricacid_gt5u", 18 * 144),
+ aHydrogenChloride,
+ new ItemStack[] {
+ FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getDust(9)
+ },
+ new int[] { 10000 },
+ 240 * 20, // Time in ticks
+ 500); // EU
+ }
+
+ // Be(OH)2 + 2 (NH4)HF2 → (NH4)2BeF4 + 2 H2O
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[] {
+ CI.getNumberedAdvancedCircuit(6),
+ FLUORIDES.AMMONIUM_BIFLUORIDE.getCell(4)
+ },
+ FLUORIDES.BERYLLIUM_HYDROXIDE.getFluidStack(2000), // Fluid input (slot 1)
+ FLUORIDES.AMMONIUM_TETRAFLUOROBERYLLATE.getFluidStack(6000),
+ new ItemStack[] {
+ ItemUtils.getItemStackOfAmountFromOreDict("cellWater", 4)
+ },
+ new int[] { 10000},
+ 32 * 20, // Time in ticks
+ 64); // EU
+
+ // (NH4)2BeF4 → 2 NH3 + 2 HF + BeF2
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[] {
+ CI.getNumberedAdvancedCircuit(17),
+ CI.emptyCells(5)
+ },
+ FLUORIDES.AMMONIUM_TETRAFLUOROBERYLLATE.getFluidStack(5000),
+ null,
+ new ItemStack[] {
+ MISC_MATERIALS.AMMONIA.getCell(2),
+ ItemUtils.getItemStackOfAmountFromOreDict("cellHydrofluoricAcid", 2),
+ FLUORIDES.BERYLLIUM_FLUORIDE.getCell(1)
+ },
+ new int[] {10000, 10000, 10000},
+ 5 * 60 * 20,
+ 120);
+
+ }
+
+ private static void electroMagneticSeperator() {
+
+ // Zirconium
+ GT_Values.RA.addElectromagneticSeparatorRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedBauxite", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustBauxite", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustSmallRutile", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("nuggetZirconium", 1),
+ new int[] { 10000, 2500, 4000 },
+ 20 * 20,
+ 24);
+
+ // Zircon
+ GT_Values.RA.addElectromagneticSeparatorRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedMagnetite", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustMagnetite", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustSmallZircon", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustTinyZircon", 1),
+ new int[] { 10000, 1250, 2500 },
+ 20 * 20,
+ 24);
+ GT_Values.RA.addElectromagneticSeparatorRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedCassiterite", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustCassiterite", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustSmallZircon", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustTinyZircon", 1),
+ new int[] { 10000, 1250, 2500 },
+ 20 * 20,
+ 24);
+
+ }
+
+ private static void fluidExtractorRecipes() {
+
+ //FLiBe fuel
+ CORE.RA.addFluidExtractionRecipe(
+ NUCLIDE.Li2BeF4.getDust(1),
+ NUCLIDE.Li2BeF4.getFluidStack(144),
+ 100,
+ 500);
+ //LFTR Fuel 1
+ CORE.RA.addFluidExtractionRecipe(
+ NUCLIDE.LiFBeF2ZrF4U235.getDust(1),
+ NUCLIDE.LiFBeF2ZrF4U235.getFluidStack(144),
+ 250,
+ 1000);
+ CORE.RA.addFluidExtractionRecipe(
+ NUCLIDE.LiFBeF2ZrF4UF4.getDust(1),
+ NUCLIDE.LiFBeF2ZrF4UF4.getFluidStack(144),
+ 150,
+ 1500);
+ CORE.RA.addFluidExtractionRecipe(
+ NUCLIDE.LiFBeF2ThF4UF4.getDust(1),
+ NUCLIDE.LiFBeF2ThF4UF4.getFluidStack(144),
+ 150,
+ 2000);
+
+ //ZIRCONIUM_TETRAFLUORIDE
+ CORE.RA.addFluidExtractionRecipe(
+ FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getDust(1),
+ FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getFluidStack(144),
+ 200,
+ 512+256);
+
+ }
+
+ private static void macerator() {
+
+ GT_ModHandler.addPulverisationRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("pelletZirconium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustZrCl4", 1));
+
+ }
+
+ private static void mixerRecipes() {
+
+ GT_Values.RA.addMixerRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("dustUranium233", 4),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustUranium235", 1),
+ null,
+ null,
+ FluidUtils.getFluidStack("hydrofluoricacid", 5000),
+ FLUORIDES.URANIUM_TETRAFLUORIDE.getFluidStack(5000),
+ null,
+ 3000,
+ 500);
+
+ }
+
+
+ private static void sifter() {
+
+ // Zirconium
+ GT_Values.RA.addSifterRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedIlmenite", 1),
+ new ItemStack[] {
+ ItemUtils.getItemStackOfAmountFromOreDict("dustIron", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustTinyWroughtIron", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustHafnium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustHafnium", 1) },
+ new int[] { 5000, 2500, 1000, 1000, 300, 300 },
+ 20 * 30,
+ 500);
+ GT_Values.RA.addSifterRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedTin", 1),
+ new ItemStack[] {
+ ItemUtils.getItemStackOfAmountFromOreDict("dustTin", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustTinyZinc", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1) },
+ new int[] { 10000, 5000, 1500, 1000, 500, 500 },
+ 20 * 30,
+ 500);
+ GT_Values.RA.addSifterRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedCassiterite", 1),
+ new ItemStack[] {
+ ItemUtils.getItemStackOfAmountFromOreDict("dustCassiterite", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustTinyTin", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustZirconium", 1) },
+ new int[] { 10000, 5000, 1500, 1000, 500, 500 },
+ 20 * 30,
+ 500);
+
+ // Radium
+ GT_Values.RA.addSifterRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedUranium", 1),
+ new ItemStack[] {
+ ItemUtils.getItemStackOfAmountFromOreDict("dustUranium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustTinyLead", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1) },
+ new int[] { 10000, 5000, 1000, 500, 500, 500 },
+ 20 * 30,
+ 500);
+ GT_Values.RA.addSifterRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedUraninite", 1),
+ new ItemStack[] {
+ ItemUtils.getItemStackOfAmountFromOreDict("dustUraninite", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustTinyUranium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1) },
+ new int[] { 10000, 5000, 500, 250, 250, 250 },
+ 20 * 30,
+ 500);
+ GT_Values.RA.addSifterRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedPitchblende", 1),
+ new ItemStack[] {
+ ItemUtils.getItemStackOfAmountFromOreDict("dustPitchblende", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustTinyLead", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustRadium226", 1) },
+ new int[] { 10000, 5000, 500, 250, 250, 250 },
+ 20 * 30,
+ 500);
+ }
+
+ private static void fluidHeater() {
+
+ CORE.RA.addFluidHeaterRecipe(
+ FLUORIDES.SODIUM_FLUORIDE.getDust(1),
+ null,
+ FLUORIDES.SODIUM_FLUORIDE.getFluidStack(144),
+ 20 * 30,
+ 500);
+
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_NuclearFuelProcessing.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_NuclearFuelProcessing.java
new file mode 100644
index 0000000000..c2c8c01f45
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/recipe/RecipeLoader_NuclearFuelProcessing.java
@@ -0,0 +1,372 @@
+package gtPlusPlus.xmod.gregtech.loaders.recipe;
+
+import gregtech.api.enums.GT_Values;
+import gtPlusPlus.core.item.ModItems;
+import gtPlusPlus.core.item.chemistry.NuclearChem;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.material.ELEMENT;
+import gtPlusPlus.core.material.nuclear.FLUORIDES;
+import gtPlusPlus.core.material.nuclear.NUCLIDE;
+import gtPlusPlus.core.recipe.common.CI;
+import gtPlusPlus.core.util.minecraft.FluidUtils;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+import gtPlusPlus.core.util.minecraft.MaterialUtils;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.fluids.FluidStack;
+
+public class RecipeLoader_NuclearFuelProcessing {
+
+ public static void generate() {
+
+ // Create Fuels
+
+ final FluidStack aLithiumFluoride = FLUORIDES.LITHIUM_FLUORIDE.getFluidStack(100);
+ final FluidStack aBerylliumFluoride = FLUORIDES.BERYLLIUM_FLUORIDE.getFluidStack(100);
+ final FluidStack aThoriumFluoride = FLUORIDES.THORIUM_TETRAFLUORIDE.getFluidStack(100);
+ final FluidStack aZirconiumFluoride = FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getFluidStack(100);
+ final FluidStack aUraniumTetraFluoride = FLUORIDES.URANIUM_TETRAFLUORIDE.getFluidStack(100);
+ final FluidStack aUranium235 = ELEMENT.getInstance().URANIUM235.getFluidStack(1000);
+ final FluidStack aLiFBeF2ZrF4U235 = NUCLIDE.LiFBeF2ZrF4U235.getFluidStack(100);
+ final FluidStack aLiFBeF2ZrF4UF4 = NUCLIDE.LiFBeF2ZrF4UF4.getFluidStack(100);
+ final FluidStack aLiFBeF2ThF4UF4 = NUCLIDE.LiFBeF2ThF4UF4.getFluidStack(100);
+
+ // 7LiF - BeF2 - ZrF4 - U235 - 590C
+ CORE.RA.addFissionFuel(
+ FluidUtils.getFluidStack(aLithiumFluoride, 550),
+ FluidUtils.getFluidStack(aBerylliumFluoride, 150),
+ FluidUtils.getFluidStack(aZirconiumFluoride, 60),
+ FluidUtils.getFluidStack(aUranium235, 240),
+ null, null, null, null, null, // Extra 5 inputs
+ FluidUtils.getFluidStack(aLiFBeF2ZrF4U235, 1000),
+ null,
+ 90 * 60 * 20, // Duration
+ MaterialUtils.getVoltageForTier(4)
+ );
+
+ // 7LiF - BeF2 - ZrF4 - UF4 - 650C
+ CORE.RA.addFissionFuel(
+ FluidUtils.getFluidStack(aLithiumFluoride, 600),
+ FluidUtils.getFluidStack(aBerylliumFluoride, 250),
+ FluidUtils.getFluidStack(aZirconiumFluoride, 80),
+ FluidUtils.getFluidStack(aUraniumTetraFluoride, 70),
+ null, null, null, null, null, // Extra 5 inputs
+ FluidUtils.getFluidStack(aLiFBeF2ZrF4UF4, 1000),
+ null,
+ 120 * 60 * 20,
+ MaterialUtils.getVoltageForTier(5)
+ );
+
+ // 7liF - BeF2 - ThF4 - UF4 - 566C
+ CORE.RA.addFissionFuel(
+ FluidUtils.getFluidStack(aLithiumFluoride, 580),
+ FluidUtils.getFluidStack(aBerylliumFluoride, 270),
+ FluidUtils.getFluidStack(aThoriumFluoride, 80),
+ FluidUtils.getFluidStack(aUraniumTetraFluoride, 70),
+ null, null, null, null, null, // Extra 5 inputs
+ FluidUtils.getFluidStack(aLiFBeF2ThF4UF4, 1000),
+ null,
+ 150 * 60 * 20, // Duration
+ MaterialUtils.getVoltageForTier(5)
+ );
+
+
+ // Reprocess Fuels
+
+
+ // Reactor Blanket step 1 - Fluorination
+ CORE.RA.addReactorProcessingUnitRecipe(
+ CI.getNumberedAdvancedCircuit(17),
+ ELEMENT.getInstance().FLUORINE.getCell(6),
+ NUCLIDE.LiFThF4.getFluidStack(10000),
+ new ItemStack[] {
+ CI.emptyCells(5),
+ FLUORIDES.LITHIUM_FLUORIDE.getCell(1),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233)
+ },
+ new int[] {10000, 10000, 500, 500, 500, 250, 250, 250},
+ NUCLIDE.UF6F2.getFluidStack(1500),
+ 20 * 60 * 10,
+ MaterialUtils.getVoltageForTier(5));
+ CORE.RA.addReactorProcessingUnitRecipe(
+ CI.getNumberedAdvancedCircuit(18),
+ ELEMENT.getInstance().FLUORINE.getCell(6),
+ NUCLIDE.LiFBeF2ThF4.getFluidStack(10000),
+ new ItemStack[] {
+ CI.emptyCells(4),
+ FLUORIDES.LITHIUM_FLUORIDE.getCell(1),
+ FLUORIDES.BERYLLIUM_FLUORIDE.getCell(1),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233)
+ },
+ new int[] {10000, 10000, 10000, 1000, 1000, 1000, 500, 500, 500},
+ NUCLIDE.UF6F2.getFluidStack(3000),
+ 20 * 60 * 10,
+ MaterialUtils.getVoltageForTier(5));
+
+ // Reactor Blanket step 1 - Fluorination
+ CORE.RA.addReactorProcessingUnitRecipe(
+ CI.getNumberedAdvancedCircuit(7),
+ ELEMENT.getInstance().FLUORINE.getCell(6),
+ NUCLIDE.Sparged_LiFThF4.getFluidStack(10000),
+ new ItemStack[] {
+ CI.emptyCells(4),
+ FLUORIDES.LITHIUM_FLUORIDE.getCell(2),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233)
+ },
+ new int[] {10000, 10000, 1000, 1000, 1000, 1000, 1000, 1000},
+ NUCLIDE.UF6F2.getFluidStack(3000),
+ 20 * 60 * 5,
+ MaterialUtils.getVoltageForTier(5));
+ CORE.RA.addReactorProcessingUnitRecipe(
+ CI.getNumberedAdvancedCircuit(8),
+ ELEMENT.getInstance().FLUORINE.getCell(6),
+ NUCLIDE.Sparged_LiFBeF2ThF4.getFluidStack(10000),
+ new ItemStack[] {
+ CI.emptyCells(2),
+ FLUORIDES.LITHIUM_FLUORIDE.getCell(2),
+ FLUORIDES.BERYLLIUM_FLUORIDE.getCell(2),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233),
+ ItemUtils.getSimpleStack(ModItems.dustProtactinium233)
+ },
+ new int[] {10000, 10000, 10000, 2000, 2000, 2000, 2000, 2000, 2000},
+ NUCLIDE.UF6F2.getFluidStack(6000),
+ 20 * 60 * 5,
+ MaterialUtils.getVoltageForTier(5));
+
+
+ // Reactor Blanket step 2 - Sorption + Cold Trap
+ CORE.RA.addColdTrapRecipe(
+ 8,
+ FLUORIDES.SODIUM_FLUORIDE.getCell(4),
+ NUCLIDE.UF6F2.getFluidStack(3000),
+ new ItemStack[] {
+ ELEMENT.getInstance().FLUORINE.getCell(2),
+ FLUORIDES.URANIUM_HEXAFLUORIDE.getCell(2),
+ ELEMENT.getInstance().URANIUM233.getDust(1),
+ ELEMENT.getInstance().URANIUM233.getDust(1),
+ ELEMENT.getInstance().URANIUM233.getDust(1)
+ },
+ new int[] {10000, 10000, 3000, 2000, 1000},
+ FLUORIDES.SODIUM_FLUORIDE.getFluidStack(2000),
+ 20 * 60 * 10,
+ MaterialUtils.getVoltageForTier(3));
+
+
+
+
+ // Reactor Core step 0 - Process Burnt Salt
+ // Tier 1 Fuel - Gives back FLIBE and breeds U233
+ /* CORE.RA.addReactorProcessingUnitRecipe(
+ CI.getNumberedAdvancedCircuit(1),
+ CI.emptyCells(2),
+ new FluidStack(NuclearChem.Burnt_LiFBeF2ZrF4U235, 4000),
+ new ItemStack[] {
+ FLUORIDES.LITHIUM_FLUORIDE.getCell(1),
+ ELEMENT.getInstance().URANIUM233.getCell(1)
+ },
+ new int[] {10000, 10000},
+ NUCLIDE.LiFBeF2.getFluidStack(2000),
+ 20 * 60 * 60,
+ MaterialUtils.getVoltageForTier(3));*/
+
+
+
+ // LiBeF2UF4FP + F2 = LiFBeF2 & UF6F2FP
+ // Reactor Core step 1 - Process Burnt Salt
+ CORE.RA.addReactorProcessingUnitRecipe(
+ CI.getNumberedAdvancedCircuit(1),
+ ELEMENT.getInstance().FLUORINE.getCell(1),
+ NUCLIDE.LiFBeF2UF4FP.getFluidStack(1000),
+ new ItemStack[] {
+ NUCLIDE.UF6F2FP.getCell(1)
+ },
+ new int[] {10000},
+ FluidUtils.getFluidStack(NuclearChem.Impure_LiFBeF2, 1000),
+ 20 * 60 * 120,
+ MaterialUtils.getVoltageForTier(3));
+
+ // LiBeF2UF4FP + F2 = LiFBeF2 & UF6F2FP
+ // Reactor Core step 1 - Process Burnt Salt
+ CORE.RA.addReactorProcessingUnitRecipe(
+ CI.getNumberedAdvancedCircuit(1),
+ ELEMENT.getInstance().FLUORINE.getCell(3),
+ NUCLIDE.Sparged_LiFBeF2UF4FP.getFluidStack(1000),
+ new ItemStack[] {
+ CI.emptyCells(1),
+ NUCLIDE.UF6F2FP.getCell(2)
+ },
+ new int[] {10000},
+ FluidUtils.getFluidStack(NuclearChem.Impure_LiFBeF2, 2000),
+ 20 * 60 * 60,
+ MaterialUtils.getVoltageForTier(3));
+
+
+
+ // Reactor Core step 2A - Sorption + Cold Trap
+ CORE.RA.addColdTrapRecipe(
+ 8,
+ FLUORIDES.SODIUM_FLUORIDE.getCell(3),
+ NUCLIDE.UF6F2FP.getFluidStack(2000),
+ new ItemStack[] {
+ ELEMENT.getInstance().FLUORINE.getCell(1),
+ FLUORIDES.URANIUM_HEXAFLUORIDE.getCell(2),
+ ELEMENT.getInstance().PHOSPHORUS.getDust(1),
+ ELEMENT.getInstance().PHOSPHORUS.getDust(1),
+ ELEMENT.getInstance().PHOSPHORUS.getDust(1),
+ ELEMENT.getInstance().PHOSPHORUS.getDust(1),
+ ELEMENT.getInstance().PHOSPHORUS.getDust(1),
+ ELEMENT.getInstance().PHOSPHORUS.getDust(1),
+ ELEMENT.getInstance().PHOSPHORUS.getDust(1)
+ },
+ new int[] {10000, 10000, 5000, 5000, 5000, 5000, 5000, 5000, 5000},
+ FLUORIDES.SODIUM_FLUORIDE.getFluidStack(2000),
+ 20 * 60 * 10,
+ MaterialUtils.getVoltageForTier(4));
+
+
+ // Reactor Core step 2B - Distillation
+ GT_Values.RA.addDistillationTowerRecipe(
+ FluidUtils.getFluidStack(NuclearChem.Impure_LiFBeF2, 1000),
+ new FluidStack[] {
+ NUCLIDE.LiFBeF2.getFluidStack(250)
+ },
+ null,
+ 120 * 60 * 20,
+ MaterialUtils.getVoltageForTier(3));
+
+
+ // UF6 -> UF4 reduction
+ // UF6 + LiFBeF2 + H2 -> LiFBeF2UF4 + HF
+ CORE.RA.addBlastRecipe(
+ new ItemStack[] {
+ FLUORIDES.URANIUM_HEXAFLUORIDE.getCell(1),
+ NUCLIDE.LiFBeF2.getCell(1)
+ },
+ new FluidStack[] {
+ ELEMENT.getInstance().HYDROGEN.getFluidStack(2000)
+ },
+ new ItemStack[] {
+ ItemUtils.getItemStackOfAmountFromOreDict("cellHydrofluoricAcid", 2),
+ CI.emptyCells(1)
+ },
+ new FluidStack[] {
+ NUCLIDE.LiFBeF2UF4.getFluidStack(3000)
+ },
+ 20 * 60 * 10,
+ MaterialUtils.getVoltageForTier(4),
+ 6500);
+
+
+
+
+ // LiFBeF2ZrF4U235 - We can't add both ZrF4 and U235 here, so best we leave this disabled.
+ /*CORE.RA.addReactorProcessingUnitRecipe(
+ CI.getNumberedAdvancedCircuit(8),
+ NUCLIDE.LiFBeF2UF4.getCell(9),
+ ELEMENT.getInstance().URANIUM235.getFluidStack(1000),
+ new ItemStack[] {
+ CI.emptyCells(9)
+ },
+ new int[] {10000},
+ NUCLIDE.LiFBeF2ZrF4U235.getFluidStack(10000),
+ 20 * 60 * 5,
+ MaterialUtils.getVoltageForTier(4));*/
+
+ // LiFBeF2ZrF4UF4
+ /*CORE.RA.addReactorProcessingUnitRecipe(
+ CI.getNumberedAdvancedCircuit(9),
+ NUCLIDE.LiFBeF2UF4.getCell(9),
+ FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getFluidStack(1000),
+ new ItemStack[] {
+ CI.emptyCells(9)
+ },
+ new int[] {10000},
+ NUCLIDE.LiFBeF2ZrF4UF4.getFluidStack(10000),
+ 20 * 60 * 5,
+ MaterialUtils.getVoltageForTier(5));
+
+ CORE.RA.addReactorProcessingUnitRecipe(
+ CI.getNumberedAdvancedCircuit(9),
+ FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getCell(1),
+ NUCLIDE.LiFBeF2UF4.getFluidStack(9000),
+ new ItemStack[] {
+ CI.emptyCells(1)
+ },
+ new int[] {10000},
+ NUCLIDE.LiFBeF2ZrF4UF4.getFluidStack(10000),
+ 20 * 60 * 5,
+ MaterialUtils.getVoltageForTier(5));*/
+
+ CORE.RA.addFissionFuel(
+ FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getFluidStack(1000),
+ NUCLIDE.LiFBeF2UF4.getFluidStack(9000),
+ null,
+ null,
+ null, null, null, null, null,
+ NUCLIDE.LiFBeF2ZrF4UF4.getFluidStack(10000),
+ null,
+ 20 * 60 * 120, // Duration
+ MaterialUtils.getVoltageForTier(5)
+ );
+
+ // LiFBeF2ThF4UF4
+ /*CORE.RA.addReactorProcessingUnitRecipe(
+ CI.getNumberedAdvancedCircuit(10),
+ NUCLIDE.LiFBeF2UF4.getCell(9),
+ FLUORIDES.THORIUM_TETRAFLUORIDE.getFluidStack(1000),
+ new ItemStack[] {
+ CI.emptyCells(9)
+ },
+ new int[] {10000},
+ NUCLIDE.LiFBeF2ThF4UF4.getFluidStack(10000),
+ 20 * 60 * 5,
+ MaterialUtils.getVoltageForTier(5));
+
+ CORE.RA.addReactorProcessingUnitRecipe(
+ CI.getNumberedAdvancedCircuit(10),
+ FLUORIDES.THORIUM_TETRAFLUORIDE.getCell(1),
+ NUCLIDE.LiFBeF2UF4.getFluidStack(9000),
+ new ItemStack[] {
+ CI.emptyCells(1)
+ },
+ new int[] {10000},
+ NUCLIDE.LiFBeF2ThF4UF4.getFluidStack(10000),
+ 20 * 60 * 5,
+ MaterialUtils.getVoltageForTier(5));*/
+
+
+ CORE.RA.addFissionFuel(
+ FLUORIDES.THORIUM_TETRAFLUORIDE.getFluidStack(1000),
+ NUCLIDE.LiFBeF2UF4.getFluidStack(9000),
+ null,
+ null,
+ null, null, null, null, null,
+ NUCLIDE.LiFBeF2ThF4UF4.getFluidStack(10000),
+ null,
+ 20 * 60 * 150, // Duration
+ MaterialUtils.getVoltageForTier(5)
+ );
+
+
+
+
+ }
+}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
index 0b4649e414..be4d6a8f7d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -1,17 +1,23 @@
package gtPlusPlus.xmod.gregtech.recipes;
+import static gregtech.GT_Mod.GT_FML_LOGGER;
import static gtPlusPlus.core.lib.CORE.GTNH;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.interfaces.internal.IGT_RecipeAdder;
import gregtech.api.util.*;
+import gregtech.api.util.GTPP_Recipe.GTPP_Recipe_Map;
+import gregtech.api.util.GT_Recipe.GT_Recipe_AssemblyLine;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.data.AutoMap;
@@ -157,6 +163,30 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
return false;
}
}
+
+
+ @Override
+ public boolean addCokeOvenRecipe(int aCircuit, ItemStack aInput2, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUt) {
+ return addCokeOvenRecipe(CI.getNumberedCircuit(aCircuit), aInput2, aFluidInputs, aFluidOutputs, aOutputs, aDuration, aEUt);
+ }
+
+ @Override
+ public boolean addCokeOvenRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int aDuration, int aEUt) {
+ GTPP_Recipe aSpecialRecipe = new GTPP_Recipe(
+ true,
+ new ItemStack[] { aInput1, aInput2 },
+ aOutputs,
+ null,
+ new int[] {},
+ aFluidInputs,
+ aFluidOutputs,
+ Math.max(1, aDuration),
+ Math.max(1, aEUt),
+ 0);
+ int aSize = GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.mRecipeList.size();
+ GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.add(aSpecialRecipe);
+ return GTPP_Recipe.GTPP_Recipe_Map.sCokeOvenRecipes.mRecipeList.size() > aSize;
+ }
@Override
public boolean addMatterFabricatorRecipe(final FluidStack aFluidInput, final FluidStack aFluidOutput,
@@ -332,7 +362,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
* aOutputItems, aDuration, aEUt); return true; }
*/
- @Override
+ /*@Override
public boolean addDehydratorRecipe(final ItemStack aInput, final FluidStack aFluid, final ItemStack[] aOutput,
int aDuration, final int aEUt) {
Logger.WARNING("Trying to add a Dehydrator recipe.");
@@ -363,7 +393,7 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
Logger.WARNING("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");
return false;
}
- }
+ }*/
@Override
public boolean addDehydratorRecipe(final ItemStack[] aInput, final FluidStack aFluidInput,
@@ -371,32 +401,26 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
final int aEUt) throws IndexOutOfBoundsException {
Logger.WARNING("Trying to add a Dehydrator recipe.");
try {
- if (aInput[0] != null) {
- Logger.WARNING("Recipe requires input: " + aInput[0].getDisplayName() + " x" + aInput[0].stackSize);
- }
- if (aInput.length > 1) {
- if (aInput[1] != null) {
- Logger.WARNING("Recipe requires input: " + aInput[1].getDisplayName() + " x" + aInput[1].stackSize);
+ if (aInput != null && aInput.length > 0) {
+ if (aInput[0] != null) {
+ Logger.WARNING("Recipe requires input: " + aInput[0].getDisplayName() + " x" + aInput[0].stackSize);
+ }
+ if (aInput.length > 1) {
+ if (aInput[1] != null) {
+ Logger.WARNING("Recipe requires input: " + aInput[1].getDisplayName() + " x" + aInput[1].stackSize);
+ }
}
}
if (aFluidInput != null) {
Logger.WARNING("Recipe requires input: " + aFluidInput.getFluid().getName() + " " + aFluidInput.amount
- + "mbst");
+ + "mbs");
}
- if (((aInput[0] == null) && (aFluidInput == null)) || ((aOutputItems == null) && (aFluidOutput == null))) {
- return false;
- }
- if ((aOutputItems != null)
- && ((aDuration = GregTech_API.sRecipeFile.get("dehydrator", aOutputItems[0], aDuration)) <= 0)) {
+ if (((aInput == null || aInput.length == 0) && (aFluidInput == null)) || ((aOutputItems == null || aOutputItems.length == 0) && (aFluidOutput == null))) {
return false;
}
if (aOutputItems != null) {
Logger.WARNING("Recipe will output: " + ItemUtils.getArrayStackNames(aOutputItems));
}
- if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("dehydrator",
- aFluidOutput.getFluid().getName(), aDuration)) <= 0)) {
- return false;
- }
if (aFluidOutput != null) {
Logger.WARNING("Recipe will output: " + aFluidOutput.getFluid().getName());
}
@@ -542,21 +566,29 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
new FluidStack[] { aInput1, aInput2 }, new FluidStack[] { aOutput1 }, aDuration, aEUt, 16000);
return true;
}
-
+
@Override
public boolean addFissionFuel(final FluidStack aInput1, final FluidStack aInput2, final FluidStack aInput3,
final FluidStack aInput4, final FluidStack aInput5, final FluidStack aInput6, final FluidStack aInput7,
final FluidStack aInput8, final FluidStack aInput9, final FluidStack aOutput1, final FluidStack aOutput2,
final int aDuration, final int aEUt) {
+ return addFissionFuel(false, aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9, aOutput1, aOutput2, aDuration, aEUt);
+ }
- if ((aInput1 == null) || (aInput2 == null) || (aOutput1 == null) || (aDuration < 1) || (aEUt < 1)) {
+ @Override
+ public boolean addFissionFuel(final boolean aOptimise, final FluidStack aInput1, final FluidStack aInput2, final FluidStack aInput3,
+ final FluidStack aInput4, final FluidStack aInput5, final FluidStack aInput6, final FluidStack aInput7,
+ final FluidStack aInput8, final FluidStack aInput9, final FluidStack aOutput1, final FluidStack aOutput2,
+ final int aDuration, final int aEUt) {
+
+ if ((aInput1 == null) || (aOutput1 == null) || (aDuration < 1) || (aEUt < 1)) {
return false;
}
final FluidStack inputs[] = { aInput1, aInput2, aInput3, aInput4, aInput5, aInput6, aInput7, aInput8, aInput9 };
final FluidStack outputs[] = { aOutput1, aOutput2 };
GTPP_Recipe aSpecialRecipe = new GTPP_Recipe(
- true,
+ aOptimise,
new ItemStack[] {},
new ItemStack[] {},
null,
@@ -1004,67 +1036,74 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
return CORE.RA.addComponentMakerRecipe(aInputs, aInputFluid, aOutput1, aDuration, aEUt);
}
- public boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, FluidStack[] aFluidInputs_OLD, ItemStack aOutput, int aDuration, int aEUt) {
-
- FluidStack[] aFluidInputs = new FluidStack[4];
- AutoMap<FluidStack> aNewFluidMap = new AutoMap<FluidStack>();
- if (aFluidInputs_OLD.length > 4) {
- for (FluidStack s : aFluidInputs_OLD) {
- aNewFluidMap.put(s);
- }
- for (int i = 0; i < 4; i++) {
- aFluidInputs[i] = aNewFluidMap.get(i);
- }
- }
- else {
- aFluidInputs = aFluidInputs_OLD;
- }
-
-
- if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
- if (aInputs.length < 6 && aFluidInputs.length < 2) {
- ItemStack[] aInputStack = new ItemStack[] {aResearchItem, aInputs[0], aInputs[1], aInputs[2], aInputs[3], aInputs[4]};
- return addSixSlotAssemblingRecipe(aInputStack, aFluidInputs[0], aOutput, aDuration, aEUt);
- }
- return false;
- }
- else {
- if ((aResearchItem==null)||(aResearchTime<=0)||(aInputs == null) || (aOutput == null) || aInputs.length>15 || aInputs.length<4) {
- return false;
- }
- else {
- if (mAssemblyLine != null) {
- try {
- if (!tryAddTecTechScannerRecipe(aResearchItem, aInputs, aFluidInputs, aOutput, aDuration, aEUt)) {
- try {
- Logger.INFO("Failed to generate TecTech recipe for "+ItemUtils.getItemName(aResearchItem)+", please report this to Alkalus.");
- }
- catch (Throwable t) {
- t.printStackTrace();
- }
- }
- return (boolean) mAssemblyLine.invoke(GT_Values.RA, aResearchItem, aResearchTime, aInputs,
- aFluidInputs, aOutput, aDuration, aEUt);
- } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
- if (aInputs.length < 6 && aFluidInputs.length < 2) {
- ItemStack[] aInputStack = new ItemStack[] { aResearchItem, aInputs[0], aInputs[1],
- aInputs[2], aInputs[3], aInputs[4] };
- return addSixSlotAssemblingRecipe(aInputStack, aFluidInputs[0], aOutput, aDuration,
- aEUt);
- }
- return false;
- }
- } else {
- if (aInputs.length < 6 && aFluidInputs.length < 2) {
- ItemStack[] aInputStack = new ItemStack[] { aResearchItem, aInputs[0], aInputs[1], aInputs[2],
- aInputs[3], aInputs[4] };
- return addSixSlotAssemblingRecipe(aInputStack, aFluidInputs[0], aOutput, aDuration,
- aEUt);
- }
- return false;
- }
- }
- }
+ @Override
+ public boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, ItemStack[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt) {
+ if ((aResearchItem==null)||(aResearchTime<=0)||(aInputs == null) || (aOutput == null) || aInputs.length>15 || aInputs.length<4) {
+ return false;
+ }
+ if ((aDuration = GregTech_API.sRecipeFile.get("assemblingline", aOutput, aDuration)) <= 0) {
+ return false;
+ }
+ for(ItemStack tItem : aInputs){
+ if(tItem==null){
+ GT_FML_LOGGER.info("addAssemblingLineRecipe "+aResearchItem.getDisplayName()+" --> "+aOutput.getUnlocalizedName()+" there is some null item in that recipe");
+ }
+ }
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{aResearchItem}, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Writes Research result", new Object[0])}, null, null, aResearchTime, 30, -201);
+ GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe(false, aInputs, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0])}, aFluidInputs, null, aDuration, aEUt, 0,true);
+ GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(new GT_Recipe_AssemblyLine( aResearchItem, aResearchTime, aInputs, aFluidInputs, aOutput, aDuration, aEUt));
+ return true;
+ }
+
+ @Override
+ public boolean addAssemblylineRecipe(ItemStack aResearchItem, int aResearchTime, Object[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int aDuration, int aEUt) {
+ if ((aResearchItem==null)||(aResearchTime<=0)||(aInputs == null) || (aOutput == null) || aInputs.length>15 || aInputs.length<4) {
+ return false;
+ }
+ if ((aDuration = GregTech_API.sRecipeFile.get("assemblingline", aOutput, aDuration)) <= 0) {
+ return false;
+ }
+ ItemStack[] tInputs = new ItemStack[aInputs.length];
+ ItemStack[][] tAlts = new ItemStack[aInputs.length][];
+ for(int i = 0; i < aInputs.length; i++){
+ Object obj = aInputs[i];
+ if (obj instanceof ItemStack) {
+ tInputs[i] = (ItemStack) obj;
+ tAlts[i] = null;
+ continue;
+ } else if (obj instanceof ItemStack[]) {
+ ItemStack[] aStacks = (ItemStack[]) obj;
+ if (aStacks.length > 0) {
+ tInputs[i] = aStacks[0];
+ tAlts[i] = (ItemStack[]) Arrays.copyOf(aStacks, aStacks.length);
+ continue;
+ }
+ } else if (obj instanceof Object[]) {
+ Object[] objs = (Object[]) obj;
+ List<ItemStack> tList;
+ if (objs.length >= 2 && !(tList = GT_OreDictUnificator.getOres(objs[0])).isEmpty()) {
+ try {
+ int tAmount = ((Number) objs[1]).intValue();
+ List<ItemStack> uList = new ArrayList<>();
+ for (ItemStack tStack : tList) {
+ ItemStack uStack = GT_Utility.copyAmount(tAmount, tStack);
+ if (GT_Utility.isStackValid(uStack)) {
+ uList.add(uStack);
+ if (tInputs[i] == null)
+ tInputs[i] = uStack;
+ }
+ }
+ tAlts[i] = uList.toArray(new ItemStack[uList.size()]);
+ continue;
+ } catch (Exception t) {}
+ }
+ }
+ GT_FML_LOGGER.info("addAssemblingLineRecipe "+aResearchItem.getDisplayName()+" --> "+aOutput.getUnlocalizedName()+" there is some null item in that recipe");
+ }
+ GT_Recipe.GT_Recipe_Map.sScannerFakeRecipes.addFakeRecipe(false, new ItemStack[]{aResearchItem}, new ItemStack[]{aOutput}, new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Writes Research result", new Object[0])}, null, null, aResearchTime, 30, -201);
+ GT_Recipe.GT_Recipe_Map.sAssemblylineVisualRecipes.addFakeRecipe(false,tInputs,new ItemStack[]{aOutput},new ItemStack[]{ItemList.Tool_DataStick.getWithName(1L, "Reads Research result", new Object[0])},aFluidInputs,null,aDuration,aEUt,0,tAlts,true);
+ GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(new GT_Recipe_AssemblyLine( aResearchItem, aResearchTime, tInputs, aFluidInputs, aOutput, aDuration, aEUt, tAlts));
+ return true;
}
private boolean tryAddTecTechScannerRecipe(ItemStack aResearchItem, Object[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int assDuration, int assEUt) {
@@ -1731,8 +1770,77 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
}
+ @Override
+ public boolean addColdTrapRecipe(int aCircuit, ItemStack aInput, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, FluidStack aFluidOutput, int aTime, int aEU) {
+ GTPP_Recipe aRecipe = new GTPP_Recipe(
+ false,
+ new ItemStack[] {CI.getNumberedAdvancedCircuit(aCircuit), aInput},
+ aOutputs,
+ null,
+ aChances,
+ new FluidStack[] {aFluidInput},
+ new FluidStack[] {aFluidOutput},
+ aTime,
+ aEU,
+ 0);
+
+ int aSize = GTPP_Recipe_Map.sColdTrapRecipes.mRecipeList.size();
+ GTPP_Recipe_Map.sColdTrapRecipes.add(aRecipe);
+ return GTPP_Recipe_Map.sColdTrapRecipes.mRecipeList.size() > aSize;
+ }
+
+
+ @Override
+ public boolean addReactorProcessingUnitRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, ItemStack[] aOutputs, int[] aChances, FluidStack aFluidOutput, int aTime, int aEU) {
+ GTPP_Recipe aRecipe = new GTPP_Recipe(
+ false,
+ new ItemStack[] {aInput1, aInput2},
+ aOutputs,
+ null,
+ aChances,
+ new FluidStack[] {aFluidInput},
+ new FluidStack[] {aFluidOutput},
+ aTime,
+ aEU,
+ 0);
+ int aSize = GTPP_Recipe_Map.sReactorProcessingUnitRecipes.mRecipeList.size();
+ GTPP_Recipe_Map.sReactorProcessingUnitRecipes.add(aRecipe);
+ return GTPP_Recipe_Map.sReactorProcessingUnitRecipes.mRecipeList.size() > aSize;
+ }
+
+
+ @Override
+ public boolean addFluidHeaterRecipe(ItemStack aInput, FluidStack aFluidInput, FluidStack aOutput, int aDuration, int aEUt) {
+ if ((aInput == null && aFluidInput == null) || (aOutput == null)) {
+ return false;
+ }
+ GT_Recipe.GT_Recipe_Map.sFluidHeaterRecipes.addRecipe(true, new ItemStack[]{aInput}, null, null, new FluidStack[]{aFluidInput}, new FluidStack[]{aOutput}, aDuration, aEUt, 0);
+ return true;
+ }
+
+
+ @Override
+ public boolean addVacuumFreezerRecipe(ItemStack aInput, ItemStack aOutput, int aDuration, int aEUt) {
+ if ((aInput == null) || (aOutput == null)) {
+ return false;
+ }
+ GTPP_Recipe aRecipe = new GTPP_Recipe(
+ false,
+ new ItemStack[] {aInput},
+ new ItemStack[] {aOutput},
+ null,
+ new int[] {10000},
+ new FluidStack[] {},
+ new FluidStack[] {},
+ aDuration,
+ aEUt,
+ 0);
+ int aSize = GT_Recipe_Map.sVacuumRecipes.mRecipeList.size();
+ GT_Recipe_Map.sVacuumRecipes.add(aRecipe);
+ return GT_Recipe_Map.sVacuumRecipes.mRecipeList.size() > aSize;
+ }
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java
index 5f6f557b11..a8b5aea0e6 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java
@@ -1,12 +1,10 @@
package gtPlusPlus.xmod.gregtech.registration.gregtech;
-import net.minecraft.item.ItemStack;
-
-import gregtech.api.enums.*;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine_GT_Recipe;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.enums.ItemList;
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
import gregtech.api.util.GT_ModHandler;
-import gregtech.api.util.GTPP_Recipe;
-
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
@@ -14,8 +12,9 @@ import gtPlusPlus.core.material.ALLOY;
import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
+import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Dehydrator;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialDehydrator;
-import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.GregtechMetaTileEntity_Adv_EBF;
+import net.minecraft.item.ItemStack;
public class GregtechDehydrator {
public static void run() {
@@ -44,37 +43,67 @@ public class GregtechDehydrator {
//Basic
GregtechItemList.GT_Dehydrator_MV
- .set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(911, "machine.dehydrator.tier.00",
- "Basic Dehydrator I", 2, "This dehydrates your Grapes into Raisins. ",
- GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes, 2, 9, 16000, 2, 5, "Dehydrator.png",
- "", false, false, 0, "UNBOXINATOR", null).getStackForm(1L));
+ .set(new GT_MetaTileEntity_Dehydrator(
+ 911,
+ "machine.dehydrator.tier.00",
+ "Basic Dehydrator I",
+ 2,
+ "This dehydrates your Grapes into Raisins.",
+ 16000)
+ .getStackForm(1L));
+
GregtechItemList.GT_Dehydrator_HV
- .set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(912, "machine.dehydrator.tier.01",
- "Basic Dehydrator II", 3, "This dehydrates your Grapes into Raisins. ",
- GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes, 2, 9, 32000, 2, 5, "Dehydrator.png",
- "", false, false, 0, "UNBOXINATOR", null).getStackForm(1L));
+ .set(new GT_MetaTileEntity_Dehydrator(
+ 912,
+ "machine.dehydrator.tier.01",
+ "Basic Dehydrator II",
+ 3,
+ "This dehydrates your Grapes into Raisins.",
+ 32000)
+ .getStackForm(1L));
+
//Chemical
+
GregtechItemList.GT_Dehydrator_EV
- .set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(813, "advancedmachine.dehydrator.tier.01",
- "Chemical Dehydrator I", 4, "This dehydrates your Grapes into Raisins. ",
- GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes, 2, 9, 48000, 2, 5, "Dehydrator.png",
- "", false, false, 0, "UNBOXINATOR", null).getStackForm(1L));
- GregtechItemList.GT_Dehydrator_IV.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(814,
- "advancedmachine.dehydrator.tier.02", "Chemical Dehydrator II", 5,
- "A hangover is the way your body reacts to dehydration. ",
- GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes, 2, 9, 64000, 2, 5, "Dehydrator.png", "",
- false, false, 0, "UNBOXINATOR", null).getStackForm(1L));
- GregtechItemList.GT_Dehydrator_LuV.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(815,
- "advancedmachine.dehydrator.tier.03", "Chemical Dehydrator III", 6,
- "You could probably make space icecream with this.. ",
- GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes, 2, 9, 64000, 2, 5, "Dehydrator.png", "",
- false, false, 0, "UNBOXINATOR", null).getStackForm(1L));
- GregtechItemList.GT_Dehydrator_ZPM.set(new GT_MetaTileEntity_BasicMachine_GT_Recipe(816,
- "advancedmachine.dehydrator.tier.04", "Chemical Dehydrator IV", 7,
- "You can definitely make space icecream with this.. ",
- GTPP_Recipe.GTPP_Recipe_Map.sChemicalDehydratorRecipes, 2, 9, 64000, 2, 5, "Dehydrator.png", "",
- false, false, 0, "UNBOXINATOR", null).getStackForm(1L));
+ .set(new GT_MetaTileEntity_Dehydrator(
+ 813,
+ "advancedmachine.dehydrator.tier.01",
+ "Chemical Dehydrator I",
+ 4,
+ "A hangover is the way your body reacts to dehydration.",
+ 48000)
+ .getStackForm(1L));
+
+ GregtechItemList.GT_Dehydrator_IV
+ .set(new GT_MetaTileEntity_Dehydrator(
+ 814,
+ "advancedmachine.dehydrator.tier.02",
+ "Chemical Dehydrator II",
+ 5,
+ "A hangover is the way your body reacts to dehydration.",
+ 48000)
+ .getStackForm(1L));
+
+ GregtechItemList.GT_Dehydrator_LuV
+ .set(new GT_MetaTileEntity_Dehydrator(
+ 815,
+ "advancedmachine.dehydrator.tier.03",
+ "Chemical Dehydrator III",
+ 6,
+ "You could probably make space icecream with this..",
+ 64000)
+ .getStackForm(1L));
+
+ GregtechItemList.GT_Dehydrator_ZPM
+ .set(new GT_MetaTileEntity_Dehydrator(
+ 816,
+ "advancedmachine.dehydrator.tier.04",
+ "Chemical Dehydrator IV",
+ 7,
+ "You can definitely make space icecream with this..",
+ 64000)
+ .getStackForm(1L));
//Advanced
GregtechItemList.Controller_Vacuum_Furnace.set(new GregtechMetaTileEntity_IndustrialDehydrator(995, "multimachine.adv.vacuumfurnace", "Utupu-Tanuri").getStackForm(1L));
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElementDuplicator.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElementDuplicator.java
index 59b6d78a4f..9e940dff26 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElementDuplicator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialElementDuplicator.java
@@ -1,10 +1,8 @@
-/*
package gtPlusPlus.xmod.gregtech.registration.gregtech;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_ElementalDataOrbHolder;
-import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Steam_BusInput;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMTE_ElementalDuplicator;
public class GregtechIndustrialElementDuplicator {
@@ -19,4 +17,4 @@ public class GregtechIndustrialElementDuplicator {
}
}
-*/
+
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLFTR.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLFTR.java
index a9eee53a7c..cef60ba712 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLFTR.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechLFTR.java
@@ -3,6 +3,9 @@ package gtPlusPlus.xmod.gregtech.registration.gregtech;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
+import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaTileEntity_ReactorColdTrap;
+import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaTileEntity_ReactorProcessingUnit;
+import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_SpargeTower;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.GregtechMTE_NuclearReactor;
public class GregtechLFTR {
@@ -19,9 +22,15 @@ public class GregtechLFTR {
private static void run1() {
// LFTR
- GregtechItemList.ThoriumReactor
- .set(new GregtechMTE_NuclearReactor(751, "lftr.controller.single", "Thorium Reactor [LFTR]")
- .getStackForm(1L));
-
+ GregtechItemList.ThoriumReactor.set(new GregtechMTE_NuclearReactor(751, "lftr.controller.single", "Thorium Reactor [LFTR]").getStackForm(1L));
+ // Reactor Processing Units
+ GregtechItemList.ReactorProcessingUnit_IV.set(new GregtechMetaTileEntity_ReactorProcessingUnit(31031, "rpu.tier.01", "Reactor Processing Unit I", 5).getStackForm(1L));
+ GregtechItemList.ReactorProcessingUnit_ZPM.set(new GregtechMetaTileEntity_ReactorProcessingUnit(31032, "rpu.tier.02", "Reactor Processing Unit II", 7).getStackForm(1L));
+ // Cold Traps
+ GregtechItemList.ColdTrap_IV.set(new GregtechMetaTileEntity_ReactorColdTrap(31033, "coldtrap.tier.01", "Cold Trap I", 5).getStackForm(1L));
+ GregtechItemList.ColdTrap_ZPM.set(new GregtechMetaTileEntity_ReactorColdTrap(31034, "coldtrap.tier.02", "Cold Trap II", 7).getStackForm(1L));
+ // Sparge Tower
+ GregtechItemList.Controller_Sparge_Tower.set(new GregtechMetaTileEntity_SpargeTower(31035, "sparge.controller.single", "Sparge Tower Controller").getStackForm(1L));
+
}
}