aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Java/gregtech/api/util/Recipe_GT.java4
-rw-r--r--src/Java/gtPlusPlus/GTplusplus.java4
-rw-r--r--src/Java/gtPlusPlus/api/thermal/energy/IThermalConnection.java7
-rw-r--r--src/Java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java15
-rw-r--r--src/Java/gtPlusPlus/api/thermal/energy/IThermalHandler.java15
-rw-r--r--src/Java/gtPlusPlus/api/thermal/energy/IThermalProvider.java13
-rw-r--r--src/Java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java13
-rw-r--r--src/Java/gtPlusPlus/api/thermal/energy/IThermalStorage.java13
-rw-r--r--src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java116
-rw-r--r--src/Java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java34
-rw-r--r--src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java84
-rw-r--r--src/Java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java42
-rw-r--r--src/Java/gtPlusPlus/api/thermal/tileentity/IThermalInfo.java13
-rw-r--r--src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java89
-rw-r--r--src/Java/gtPlusPlus/core/common/CommonProxy.java47
-rw-r--r--src/Java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java15
-rw-r--r--src/Java/gtPlusPlus/core/config/ConfigHandler.java5
-rw-r--r--src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java13
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java59
-rw-r--r--src/Java/gtPlusPlus/core/handler/events/EntityDeathHandler.java95
-rw-r--r--src/Java/gtPlusPlus/core/item/ModItems.java78
-rw-r--r--src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java10
-rw-r--r--src/Java/gtPlusPlus/core/item/base/CoreItem.java5
-rw-r--r--src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java2
-rw-r--r--src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlateHeavy.java47
-rw-r--r--src/Java/gtPlusPlus/core/item/bauble/BatteryPackBaseBauble.java3
-rw-r--r--src/Java/gtPlusPlus/core/item/bauble/ElectricBaseBauble.java6
-rw-r--r--src/Java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java132
-rw-r--r--src/Java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java2
-rw-r--r--src/Java/gtPlusPlus/core/lib/CORE.java11
-rw-r--r--src/Java/gtPlusPlus/core/material/ALLOY.java7
-rw-r--r--src/Java/gtPlusPlus/core/material/ELEMENT.java2
-rw-r--r--src/Java/gtPlusPlus/core/material/MISC_MATERIALS.java89
-rw-r--r--src/Java/gtPlusPlus/core/material/ORES.java2
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java628
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java157
-rw-r--r--src/Java/gtPlusPlus/core/recipe/RECIPES_SeleniumProcessing.java217
-rw-r--r--src/Java/gtPlusPlus/core/recipe/common/CI.java27
-rw-r--r--src/Java/gtPlusPlus/core/slots/SlotAirFilter.java30
-rw-r--r--src/Java/gtPlusPlus/core/util/math/MathUtils.java9
-rw-r--r--src/Java/gtPlusPlus/core/util/minecraft/EnergyUtils.java4
-rw-r--r--src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java75
-rw-r--r--src/Java/gtPlusPlus/core/util/minecraft/FluidUtils.java52
-rw-r--r--src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java49
-rw-r--r--src/Java/gtPlusPlus/core/util/minecraft/MaterialUtils.java59
-rw-r--r--src/Java/gtPlusPlus/core/util/minecraft/PlayerUtils.java4
-rw-r--r--src/Java/gtPlusPlus/core/util/minecraft/RecipeUtils.java52
-rw-r--r--src/Java/gtPlusPlus/core/util/reflect/AddGregtechRecipe.java61
-rw-r--r--src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java232
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java346
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java14
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java51
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java11
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java46
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/interfaces/internal/IGregtech_RecipeAdder.java9
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler_Adv.java188
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Plasma.java1
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/api/metatileentity/implementations/base/GregtechMeta_MultiBlockBase.java221
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java51
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java15
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java1
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_VisualPlate.java67
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java45
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java41
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java40
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GT_MetaTileEntity_SemiFluidGenerator.java12
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/generators/GregtechMetaTileEntity_RTG.java8
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java7
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java318
-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/GregtechMetaTileEntity_CompactFusionReactor.java52
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_PocketFusion.java52
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialCentrifuge.java1
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java379
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialSifter.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/advanced/GregtechMetaTileEntity_Adv_EBF.java64
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GT4Entity_ThermalBoiler.java29
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/GregtechMetaTileEntityTreeFarm.java11
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java5
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java2
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java7
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java15
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java2107
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java6
-rw-r--r--src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFactoryGradeReplacementMultis.java (renamed from src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCryogenicFreezer.java)6
-rw-r--r--src/resources/assets/miscutils/lang/en_US.lang77
-rw-r--r--src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_B.pngbin0 -> 367 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/IndustrialDiamondExquisite.pngbin0 -> 608 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/MU-metaitem.01/130.pngbin0 -> 489 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/MU-metaitem.01/131.pngbin0 -> 451 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/MU-metaitem.01/132.pngbin0 -> 449 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/MU-metaitem.01/133.pngbin0 -> 463 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/MU-metaitem.01/134.pngbin0 -> 465 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/MU-metaitem.01/135.pngbin0 -> 462 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/MU-metaitem.01/136.pngbin0 -> 477 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/MU-metaitem.01/137.pngbin0 -> 461 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/MU-metaitem.01/138.pngbin0 -> 474 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/MU-metaitem.01/139.pngbin0 -> 482 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/baubles/itemFireProtectGlovesBetter.pngbin0 -> 1326 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/chargepack/1.pngbin0 -> 1327 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/chargepack/2.pngbin0 -> 1335 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/chargepack/3.pngbin0 -> 1340 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/chargepack/4.pngbin0 -> 1306 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/chargepack/5.pngbin0 -> 1302 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/itemFineWire.pngbin0 -> 514 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/itemHeavyPlate.pngbin597 -> 397 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/itemHeavyPlate_Overlay.pngbin0 -> 471 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/itemSmallSpring.pngbin0 -> 317 bytes
-rw-r--r--src/resources/assets/miscutils/textures/items/itemSpring.pngbin0 -> 276 bytes
-rw-r--r--src/resources/mcmod.info2
110 files changed, 5335 insertions, 1724 deletions
diff --git a/src/Java/gregtech/api/util/Recipe_GT.java b/src/Java/gregtech/api/util/Recipe_GT.java
index 611f55c8b0..1e37c9be13 100644
--- a/src/Java/gregtech/api/util/Recipe_GT.java
+++ b/src/Java/gregtech/api/util/Recipe_GT.java
@@ -12,6 +12,7 @@ import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.objects.ItemData;
+import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map_Fuel;
import gtPlusPlus.api.interfaces.IComparableRecipe;
import gtPlusPlus.api.objects.Logger;
@@ -246,7 +247,8 @@ public class Recipe_GT extends GT_Recipe implements IComparableRecipe{
public static final GT_Recipe_Map sGeoThermalFuels = new GT_Recipe_Map(new HashSet<GT_Recipe>(10), "gt.recipe.geothermalfuel", "GeoThermal Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
public static final GT_Recipe_Map sChemicalDehydratorRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(200), "gt.recipe.chemicaldehydrator", "Chemical Dehydrator", null, RES_PATH_GUI + "basicmachines/Dehydrator", 2, 9, 0, 0, 1, E, 1, E, true, true);
- public static final GT_Recipe_Map sAlloyBlastSmelterRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(200), "gt.recipe.alloyblastsmelter", "Alloy Blast Smelter", null, RES_PATH_GUI + "basicmachines/BlastSmelter", 9, 1, 1, 0, 1, E, 1, E, true, true);
+ public static final GT_Recipe_Map sVacuumFurnaceRecipes = new GT_Recipe_Map(new HashSet(500), "gt.recipe.vacfurnace", "Vacuum Furnace", null, "gregtech:textures/gui/basicmachines/Default", 2, 2, 1, 0, 1, "Heat Capacity: ", 1, " K", false, true);
+ public static final GT_Recipe_Map sAlloyBlastSmelterRecipes = new GT_Recipe_Map(new HashSet<GT_Recipe>(200), "gt.recipe.alloyblastsmelter", "Alloy Blast Smelter", null, RES_PATH_GUI + "basicmachines/BlastSmelter", 9, 9, 1, 0, 1, E, 1, E, true, true);
public static final GT_Recipe_Map sSteamTurbineFuels = new GT_Recipe_Map(new HashSet<GT_Recipe>(10), "gt.recipe.geothermalfuel", "GeoThermal Fuel", null, RES_PATH_GUI + "basicmachines/Default", 1, 1, 0, 0, 1, "Fuel Value: ", 1000, " EU", true, true);
//LFTR recipes
diff --git a/src/Java/gtPlusPlus/GTplusplus.java b/src/Java/gtPlusPlus/GTplusplus.java
index 424a63e9bf..c51b2e2997 100644
--- a/src/Java/gtPlusPlus/GTplusplus.java
+++ b/src/Java/gtPlusPlus/GTplusplus.java
@@ -30,6 +30,7 @@ import gregtech.api.util.Recipe_GT;
import gregtech.api.util.SemiFluidFuelHandler;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.commands.CommandDebugChunks;
+import gtPlusPlus.core.commands.CommandEnableDebugWhileRunning;
import gtPlusPlus.core.commands.CommandMath;
import gtPlusPlus.core.common.CommonProxy;
import gtPlusPlus.core.config.ConfigHandler;
@@ -231,7 +232,8 @@ public class GTplusplus implements ActionListener {
public synchronized void serverStarting(final FMLServerStartingEvent event) {
INIT_PHASE.SERVER_START.setPhaseActive(true);
mChunkLoading.serverStarting(event);
- event.registerServerCommand(new CommandMath());
+ event.registerServerCommand(new CommandMath());
+ event.registerServerCommand(new CommandEnableDebugWhileRunning());
event.registerServerCommand(new CommandDebugChunks());
if (LoadedMods.Thaumcraft) {
event.registerServerCommand(new CommandDumpAspects());
diff --git a/src/Java/gtPlusPlus/api/thermal/energy/IThermalConnection.java b/src/Java/gtPlusPlus/api/thermal/energy/IThermalConnection.java
new file mode 100644
index 0000000000..d8573000fc
--- /dev/null
+++ b/src/Java/gtPlusPlus/api/thermal/energy/IThermalConnection.java
@@ -0,0 +1,7 @@
+package gtPlusPlus.api.thermal.energy;
+
+import net.minecraftforge.common.util.ForgeDirection;
+
+public interface IThermalConnection {
+ boolean canConnectThermalEnergy(ForgeDirection arg0);
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java b/src/Java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java
new file mode 100644
index 0000000000..072695bd76
--- /dev/null
+++ b/src/Java/gtPlusPlus/api/thermal/energy/IThermalContainerItem.java
@@ -0,0 +1,15 @@
+package gtPlusPlus.api.thermal.energy;
+
+import net.minecraft.item.ItemStack;
+
+public interface IThermalContainerItem {
+
+ int receiveThermalEnergy(ItemStack arg0, int arg1, boolean arg2);
+
+ int extractThermalEnergy(ItemStack arg0, int arg1, boolean arg2);
+
+ int getThermalEnergyStored(ItemStack arg0);
+
+ int getMaxThermalEnergyStored(ItemStack arg0);
+
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/api/thermal/energy/IThermalHandler.java b/src/Java/gtPlusPlus/api/thermal/energy/IThermalHandler.java
new file mode 100644
index 0000000000..3ab7127757
--- /dev/null
+++ b/src/Java/gtPlusPlus/api/thermal/energy/IThermalHandler.java
@@ -0,0 +1,15 @@
+package gtPlusPlus.api.thermal.energy;
+
+import net.minecraftforge.common.util.ForgeDirection;
+
+public interface IThermalHandler extends IThermalProvider, IThermalReceiver {
+
+ int receiveThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2);
+
+ int extractThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2);
+
+ int getThermalEnergyStored(ForgeDirection arg0);
+
+ int getMaxThermalEnergyStored(ForgeDirection arg0);
+
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/api/thermal/energy/IThermalProvider.java b/src/Java/gtPlusPlus/api/thermal/energy/IThermalProvider.java
new file mode 100644
index 0000000000..0e4a060b23
--- /dev/null
+++ b/src/Java/gtPlusPlus/api/thermal/energy/IThermalProvider.java
@@ -0,0 +1,13 @@
+package gtPlusPlus.api.thermal.energy;
+
+import net.minecraftforge.common.util.ForgeDirection;
+
+public interface IThermalProvider extends IThermalConnection {
+
+ int extractThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2);
+
+ int getThermalEnergyStored(ForgeDirection arg0);
+
+ int getMaxThermalEnergyStored(ForgeDirection arg0);
+
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java b/src/Java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java
new file mode 100644
index 0000000000..e08ce48a06
--- /dev/null
+++ b/src/Java/gtPlusPlus/api/thermal/energy/IThermalReceiver.java
@@ -0,0 +1,13 @@
+package gtPlusPlus.api.thermal.energy;
+
+import net.minecraftforge.common.util.ForgeDirection;
+
+public interface IThermalReceiver extends IThermalConnection {
+
+ int receiveThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2);
+
+ int getThermalEnergyStored(ForgeDirection arg0);
+
+ int getMaxThermalEnergyStored(ForgeDirection arg0);
+
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/api/thermal/energy/IThermalStorage.java b/src/Java/gtPlusPlus/api/thermal/energy/IThermalStorage.java
new file mode 100644
index 0000000000..db3e6c8966
--- /dev/null
+++ b/src/Java/gtPlusPlus/api/thermal/energy/IThermalStorage.java
@@ -0,0 +1,13 @@
+package gtPlusPlus.api.thermal.energy;
+
+public interface IThermalStorage {
+
+ int receiveThermalEnergy(int arg0, boolean arg1);
+
+ int extractThermalEnergy(int arg0, boolean arg1);
+
+ int getThermalEnergyStored();
+
+ int getMaxThermalEnergyStored();
+
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java b/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java
new file mode 100644
index 0000000000..9c7bb0066c
--- /dev/null
+++ b/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorage.java
@@ -0,0 +1,116 @@
+package gtPlusPlus.api.thermal.energy;
+
+import net.minecraft.nbt.NBTTagCompound;
+
+public class ThermalStorage implements IThermalStorage {
+
+ protected int thermal_energy;
+ protected int capacity;
+ protected int maxReceive;
+ protected int maxExtract;
+
+ public ThermalStorage(int arg0) {
+ this(arg0, arg0, arg0);
+ }
+
+ public ThermalStorage(int arg0, int arg1) {
+ this(arg0, arg1, arg1);
+ }
+
+ public ThermalStorage(int arg0, int arg1, int arg2) {
+ this.capacity = arg0;
+ this.maxReceive = arg1;
+ this.maxExtract = arg2;
+ }
+
+ public ThermalStorage readFromNBT(NBTTagCompound arg0) {
+ this.thermal_energy = arg0.getInteger("ThermalEnergy");
+ if (this.thermal_energy > this.capacity) {
+ this.thermal_energy = this.capacity;
+ }
+ return this;
+ }
+
+ public NBTTagCompound writeToNBT(NBTTagCompound arg0) {
+ if (this.thermal_energy < 0) {
+ this.thermal_energy = 0;
+ }
+ arg0.setInteger("ThermalEnergy", this.thermal_energy);
+ return arg0;
+ }
+
+ public void setCapacity(int arg0) {
+ this.capacity = arg0;
+ if (this.thermal_energy > arg0) {
+ this.thermal_energy = arg0;
+ }
+
+ }
+
+ public void setMaxTransfer(int arg0) {
+ this.setMaxReceive(arg0);
+ this.setMaxExtract(arg0);
+ }
+
+ public void setMaxReceive(int arg0) {
+ this.maxReceive = arg0;
+ }
+
+ public void setMaxExtract(int arg0) {
+ this.maxExtract = arg0;
+ }
+
+ public int getMaxReceive() {
+ return this.maxReceive;
+ }
+
+ public int getMaxExtract() {
+ return this.maxExtract;
+ }
+
+ public void setEnergyStored(int arg0) {
+ this.thermal_energy = arg0;
+ if (this.thermal_energy > this.capacity) {
+ this.thermal_energy = this.capacity;
+ } else if (this.thermal_energy < 0) {
+ this.thermal_energy = 0;
+ }
+
+ }
+
+ public void modifyEnergyStored(int arg0) {
+ this.thermal_energy += arg0;
+ if (this.thermal_energy > this.capacity) {
+ this.thermal_energy = this.capacity;
+ } else if (this.thermal_energy < 0) {
+ this.thermal_energy = 0;
+ }
+
+ }
+
+ public int receiveThermalEnergy(int arg0, boolean arg1) {
+ int arg2 = Math.min(this.capacity - this.thermal_energy, Math.min(this.maxReceive, arg0));
+ if (!arg1) {
+ this.thermal_energy += arg2;
+ }
+
+ return arg2;
+ }
+
+ public int extractThermalEnergy(int arg0, boolean arg1) {
+ int arg2 = Math.min(this.thermal_energy, Math.min(this.maxExtract, arg0));
+ if (!arg1) {
+ this.thermal_energy -= arg2;
+ }
+
+ return arg2;
+ }
+
+ public int getThermalEnergyStored() {
+ return this.thermal_energy;
+ }
+
+ public int getMaxThermalEnergyStored() {
+ return this.capacity;
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java b/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java
new file mode 100644
index 0000000000..47af7e79a6
--- /dev/null
+++ b/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java
@@ -0,0 +1,34 @@
+package gtPlusPlus.api.thermal.energy;
+
+public class ThermalStorageAdv extends ThermalStorage {
+
+ public ThermalStorageAdv(int arg0) {
+ this(arg0, arg0, arg0);
+ }
+
+ public ThermalStorageAdv(int arg0, int arg1) {
+ this(arg0, arg1, arg1);
+ }
+
+ public ThermalStorageAdv(int arg0, int arg1, int arg2) {
+ super(arg0, arg1, arg2);
+ }
+
+ public int receiveEnergyNoLimit(int arg0, boolean arg1) {
+ int arg2 = Math.min(super.capacity - super.thermal_energy, arg0);
+ if (!arg1) {
+ super.thermal_energy += arg2;
+ }
+
+ return arg2;
+ }
+
+ public int extractEnergyNoLimit(int arg0, boolean arg1) {
+ int arg2 = Math.min(super.thermal_energy, arg0);
+ if (!arg1) {
+ super.thermal_energy -= arg2;
+ }
+
+ return arg2;
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java b/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java
new file mode 100644
index 0000000000..015e5fd5f3
--- /dev/null
+++ b/src/Java/gtPlusPlus/api/thermal/sample/ItemThermalContainer.java
@@ -0,0 +1,84 @@
+package gtPlusPlus.api.thermal.sample;
+
+import gtPlusPlus.api.thermal.energy.IThermalContainerItem;
+import net.minecraft.item.Item;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+
+public class ItemThermalContainer extends Item implements IThermalContainerItem {
+ protected int capacity;
+ protected int maxReceive;
+ protected int maxExtract;
+
+ public ItemThermalContainer() {
+ }
+
+ public ItemThermalContainer(int arg0) {
+ this(arg0, arg0, arg0);
+ }
+
+ public ItemThermalContainer(int arg0, int arg1) {
+ this(arg0, arg1, arg1);
+ }
+
+ public ItemThermalContainer(int arg0, int arg1, int arg2) {
+ this.capacity = arg0;
+ this.maxReceive = arg1;
+ this.maxExtract = arg2;
+ }
+
+ public ItemThermalContainer setCapacity(int arg0) {
+ this.capacity = arg0;
+ return this;
+ }
+
+ public void setMaxTransfer(int arg0) {
+ this.setMaxReceive(arg0);
+ this.setMaxExtract(arg0);
+ }
+
+ public void setMaxReceive(int arg0) {
+ this.maxReceive = arg0;
+ }
+
+ public void setMaxExtract(int arg0) {
+ this.maxExtract = arg0;
+ }
+
+ public int receiveThermalEnergy(ItemStack arg0, int arg1, boolean arg2) {
+ if (arg0.getTagCompound() == null) {
+ arg0.stackTagCompound = new NBTTagCompound();
+ }
+ int arg3 = arg0.stackTagCompound.getInteger("ThermalEnergy");
+ int arg4 = Math.min(this.capacity - arg3, Math.min(this.maxReceive, arg1));
+ if (!arg2) {
+ arg3 += arg4;
+ arg0.stackTagCompound.setInteger("ThermalEnergy", arg3);
+ }
+ return arg4;
+ }
+
+ public int extractThermalEnergy(ItemStack arg0, int arg1, boolean arg2) {
+ if (arg0.stackTagCompound != null && arg0.stackTagCompound.hasKey("ThermalEnergy")) {
+ int arg3 = arg0.stackTagCompound.getInteger("ThermalEnergy");
+ int arg4 = Math.min(arg3, Math.min(this.maxExtract, arg1));
+ if (!arg2) {
+ arg3 -= arg4;
+ arg0.stackTagCompound.setInteger("ThermalEnergy", arg3);
+ }
+ return arg4;
+ } else {
+ return 0;
+ }
+ }
+
+ public int getThermalEnergyStored(ItemStack arg0) {
+ return arg0.stackTagCompound != null && arg0.stackTagCompound.hasKey("ThermalEnergy")
+ ? arg0.stackTagCompound.getInteger("ThermalEnergy")
+ : 0;
+ }
+
+ public int getMaxThermalEnergyStored(ItemStack arg0) {
+ return this.capacity;
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java b/src/Java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java
new file mode 100644
index 0000000000..e2e3c50ab7
--- /dev/null
+++ b/src/Java/gtPlusPlus/api/thermal/sample/TileThermalHandler.java
@@ -0,0 +1,42 @@
+package gtPlusPlus.api.thermal.sample;
+
+import gtPlusPlus.api.thermal.energy.IThermalHandler;
+import gtPlusPlus.api.thermal.energy.ThermalStorage;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.tileentity.TileEntity;
+import net.minecraftforge.common.util.ForgeDirection;
+
+public class TileThermalHandler extends TileEntity implements IThermalHandler {
+
+ protected ThermalStorage storage = new ThermalStorage(32000);
+
+ public void readFromNBT(NBTTagCompound arg0) {
+ super.readFromNBT(arg0);
+ this.storage.readFromNBT(arg0);
+ }
+
+ public void writeToNBT(NBTTagCompound arg0) {
+ super.writeToNBT(arg0);
+ this.storage.writeToNBT(arg0);
+ }
+
+ public boolean canConnectThermalEnergy(ForgeDirection arg0) {
+ return true;
+ }
+
+ public int receiveThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2) {
+ return this.storage.receiveThermalEnergy(arg1, arg2);
+ }
+
+ public int extractThermalEnergy(ForgeDirection arg0, int arg1, boolean arg2) {
+ return this.storage.extractThermalEnergy(arg1, arg2);
+ }
+
+ public int getThermalEnergyStored(ForgeDirection arg0) {
+ return this.storage.getThermalEnergyStored();
+ }
+
+ public int getMaxThermalEnergyStored(ForgeDirection arg0) {
+ return this.storage.getMaxThermalEnergyStored();
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/api/thermal/tileentity/IThermalInfo.java b/src/Java/gtPlusPlus/api/thermal/tileentity/IThermalInfo.java
new file mode 100644
index 0000000000..a40535887c
--- /dev/null
+++ b/src/Java/gtPlusPlus/api/thermal/tileentity/IThermalInfo.java
@@ -0,0 +1,13 @@
+package gtPlusPlus.api.thermal.tileentity;
+
+public interface IThermalInfo {
+
+ int getInfoEnergyPerTick();
+
+ int getInfoMaxEnergyPerTick();
+
+ int getInfoEnergyStored();
+
+ int getInfoMaxEnergyStored();
+
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java
new file mode 100644
index 0000000000..3a7d4461f4
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/commands/CommandEnableDebugWhileRunning.java
@@ -0,0 +1,89 @@
+package gtPlusPlus.core.commands;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.minecraft.PlayerUtils;
+import net.minecraft.command.ICommand;
+import net.minecraft.command.ICommandSender;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.world.World;
+
+
+public class CommandEnableDebugWhileRunning implements ICommand
+{
+ private final List<String> aliases;
+
+ public CommandEnableDebugWhileRunning(){
+ this.aliases = new ArrayList<>();
+ }
+
+ @Override
+ public int compareTo(final Object o){
+ return 0;
+
+ }
+
+ @Override
+ public String getCommandName(){
+ return "debugmodegtpp";
+
+ }
+
+ @Override
+ public String getCommandUsage(final ICommandSender var1){
+ return "/debugmodegtpp";
+
+ }
+
+ @Override
+ public List<String> getCommandAliases(){
+ return this.aliases;
+
+ }
+
+ @Override
+ public void processCommand(final ICommandSender S, final String[] argString){
+ Logger.INFO("Toggling Debug Mode");
+
+ final World W = S.getEntityWorld();
+ final EntityPlayer P = CommandUtils.getPlayer(S);
+
+ if (PlayerUtils.isPlayerOP(P)) {
+ CORE.DEBUG = Utils.invertBoolean(CORE.DEBUG);
+ PlayerUtils.messagePlayer(P, "Toggled GT++ Debug Mode - Enabled: "+CORE.DEBUG);
+ }
+
+ }
+
+ @Override
+ public boolean canCommandSenderUseCommand(final ICommandSender var1){
+ if (var1 == null) {
+ return false;
+ }
+ final EntityPlayer P = CommandUtils.getPlayer(var1);
+ if (P != null && PlayerUtils.isPlayerOP(P)) {
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public List<?> addTabCompletionOptions(final ICommandSender var1, final String[] var2){
+ return null;
+ }
+
+ @Override
+ public boolean isUsernameIndex(final String[] var1, final int var2){
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean playerUsesCommand(final World W, final EntityPlayer P, final int cost){
+ return true;
+ }
+
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/common/CommonProxy.java b/src/Java/gtPlusPlus/core/common/CommonProxy.java
index cacc471249..03b0f944b7 100644
--- a/src/Java/gtPlusPlus/core/common/CommonProxy.java
+++ b/src/Java/gtPlusPlus/core/common/CommonProxy.java
@@ -27,6 +27,8 @@ import gtPlusPlus.core.handler.COMPAT_IntermodStaging;
import gtPlusPlus.core.handler.GuiHandler;
import gtPlusPlus.core.handler.StopAnnoyingFuckingAchievements;
import gtPlusPlus.core.handler.events.BlockEventHandler;
+import gtPlusPlus.core.handler.events.EnderDragonDeathHandler;
+import gtPlusPlus.core.handler.events.EntityDeathHandler;
import gtPlusPlus.core.handler.events.GeneralTooltipEventHandler;
import gtPlusPlus.core.handler.events.PickaxeBlockBreakEventHandler;
import gtPlusPlus.core.handler.events.ZombieBackupSpawnEventHandler;
@@ -35,17 +37,26 @@ import gtPlusPlus.core.item.chemistry.GenericChem;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.CORE.ConfigSwitches;
import gtPlusPlus.core.lib.LoadedMods;
+import gtPlusPlus.core.material.ALLOY;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.tileentities.ModTileEntities;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.debug.DEBUG_INIT;
+import gtPlusPlus.core.util.minecraft.EntityUtils;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.player.PlayerCache;
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.plugin.villagers.block.BlockGenericSpawner;
import gtPlusPlus.xmod.eio.handler.HandlerTooltip_EIO;
import gtPlusPlus.xmod.galacticraft.handler.HandlerTooltip_GC;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
+import gtPlusPlus.xmod.thermalfoundation.item.TF_Items;
+import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
+import net.minecraft.entity.monster.EntityBlaze;
+import net.minecraft.entity.monster.EntityZombie;
+import net.minecraft.item.ItemStack;
import net.minecraftforge.common.ForgeChunkManager;
public class CommonProxy {
@@ -145,6 +156,8 @@ public class CommonProxy {
// Register Chunkloader
ForgeChunkManager.setForcedChunkLoadingCallback(GTplusplus.instance, ChunkManager.getInstance());
Utils.registerEvent(ChunkManager.getInstance());
+ Utils.registerEvent(new EnderDragonDeathHandler());
+ Utils.registerEvent(new EntityDeathHandler());
if (ConfigSwitches.disableZombieReinforcement) {
// Make Zombie reinforcements fuck off.
@@ -179,6 +192,7 @@ public class CommonProxy {
COMPAT_HANDLER.startLoadingGregAPIBasedRecipes();
COMPAT_IntermodStaging.postInit(e);
COMPAT_HANDLER.runQueuedRecipes();
+ registerCustomMobDrops();
}
public void serverStarting(final FMLServerStartingEvent e) {
@@ -224,5 +238,38 @@ public class CommonProxy {
public void registerCustomItemsForMaterials() {
Material.registerComponentForMaterial(GenericChem.CARBYNE, OrePrefixes.plate, GregtechItemList.Carbyne_Sheet_Finished.get(1));
}
+
+ public void registerCustomMobDrops() {
+
+ //Zombie
+ EntityUtils.registerDropsForMob(EntityZombie.class, ItemUtils.getSimpleStack(ModItems.itemRope), 3, 100);
+ EntityUtils.registerDropsForMob(EntityZombie.class, ItemUtils.getSimpleStack(ModItems.itemFiber), 5, 250);
+ EntityUtils.registerDropsForMob(EntityZombie.class, ItemUtils.getSimpleStack(ModItems.itemSandstoneHammer), 1, 10);
+ EntityUtils.registerDropsForMob(EntityZombie.class, ItemUtils.getSimpleStack(ModItems.itemBomb), 2, 10);
+ EntityUtils.registerDropsForMob(EntityZombie.class, ALLOY.TUMBAGA.getTinyDust(1), 1, 10);
+ EntityUtils.registerDropsForMob(EntityZombie.class, ALLOY.POTIN.getTinyDust(1), 1, 10);
+
+ //Blazes
+ if (ItemUtils.doesOreDictHaveEntryFor("dustPyrotheum")) {
+ EntityUtils.registerDropsForMob(EntityBlaze.class, ItemUtils.getItemStackOfAmountFromOreDict("dustPyrotheum", 1), 1, 10);
+ EntityUtils.registerDropsForMob(EntityBlaze.class, ItemUtils.getItemStackOfAmountFromOreDict("dustPyrotheum", 1), 1, 10);
+ }
+
+
+ //Special mobs Support
+ if (ReflectionUtils.doesClassExist("toast.specialMobs.entity.zombie.EntityBrutishZombie")) {
+ Class aBrutishZombie = ReflectionUtils.getClass("toast.specialMobs.entity.zombie.EntityBrutishZombie");
+ ItemStack aFortune1 = ItemUtils.getEnchantedBook(Enchantment.fortune, 1);
+ ItemStack aFortune2 = ItemUtils.getEnchantedBook(Enchantment.fortune, 1);
+ ItemStack aFortune3 = ItemUtils.getEnchantedBook(Enchantment.fortune, 1);
+ EntityUtils.registerDropsForMob(aBrutishZombie, aFortune1, 1, 100);
+ EntityUtils.registerDropsForMob(aBrutishZombie, aFortune2, 1, 50);
+ EntityUtils.registerDropsForMob(aBrutishZombie, aFortune3, 1, 1);
+ EntityUtils.registerDropsForMob(aBrutishZombie, ItemUtils.getItemStackOfAmountFromOreDict("ingotRedAlloy", 1), 3, 200);
+ }
+
+
+
+ }
}
diff --git a/src/Java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java b/src/Java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java
index c6fcc83d01..c9704603af 100644
--- a/src/Java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java
+++ b/src/Java/gtPlusPlus/core/common/compat/COMPAT_Baubles.java
@@ -3,6 +3,7 @@ package gtPlusPlus.core.common.compat;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.item.ModItems;
import gtPlusPlus.core.item.bauble.BatteryPackBaseBauble;
+import gtPlusPlus.core.item.bauble.FireProtectionBauble;
import gtPlusPlus.core.item.bauble.MonsterKillerBaseBauble;
import gtPlusPlus.core.item.general.ItemCloakingDevice;
import gtPlusPlus.core.item.general.ItemHealingDevice;
@@ -34,12 +35,18 @@ public class COMPAT_Baubles {
ModItems.itemPersonalCloakingDevice = new ItemCloakingDevice(0);
//itemPersonalCloakingDeviceCharged = new ItemCloakingDevice(0).set;
ModItems.itemPersonalHealingDevice = new ItemHealingDevice();
+ ModItems.itemPersonalFireProofDevice = new FireProtectionBauble();
try {
- ModItems.itemChargePack1 = new BatteryPackBaseBauble(6);
- ModItems.itemChargePack2 = new BatteryPackBaseBauble(7);
- ModItems.itemChargePack3 = new BatteryPackBaseBauble(8);
- ModItems.itemChargePack4 = new BatteryPackBaseBauble(9);
+ ModItems.itemChargePack_Low_1 = new BatteryPackBaseBauble(1);
+ ModItems.itemChargePack_Low_2 = new BatteryPackBaseBauble(2);
+ ModItems.itemChargePack_Low_3 = new BatteryPackBaseBauble(3);
+ ModItems.itemChargePack_Low_4 = new BatteryPackBaseBauble(4);
+ ModItems.itemChargePack_Low_5 = new BatteryPackBaseBauble(5);
+ ModItems.itemChargePack_High_1 = new BatteryPackBaseBauble(6);
+ ModItems.itemChargePack_High_2 = new BatteryPackBaseBauble(7);
+ ModItems.itemChargePack_High_3 = new BatteryPackBaseBauble(8);
+ ModItems.itemChargePack_High_4 = new BatteryPackBaseBauble(9);
}
catch (Throwable t) {
t.printStackTrace();
diff --git a/src/Java/gtPlusPlus/core/config/ConfigHandler.java b/src/Java/gtPlusPlus/core/config/ConfigHandler.java
index 64c8b74b33..89c1324a54 100644
--- a/src/Java/gtPlusPlus/core/config/ConfigHandler.java
+++ b/src/Java/gtPlusPlus/core/config/ConfigHandler.java
@@ -72,7 +72,10 @@ public class ConfigHandler {
enableAnimatedTurbines = config.getBoolean("enableAnimatedTurbines", "gregtech", true,
"Gives GT Gas/Steam turbines animated textures while running.");
turbineCutoffBase = config.getInt("turbineCutoffBase", "gregtech", 75000, 0, Integer.MAX_VALUE, "Rotors below this durability will be removed, prevents NEI clutter. Minimum Durability is N * x, where N is the new value set and x is the turbine size, where 1 is Tiny and 4 is Huge. Set to 0 to disable.");
-
+
+ enableHarderRecipesForHighTierCasings = config.getBoolean("enableHarderRecipesForHighTierCasings", "gregtech", false,
+ "Makes LuV+ Casings and Hulls more difficult to craft.");
+
// Pipes & Cables
enableCustom_Pipes = config.getBoolean("enableCustom_Pipes", "gregtech", true,
"Adds Custom GT Fluid Pipes.");
diff --git a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
index 1e3cb0ffbb..fd30457b46 100644
--- a/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
+++ b/src/Java/gtPlusPlus/core/handler/COMPAT_HANDLER.java
@@ -22,6 +22,9 @@ import gtPlusPlus.core.recipe.*;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.minecraft.RecipeUtils;
import gtPlusPlus.xmod.gregtech.HANDLER_GT;
+import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
+import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaGarbageCollector;
+import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaPollutionCreator;
import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_Recycling;
import gtPlusPlus.xmod.gregtech.registration.gregtech.*;
import net.minecraft.item.ItemStack;
@@ -49,6 +52,14 @@ public class COMPAT_HANDLER {
public static void registerGregtechMachines() {
if (Gregtech) {
+ //Debug
+ GregtechItemList.Garbage_Collector_Debug_Machine.set(
+ new GregtechMetaGarbageCollector(
+ "garbagecollector.01.tier.single",
+ "JVM Garbage Collector",
+ "Useful for debugging or smoother performance on local servers").getStackForm(1L));
+
+
//Free IDs
/*
---
@@ -114,7 +125,7 @@ public class COMPAT_HANDLER {
GregtechBedrockPlatforms.run();
GregtechBufferDynamos.run();
GregtechAmazonWarehouse.run();
- GregtechIndustrialCryogenicFreezer.run();
+ GregtechFactoryGradeReplacementMultis.run();
GregtechThaumcraftDevices.run();
GregtechThreadedBuffers.run();
GregtechIndustrialMixer.run();
diff --git a/src/Java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java b/src/Java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java
new file mode 100644
index 0000000000..884f14386d
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/handler/events/EnderDragonDeathHandler.java
@@ -0,0 +1,59 @@
+package gtPlusPlus.core.handler.events;
+
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import gtPlusPlus.core.material.ELEMENT;
+import gtPlusPlus.core.util.math.MathUtils;
+import gtPlusPlus.core.util.minecraft.PlayerUtils;
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
+import net.minecraft.entity.boss.EntityDragon;
+import net.minecraftforge.event.entity.living.LivingDropsEvent;
+
+public class EnderDragonDeathHandler {
+
+ private static final String mDragonClassName = "chylex.hee.entity.boss.EntityBossDragon";
+ private static final boolean mHEE;
+ private static final Class mHardcoreDragonClass;
+
+ static {
+ mHEE = ReflectionUtils.doesClassExist(mDragonClassName);
+ mHardcoreDragonClass = (mHEE ? ReflectionUtils.getClass(mDragonClassName) : null);
+ }
+
+ @SubscribeEvent
+ public void onEntityDrop(LivingDropsEvent event) {
+
+ boolean aDidDrop = false;
+ int aCountTotal = 0;
+
+ //HEE Dragon
+ if (mHEE) {
+ if (mHardcoreDragonClass != null) {
+ if (mHardcoreDragonClass.isInstance(event.entityLiving)) {
+ for (int y = 0; y < MathUtils.randInt(100, 250); y++) {
+ int aAmount = MathUtils.randInt(5, 25);
+ event.entityLiving.entityDropItem(ELEMENT.STANDALONE.DRAGON_METAL.getNugget(aAmount), MathUtils.randFloat(0, 1));
+ aDidDrop = true;
+ aCountTotal =+ aAmount;
+ }
+ }
+ }
+ }
+ //Vanilla Dragon or any other dragon that extends it
+ else {
+ if (event.entityLiving instanceof EntityDragon) {
+ for (int y = 0; y < MathUtils.randInt(25, 50); y++) {
+ int aAmount = MathUtils.randInt(1, 10);
+ event.entityLiving.entityDropItem(ELEMENT.STANDALONE.DRAGON_METAL.getNugget(aAmount), MathUtils.randFloat(0, 1));
+ aDidDrop = true;
+ aCountTotal =+ aAmount;
+ }
+ }
+ }
+
+ if (aDidDrop) {
+ PlayerUtils.messageAllPlayers(aCountTotal+" Shards of Dragons Blood have crystalized into a metallic form.");
+ }
+
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/core/handler/events/EntityDeathHandler.java b/src/Java/gtPlusPlus/core/handler/events/EntityDeathHandler.java
new file mode 100644
index 0000000000..c4ab6edaa6
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/handler/events/EntityDeathHandler.java
@@ -0,0 +1,95 @@
+package gtPlusPlus.core.handler.events;
+
+import java.util.HashMap;
+import java.util.HashSet;
+
+import cpw.mods.fml.common.eventhandler.SubscribeEvent;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.api.objects.data.Triplet;
+import gtPlusPlus.core.util.math.MathUtils;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.item.ItemStack;
+import net.minecraftforge.event.entity.living.LivingDropsEvent;
+
+public class EntityDeathHandler {
+
+
+ private static final HashMap<Class, AutoMap<Triplet<ItemStack, Integer, Integer>>> mMobDropMap = new HashMap<Class, AutoMap<Triplet<ItemStack, Integer, Integer>>>();
+ private static final HashSet<Class> mInternalClassKeyCache = new HashSet<Class>();
+
+ /**
+ * Provides the ability to provide custom drops upon the death of EntityLivingBase objects.
+ * @param aMobClass - The Base Class you want to drop this item.
+ * @param aStack - The ItemStack, stack size is not respected.
+ * @param aMaxAmount - The maximum size of the ItemStack which drops.
+ * @param aChance - Chance out of 10000, where 100 is 1%. (1 = 0.01% - this is ok)
+ */
+ public static void registerDropsForMob(Class aMobClass, ItemStack aStack, int aMaxAmount, int aChance) {
+ Triplet<ItemStack, Integer, Integer> aData = new Triplet<ItemStack, Integer, Integer>(aStack, aMaxAmount, aChance);
+ AutoMap<Triplet<ItemStack, Integer, Integer>> aDataMap = mMobDropMap.get(aMobClass);
+ if (aDataMap == null) {
+ aDataMap = new AutoMap<Triplet<ItemStack, Integer, Integer>>();
+ }
+ aDataMap.put(aData);
+ mMobDropMap.put(aMobClass, aDataMap);
+
+ Logger.INFO("[Loot] Registered "+aStack.getDisplayName()+" (1-"+aMaxAmount+") as a valid drop for "+aMobClass.getCanonicalName());
+
+ if (!mInternalClassKeyCache.contains(aMobClass)) {
+ mInternalClassKeyCache.add(aMobClass);
+ }
+
+ }
+
+ private static ItemStack processItemDropTriplet(Triplet<ItemStack, Integer, Integer> aData) {
+ ItemStack aLoot = aData.getValue_1();
+ int aMaxDrop = aData.getValue_2();
+ int aChanceOutOf10000 = aData.getValue_3();
+ if (MathUtils.randInt(0, 10000) <= aChanceOutOf10000) {
+ aLoot = ItemUtils.getSimpleStack(aLoot, MathUtils.randInt(1, aMaxDrop));
+ if (ItemUtils.checkForInvalidItems(aLoot)) {
+ return aLoot;
+ }
+ }
+ return null;
+ }
+
+ private static boolean processDropsForMob(EntityLivingBase entityLiving) {
+ AutoMap<Triplet<ItemStack, Integer, Integer>> aMobData = mMobDropMap.get(entityLiving.getClass());
+ boolean aDidDrop = false;
+ if (aMobData != null) {
+ if (!aMobData.isEmpty()) {
+ ItemStack aPossibleDrop;
+ for (Triplet<ItemStack, Integer, Integer> g : aMobData) {
+ aPossibleDrop = processItemDropTriplet(g);
+ if (aPossibleDrop != null) {
+ if (entityLiving.entityDropItem(aPossibleDrop, MathUtils.randFloat(0, 1)) != null) {
+ aDidDrop = true;
+ }
+ }
+ }
+ }
+ }
+ return aDidDrop;
+ }
+
+
+
+
+
+ @SubscribeEvent
+ public void onEntityDrop(LivingDropsEvent event) {
+ boolean aDidDrop = false;
+ if (event == null || event.entityLiving == null) {
+ return;
+ }
+ for (Class c : mInternalClassKeyCache) {
+ if (c.isInstance(event.entityLiving)) {
+ aDidDrop = processDropsForMob(event.entityLiving);
+ }
+ }
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/core/item/ModItems.java b/src/Java/gtPlusPlus/core/item/ModItems.java
index 51d41674d3..de22821127 100644
--- a/src/Java/gtPlusPlus/core/item/ModItems.java
+++ b/src/Java/gtPlusPlus/core/item/ModItems.java
@@ -82,6 +82,7 @@ import gtPlusPlus.core.lib.CORE.ConfigSwitches;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.ALLOY;
import gtPlusPlus.core.material.ELEMENT;
+import gtPlusPlus.core.material.MISC_MATERIALS;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.material.MaterialGenerator;
import gtPlusPlus.core.material.NONMATERIAL;
@@ -93,6 +94,7 @@ import gtPlusPlus.core.util.data.StringUtils;
import gtPlusPlus.core.util.debug.DEBUG_INIT;
import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
+import gtPlusPlus.core.util.minecraft.MaterialUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.everglades.GTplusplus_Everglades;
import gtPlusPlus.xmod.eio.material.MaterialEIO;
@@ -182,6 +184,7 @@ public final class ModItems {
public static Item itemPersonalCloakingDevice;
public static Item itemPersonalCloakingDeviceCharged;
public static Item itemPersonalHealingDevice;
+ public static Item itemPersonalFireProofDevice;
public static Item itemSlowBuildingRing;
public static MultiPickaxeBase MP_GTMATERIAL;
@@ -332,10 +335,15 @@ public final class ModItems {
public static IonParticles itemIonParticleBase;
public static StandardBaseParticles itemStandarParticleBase;
- public static BatteryPackBaseBauble itemChargePack1;
- public static BatteryPackBaseBauble itemChargePack2;
- public static BatteryPackBaseBauble itemChargePack3;
- public static BatteryPackBaseBauble itemChargePack4;
+ public static BatteryPackBaseBauble itemChargePack_Low_1;
+ public static BatteryPackBaseBauble itemChargePack_Low_2;
+ public static BatteryPackBaseBauble itemChargePack_Low_3;
+ public static BatteryPackBaseBauble itemChargePack_Low_4;
+ public static BatteryPackBaseBauble itemChargePack_Low_5;
+ public static BatteryPackBaseBauble itemChargePack_High_1;
+ public static BatteryPackBaseBauble itemChargePack_High_2;
+ public static BatteryPackBaseBauble itemChargePack_High_3;
+ public static BatteryPackBaseBauble itemChargePack_High_4;
public static DebugScanner itemDebugScanner;
@@ -355,6 +363,8 @@ public final class ModItems {
public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Nether;
public static MonsterKillerBaseBauble itemAmuletMonsterKiller_Infernal;
+ public static CoreItem itemExquisiteIndustrialDiamond;
+
static {
Logger.INFO("Items!");
//Default item used when recipes fail, handy for debugging. Let's make sure they exist when this class is called upon.
@@ -539,6 +549,9 @@ public final class ModItems {
MaterialGenerator.generate(ELEMENT.STANDALONE.GRANITE, false, false);
MaterialGenerator.generate(ELEMENT.STANDALONE.RUNITE, false);
MaterialGenerator.generate(ELEMENT.STANDALONE.DRAGON_METAL, false);
+
+ MISC_MATERIALS.run();
+
//Carbides - Tungsten Carbide exists in .09 so don't generate it. - Should still come before alloys though
if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK){
@@ -842,6 +855,63 @@ public final class ModItems {
itemHotTitaniumIngot = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("ingotHotTitanium", 1);
}
+ //Industrial Diamonds
+ itemExquisiteIndustrialDiamond = new CoreItem("IndustrialDiamondExquisite", "High Quality Industrial Diamond", tabMisc);
+ ItemStack tempStack = itemExquisiteIndustrialDiamond.getStack();
+ ItemUtils.addItemToOreDictionary(tempStack, "gemDiamond");
+ ItemUtils.addItemToOreDictionary(tempStack, "craftingIndustrialDiamond");
+ ItemUtils.addItemToOreDictionary(tempStack, "gemExquisiteDiamond");
+ ItemUtils.addItemToOreDictionary(tempStack, "craftingExquisiteIndustrialDiamond");
+
+ //Custom GT++ Crafting Components
+
+ //Springs
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ELEMENT.STANDALONE.WHITE_METAL);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.NITINOL_60);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.AQUATIC_STEEL);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SPRING, ALLOY.EGLIN_STEEL);
+
+ //Small Springs
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.MARAGING250);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.NICHROME);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.STABALLOY);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.STEEL_BLACK);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.SMALLSPRING, ALLOY.BLACK_TITANIUM);
+
+ //Fine Wire
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.STANDALONE.WHITE_METAL);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.getInstance().PALLADIUM);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ELEMENT.getInstance().ZIRCONIUM);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.LEAGRISIUM);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.BABBIT_ALLOY);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.KOBOLDITE);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.HG1223);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.FINEWIRE, ALLOY.QUANTUM);
+
+ //Dense Plates
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.POTIN);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.AQUATIC_STEEL);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.BRONZE);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.OSMIRIDIUM);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.QUANTUM);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.STEEL_BLACK);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.STAINLESS_STEEL);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.EGLIN_STEEL);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.MARAGING300);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ALLOY.TALONITE);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.HYPOGEN);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.RHUGNOR);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.ADVANCED_NITINOL);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.ASTRAL_TITANIUM);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.WHITE_METAL);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.BLACK_METAL);
+ MaterialUtils.generateComponentAndAssignToAMaterial(ComponentTypes.PLATEHEAVY, ELEMENT.STANDALONE.GRANITE);
+
+
+
+
//Special Sillyness
if (true) {
diff --git a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
index 33198e8d41..90e831cbb4 100644
--- a/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
+++ b/src/Java/gtPlusPlus/core/item/base/BaseItemComponent.java
@@ -248,12 +248,17 @@ public class BaseItemComponent extends Item{
public int getColorFromItemStack(final ItemStack stack, final int renderPass) {
+ if (this.componentType == ComponentTypes.CELL || this.componentType == ComponentTypes.PLASMACELL) {
if (renderPass == 0 && !CORE.ConfigSwitches.useGregtechTextures){
return Utils.rgbtoHexValue(255, 255, 255);
}
if (renderPass == 1 && CORE.ConfigSwitches.useGregtechTextures){
return Utils.rgbtoHexValue(255, 255, 255);
}
+ }
+ if (this.componentType == ComponentTypes.PLATEHEAVY) {
+
+ }
@@ -495,7 +500,10 @@ public class BaseItemComponent extends Item{
PLASMACELL("CellPlasma", " Plasma Cell", "cellPlasma", OrePrefixes.cellPlasma),
CELL("Cell", " Cell", "cell", OrePrefixes.cell),
NUGGET("Nugget", " Nugget", "nugget", OrePrefixes.nugget),
- PLATEHEAVY("HeavyPlate", " Heavy Plate", "plateHeavy", OrePrefixes.plateDense);
+ PLATEHEAVY("HeavyPlate", "Heavy@Plate", "plateHeavy", OrePrefixes.plateDense),
+ SPRING("Spring", " Spring", "spring", OrePrefixes.spring),
+ SMALLSPRING("SmallSpring", "Small@Spring", "springSmall", OrePrefixes.springSmall),
+ FINEWIRE("FineWire", "Fine@Wire", "wireFine", OrePrefixes.wireFine),;
private String COMPONENT_NAME;
private String DISPLAY_NAME;
diff --git a/src/Java/gtPlusPlus/core/item/base/CoreItem.java b/src/Java/gtPlusPlus/core/item/base/CoreItem.java
index 376be7bac8..7ce96b2a88 100644
--- a/src/Java/gtPlusPlus/core/item/base/CoreItem.java
+++ b/src/Java/gtPlusPlus/core/item/base/CoreItem.java
@@ -17,6 +17,7 @@ import net.minecraft.world.World;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
public class CoreItem extends Item
{
@@ -221,6 +222,10 @@ public class CoreItem extends Item
public boolean isRepairable() {
return false;
}
+
+ public ItemStack getStack() {
+ return ItemUtils.getSimpleStack(this);
+ }
/* @Override
public String getItemStackDisplayName(final ItemStack tItem) {
diff --git a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java
index 273995e181..e1c3e179ee 100644
--- a/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java
+++ b/src/Java/gtPlusPlus/core/item/base/dusts/BaseItemDustUnique.java
@@ -40,7 +40,7 @@ public class BaseItemDustUnique extends Item{
this.setCreativeTab(tabMisc);
this.colour = colour;
this.materialName = materialName;
- if (mChemicalFormula.equals("") || mChemicalFormula.equals("NullFormula")){
+ if (mChemicalFormula == null || mChemicalFormula.equals("") || mChemicalFormula.equals("NullFormula")){
this.chemicalNotation = StringUtils.subscript(materialName);
}
else {
diff --git a/src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlateHeavy.java b/src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlateHeavy.java
new file mode 100644
index 0000000000..c9072b0d82
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/item/base/plates/BaseItemPlateHeavy.java
@@ -0,0 +1,47 @@
+package gtPlusPlus.core.item.base.plates;
+
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+import gtPlusPlus.core.item.base.BaseItemComponent;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.material.Material;
+import net.minecraft.client.renderer.texture.IIconRegister;
+import net.minecraft.util.IIcon;
+
+public class BaseItemPlateHeavy extends BaseItemComponent{
+
+ final static ComponentTypes HEAVY = ComponentTypes.PLATEHEAVY;
+
+ public BaseItemPlateHeavy(final Material material) {
+ super(material, HEAVY);
+ }
+
+ @Override
+ public String getCorrectTextures(){
+ return CORE.MODID + ":" + "itemHeavyPlate";
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public boolean requiresMultipleRenderPasses(){
+ return true;
+ }
+
+ @Override
+ public void registerIcons(final IIconRegister i) {
+ this.base = i.registerIcon(CORE.MODID + ":" + "itemHeavyPlate");
+ this.overlay = i.registerIcon(CORE.MODID + ":" + "itemHeavyPlate_Overlay");
+ }
+
+ @Override
+ public IIcon getIconFromDamageForRenderPass(final int damage, final int pass) {
+
+ if (pass == 0) {
+ return this.base;
+ }
+ else {
+ return this.overlay;
+ }
+
+ }
+}
diff --git a/src/Java/gtPlusPlus/core/item/bauble/BatteryPackBaseBauble.java b/src/Java/gtPlusPlus/core/item/bauble/BatteryPackBaseBauble.java
index 2d9b35ac63..2e40d86473 100644
--- a/src/Java/gtPlusPlus/core/item/bauble/BatteryPackBaseBauble.java
+++ b/src/Java/gtPlusPlus/core/item/bauble/BatteryPackBaseBauble.java
@@ -242,8 +242,7 @@ public class BatteryPackBaseBauble extends ElectricBaseBauble {
@Override
public String getTextureNameForBauble() {
- // TODO Auto-generated method stub
- return null;
+ return "chargepack/"+mTier;
}
}
diff --git a/src/Java/gtPlusPlus/core/item/bauble/ElectricBaseBauble.java b/src/Java/gtPlusPlus/core/item/bauble/ElectricBaseBauble.java
index fb490285e9..cfa5cb363d 100644
--- a/src/Java/gtPlusPlus/core/item/bauble/ElectricBaseBauble.java
+++ b/src/Java/gtPlusPlus/core/item/bauble/ElectricBaseBauble.java
@@ -9,11 +9,9 @@ import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.GT_Values;
-import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.creative.AddToCreativeTab;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.xmod.gregtech.common.helpers.ChargingHelper;
import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import ic2.api.item.IElectricItemManager;
@@ -21,7 +19,6 @@ import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
@@ -42,7 +39,7 @@ public abstract class ElectricBaseBauble extends BaseBauble implements IElectric
mTier = aTier;
maxValueEU = aMaxEU;
this.setUnlocalizedName(aUnlocalName);
- this.setTextureName(getTextureNameForBauble());
+ this.setTextureName(CORE.MODID + ":" + getTextureNameForBauble());
this.setMaxDamage(27);
this.setMaxStackSize(1);
this.setNoRepair();
@@ -54,6 +51,7 @@ public abstract class ElectricBaseBauble extends BaseBauble implements IElectric
public abstract String getTextureNameForBauble();
+ @SuppressWarnings("unchecked")
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
diff --git a/src/Java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java b/src/Java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java
new file mode 100644
index 0000000000..04467091c0
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/item/bauble/FireProtectionBauble.java
@@ -0,0 +1,132 @@
+package gtPlusPlus.core.item.bauble;
+
+import java.lang.reflect.Field;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.UUID;
+
+import baubles.api.BaubleType;
+import cpw.mods.fml.common.registry.GameRegistry;
+import gtPlusPlus.core.creative.AddToCreativeTab;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
+import net.minecraft.entity.Entity;
+import net.minecraft.entity.EntityLivingBase;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.potion.Potion;
+import net.minecraft.potion.PotionEffect;
+import net.minecraft.util.EnumChatFormatting;
+import net.minecraft.world.World;
+
+public class FireProtectionBauble extends BaseBauble {
+
+ public static HashMap<UUID, Boolean> mDataMap = new HashMap<UUID, Boolean>();
+ public static HashSet<UUID> mPlayerMap = new HashSet<UUID>();
+
+ private static Field isImmuneToFire;
+
+ static {
+ isImmuneToFire = ReflectionUtils.getField(Entity.class, "isImmuneToFire");
+ }
+
+ public static boolean fireImmune(Entity aEntity) {
+ return aEntity.isImmuneToFire();
+ }
+
+ public static boolean setEntityImmuneToFire(Entity aEntity, boolean aImmune) {
+ return ReflectionUtils.setField(aEntity, isImmuneToFire, aImmune);
+ }
+
+ public FireProtectionBauble() {
+ super(BaubleType.RING, "GTPP.bauble.fireprotection.0" + ".name", 0);
+ String aUnlocalName = "GTPP.bauble.fireprotection.0" + ".name";
+ this.setUnlocalizedName(aUnlocalName);
+ this.setTextureName(CORE.MODID + ":" + getTextureNameForBauble());
+ this.setMaxDamage(100);
+ this.setMaxStackSize(1);
+ this.setNoRepair();
+ this.setCreativeTab(AddToCreativeTab.tabMachines);
+ if (GameRegistry.findItem(CORE.MODID, aUnlocalName) == null) {
+ GameRegistry.registerItem(this, aUnlocalName);
+ }
+ }
+
+ @Override
+ public void onUpdate(final ItemStack itemStack, final World worldObj, final Entity player, final int p_77663_4_,
+ final boolean p_77663_5_) {
+ super.onUpdate(itemStack, worldObj, player, p_77663_4_, p_77663_5_);
+
+ }
+
+ @Override
+ public String getItemStackDisplayName(final ItemStack p_77653_1_) {
+ return (EnumChatFormatting.DARK_RED + super.getItemStackDisplayName(p_77653_1_) + EnumChatFormatting.GRAY);
+ }
+
+ @Override
+ public boolean showDurabilityBar(final ItemStack stack) {
+ return false;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public void addInformation(final ItemStack stack, final EntityPlayer aPlayer, final List list, final boolean bool) {
+ super.addInformation(stack, aPlayer, list, bool);
+ }
+
+ @Override
+ public boolean canEquip(final ItemStack arg0, final EntityLivingBase arg1) {
+ return true;
+ }
+
+ @Override
+ public boolean canUnequip(final ItemStack arg0, final EntityLivingBase arg1) {
+ return true;
+ }
+
+ @Override
+ public void onEquipped(final ItemStack arg0, final EntityLivingBase aPlayer) {
+ if (!aPlayer.worldObj.isRemote) {
+ if (aPlayer instanceof EntityPlayer) {
+ EntityPlayer bPlayer = (EntityPlayer) aPlayer;
+ mPlayerMap.add(bPlayer.getUniqueID());
+ }
+ }
+ }
+
+ @Override
+ public void onUnequipped(final ItemStack arg0, final EntityLivingBase aPlayer) {
+ if (!aPlayer.worldObj.isRemote) {
+ if (aPlayer instanceof EntityPlayer) {
+ EntityPlayer bPlayer = (EntityPlayer) aPlayer;
+ if (bPlayer.isPotionActive(Potion.fireResistance)) {
+ bPlayer.removePotionEffect(Potion.fireResistance.id);
+ }
+ mPlayerMap.remove(bPlayer.getUniqueID());
+ setEntityImmuneToFire(bPlayer, false);
+ }
+ }
+ }
+
+ @Override
+ public void onWornTick(final ItemStack aBaubleStack, final EntityLivingBase aPlayer) {
+ if (!aPlayer.worldObj.isRemote) {
+ if (aPlayer instanceof EntityPlayer) {
+ EntityPlayer bPlayer = (EntityPlayer) aPlayer;
+ if (!fireImmune(bPlayer)) {
+ setEntityImmuneToFire(bPlayer, true);
+ }
+ if (!bPlayer.isPotionActive(Potion.fireResistance)) {
+ bPlayer.addPotionEffect(new PotionEffect(Potion.fireResistance.id, 100, 4));
+ }
+ }
+ }
+ }
+
+ public String getTextureNameForBauble() {
+ return "baubles/itemFireProtectGlovesBetter";
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java b/src/Java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java
index aa89ff1627..aab302688b 100644
--- a/src/Java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java
+++ b/src/Java/gtPlusPlus/core/item/bauble/MonsterKillerBaseBauble.java
@@ -169,7 +169,7 @@ public class MonsterKillerBaseBauble extends ElectricBaseBauble {
@Override
public String getTextureNameForBauble() {
- return CORE.MODID + ":" + "baubles/itemAmulet";
+ return "baubles/itemAmulet";
}
}
diff --git a/src/Java/gtPlusPlus/core/lib/CORE.java b/src/Java/gtPlusPlus/core/lib/CORE.java
index 632378987a..38be7d8593 100644
--- a/src/Java/gtPlusPlus/core/lib/CORE.java
+++ b/src/Java/gtPlusPlus/core/lib/CORE.java
@@ -51,7 +51,7 @@ public class CORE {
public static final String name = "GT++";
public static final String MODID = "miscutils";
- public static final String VERSION = "1.7.02.99-pre";
+ public static final String VERSION = "1.7.03.01";
public static String MASTER_VERSION = NetworkUtils.getContentFromURL("https://raw.githubusercontent.com/draknyte1/GTplusplus/master/Recommended.txt").toLowerCase();
public static String USER_COUNTRY = GeoUtils.determineUsersCountry();
public static boolean isModUpToDate = Utils.isModUpToDate();
@@ -214,6 +214,7 @@ public class CORE {
public static boolean enableNitroFix = false;
public static boolean enableSulfuricAcidFix = false;
public static boolean enableAnimatedTurbines = true;
+ public static boolean enableHarderRecipesForHighTierCasings = true;
//Single Block Machines
public static boolean enableMachine_SolarGenerators = false;
@@ -282,4 +283,12 @@ public class CORE {
public static final String VERSION = "0.1";
}
+ public static final void crash() {
+ System.exit(0);
+ }
+
+ public static final void gc() {
+ System.gc();
+ }
+
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/material/ALLOY.java b/src/Java/gtPlusPlus/core/material/ALLOY.java
index d2639a220f..95e3631aaf 100644
--- a/src/Java/gtPlusPlus/core/material/ALLOY.java
+++ b/src/Java/gtPlusPlus/core/material/ALLOY.java
@@ -15,7 +15,7 @@ public final class ALLOY {
public static final Material KANTHAL = MaterialUtils.generateMaterialFromGtENUM(Materials.Kanthal);
public static final Material NICHROME = MaterialUtils.generateMaterialFromGtENUM(Materials.Nichrome);
public static final Material TUNGSTENSTEEL = MaterialUtils.generateMaterialFromGtENUM(Materials.TungstenSteel);
- public static final Material STAINLESSSTEEL = MaterialUtils.generateMaterialFromGtENUM(Materials.StainlessSteel);
+ public static final Material STAINLESS_STEEL = MaterialUtils.generateMaterialFromGtENUM(Materials.StainlessSteel);
public static final Material OSMIRIDIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Osmiridium);
public static final Material ENERGYCRYSTAL = new Material(
@@ -695,7 +695,8 @@ public final class ALLOY {
new MaterialStack(ELEMENT.getInstance().TRINIUM_REFINED, 30),
new MaterialStack(ALLOY.MARAGING350, 40),
new MaterialStack(ALLOY.TUNGSTENSTEEL, 20),
- new MaterialStack(ALLOY.OSMIRIDIUM, 10)
+ new MaterialStack(ALLOY.OSMIRIDIUM, 10),
+ new MaterialStack(ELEMENT.getInstance().STRONTIUM, 10)
});
@@ -803,7 +804,7 @@ public final class ALLOY {
true, //Uses Blast furnace?
//Material Stacks with Percentage of required elements.
new MaterialStack[]{
- new MaterialStack(ALLOY.STAINLESSSTEEL, 10),
+ new MaterialStack(ALLOY.STAINLESS_STEEL, 10),
new MaterialStack(ALLOY.TUNGSTEN_CARBIDE, 10),
new MaterialStack(ALLOY.NICHROME, 10),
new MaterialStack(ALLOY.BRONZE, 10),
diff --git a/src/Java/gtPlusPlus/core/material/ELEMENT.java b/src/Java/gtPlusPlus/core/material/ELEMENT.java
index 9ba6fe0f1d..99586b37fe 100644
--- a/src/Java/gtPlusPlus/core/material/ELEMENT.java
+++ b/src/Java/gtPlusPlus/core/material/ELEMENT.java
@@ -51,7 +51,7 @@ public final class ELEMENT {
public final Material BROMINE = new Material("Bromine", MaterialState.PURE_LIQUID, new short[]{200, 25, 25}, -7, 58, 35, 45, false, "Br", 0);//Not a GT Inherited Material
public final Material KRYPTON = new Material("Krypton", MaterialState.PURE_LIQUID, new short[]{255, 255, 255}, -157, -153, 36, 48, false, "Kr", 0);//Not a GT Inherited Material
public final Material RUBIDIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Rubidium);
- public final Material STRONTIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Strontium);
+ public final Material STRONTIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Strontium, new short[] {230, 210, 110}, TextureSet.SET_FLINT);
public final Material YTTRIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Yttrium);
public final Material ZIRCONIUM = new Material("Zirconium", MaterialState.SOLID, new short[]{255, 250, 205}, 1855, 4377, 40, 51, false, "Zr", 0);//Not a GT Inherited Material
public final Material NIOBIUM = MaterialUtils.generateMaterialFromGtENUM(Materials.Niobium);
diff --git a/src/Java/gtPlusPlus/core/material/MISC_MATERIALS.java b/src/Java/gtPlusPlus/core/material/MISC_MATERIALS.java
new file mode 100644
index 0000000000..c7032ab7c7
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/material/MISC_MATERIALS.java
@@ -0,0 +1,89 @@
+package gtPlusPlus.core.material;
+
+import gregtech.api.enums.TextureSet;
+import gtPlusPlus.core.material.nuclear.FLUORIDES;
+import gtPlusPlus.core.material.state.MaterialState;
+import gtPlusPlus.core.util.minecraft.MaterialUtils;
+
+public final class MISC_MATERIALS {
+
+ /*
+ * Some of these materials purely exist as data objects, items will most likely be assigned seperately.
+ * Most are just compositions which will have dusts assigned to them.
+ */
+
+ public static void run() {
+ MaterialUtils.generateSpecialDustAndAssignToAMaterial(STRONTIUM_OXIDE, false);
+ MaterialUtils.generateSpecialDustAndAssignToAMaterial(STRONTIUM_HYDROXIDE, false);
+ }
+
+ public static final Material STRONTIUM_OXIDE = new Material(
+ "Strontium Oxide",
+ MaterialState.SOLID,
+ TextureSet.SET_METALLIC,
+ null,
+ -1,
+ -1,
+ -1,
+ -1,
+ false,
+ "SrO",
+ 0,
+ false,
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.getInstance().STRONTIUM, 1),
+ new MaterialStack(ELEMENT.getInstance().OXYGEN, 1)
+ });
+
+ public static final Material STRONTIUM_HYDROXIDE = new Material(
+ "Strontium Hydroxide",
+ MaterialState.SOLID,
+ TextureSet.SET_METALLIC,
+ null,
+ -1,
+ -1,
+ -1,
+ -1,
+ false,
+ "Sr(OH)2",
+ 0,
+ false,
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.getInstance().STRONTIUM, 1),
+ new MaterialStack(FLUORIDES.HYDROXIDE, 2)
+ });
+
+ public static final Material SELENIUM_DIOXIDE = new Material(
+ "Selenium Dioxide",
+ MaterialState.PURE_LIQUID, //State
+ null, //Material Colour
+ -1, //Melting Point in C
+ -1, //Boiling Point in C
+ -1, //Protons
+ -1,
+ false, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(ELEMENT.getInstance().SELENIUM, 1),
+ new MaterialStack(ELEMENT.getInstance().OXYGEN, 2)
+ });
+
+ public static final Material SELENIOUS_ACID = new Material(
+ "Selenious Acid",
+ MaterialState.PURE_LIQUID, //State
+ null, //Material Colour
+ -1, //Melting Point in C
+ -1, //Boiling Point in C
+ -1, //Protons
+ -1,
+ false, //Uses Blast furnace?
+ //Material Stacks with Percentage of required elements.
+ new MaterialStack[]{
+ new MaterialStack(SELENIUM_DIOXIDE, 1),
+ new MaterialStack(ELEMENT.getInstance().HYDROGEN, 8),
+ new MaterialStack(ELEMENT.getInstance().OXYGEN, 4)
+ });
+
+
+
+}
diff --git a/src/Java/gtPlusPlus/core/material/ORES.java b/src/Java/gtPlusPlus/core/material/ORES.java
index 801e4924b3..0e1691a557 100644
--- a/src/Java/gtPlusPlus/core/material/ORES.java
+++ b/src/Java/gtPlusPlus/core/material/ORES.java
@@ -545,7 +545,7 @@ public final class ORES {
-1, //Radiation
new MaterialStack[]{// (Ca,Sr,Ce,Na)5(PO4)3F
new MaterialStack(ELEMENT.getInstance().CALCIUM, 5),
- new MaterialStack(ELEMENT.getInstance().STRONTIUM, 5),
+ new MaterialStack(MISC_MATERIALS.STRONTIUM_OXIDE, 5),
new MaterialStack(ELEMENT.getInstance().CERIUM, 5),
new MaterialStack(ELEMENT.getInstance().SODIUM, 5),
new MaterialStack(ELEMENT.getInstance().PHOSPHORUS, 3),
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
index 483fce8ce5..b6d41443ef 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_GREGTECH.java
@@ -26,6 +26,7 @@ import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.ALLOY;
import gtPlusPlus.core.material.ELEMENT;
+import gtPlusPlus.core.material.MISC_MATERIALS;
import gtPlusPlus.core.material.MaterialStack;
import gtPlusPlus.core.material.NONMATERIAL;
import gtPlusPlus.core.material.ORES;
@@ -90,47 +91,64 @@ public class RECIPES_GREGTECH {
assemblyLineRecipes();
latheRecipes();
vacuumFreezerRecipes();
+ fluidheaterRecipes();
+
+ /**
+ * Special Recipe handlers
+ */
+ RECIPES_SeleniumProcessing.init();
+
+
+
+
+
+
addFuels();
}
+ private static void fluidheaterRecipes() {
+ GT_Values.RA.addFluidHeaterRecipe(CI.getNumberedCircuit(20), FluidUtils.getWater(1000), FluidUtils.getHotWater(1000), 30, 30);
+
+ }
+
private static void vacuumFreezerRecipes() {
GT_Values.RA.addVacuumFreezerRecipe(GregtechItemList.Bomb_Cast_Molten.get(1), GregtechItemList.Bomb_Cast_Set.get(1), 20 * 30);
}
private static void latheRecipes() {
-
+
GT_Values.RA.addLatheRecipe(
ALLOY.EGLIN_STEEL.getBlock(1),
GregtechItemList.Bomb_Cast_Mold.get(1),
null,
20 * 60 * 15,
120);
-
+
GT_Values.RA.addLatheRecipe(
GregtechItemList.Bomb_Cast_Set.get(1),
GregtechItemList.Bomb_Cast_Broken.get(2),
ItemUtils.getSimpleStack(ModItems.itemBombCasing, 2),
20 * 60 * 5,
30);
-
+
}
private static void fusionRecipes() {
- /**
- * Adds a Fusion reactor Recipe
- *
- * @param aInput1 = first Input (not null, and respects StackSize)
- * @param aInput2 = second Input (not null, and respects StackSize)
- * @param aOutput = Output of the Fusion (can be null, and respects StackSize)
- * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0)
- * @param aFusionEnergyPerTick = The EU generated per Tick (can even be negative!)
- * @param aEnergyNeededForStartingFusion = EU needed for heating the Reactor up (must be >= 0)
- */
-
+ /**
+ * Adds a Fusion reactor Recipe
+ *
+ * @param aInput1 = first Input (not null, and respects StackSize)
+ * @param aInput2 = second Input (not null, and respects StackSize)
+ * @param aOutput = Output of the Fusion (can be null, and respects StackSize)
+ * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0)
+ * @param aFusionEnergyPerTick = The EU generated per Tick (can even be negative!)
+ * @param aEnergyNeededForStartingFusion = EU needed for heating the Reactor up (must be >= 0)
+ */
+
//Hydrogen Plasma
- /*CORE.RA.addFusionReactorRecipe(
+ /*CORE.RA.addFusionReactorRecipe(
Particle.getIon("Hydrogen", 0),
Particle.getIon("Hydrogen", 0),
Materials.Hydrogen.getPlasma(1),
@@ -138,8 +156,8 @@ public class RECIPES_GREGTECH {
16,
4096,
40000000);*/
-
-
+
+
//Hypogen Creation
GT_Values.RA.addFusionReactorRecipe(
Materials.Neutronium.getMolten(128),
@@ -157,23 +175,23 @@ public class RECIPES_GREGTECH {
2048 * 4,
(int) GT_Values.V[7],
150000000 * 2);
-
+
}
private static void assemblyLineRecipes() {
-
-
+
+
ItemStack[] aCoilWire = new ItemStack[] {
ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 0, GTNH ? 64 : 32),
ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 1, GTNH ? 48 : 16),
ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 2, GTNH ? 32 : 8),
ItemUtils.simpleMetaStack("miscutils:itemDehydratorCoilWire", 3, GTNH ? 16 : 4),
};
-
-
-
-
+
+
+
+
//Containment Casings
CORE.RA.addAssemblylineRecipe(
ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_1_CONTAINMENT, 1),
@@ -199,12 +217,12 @@ public class RECIPES_GREGTECH {
ALLOY.ENERGYCRYSTAL.getFluid(144 * 9 * (GTNH ? 8 : 4)),
ALLOY.TUMBAGA.getFluid(144 * 9 * (GTNH ? 32 : 8)),
ALLOY.NICHROME.getFluid(144 * 1 * (GTNH ? 16 : 4)),
-
+
},
ItemUtils.getSimpleStack(ModBlocks.blockCasings3Misc, 15, 32),
20 * 60 * 10 * (GTNH ? 2 : 1),
(int) GT_Values.V[6]);
-
+
//Slow Fusion Controller
CORE.RA.addAssemblylineRecipe(
GregtechItemList.COMET_Cyclotron.get(1),
@@ -232,8 +250,8 @@ public class RECIPES_GREGTECH {
GregtechItemList.Miniature_Fusion.get(1),
20 * 60 * 5 * (GTNH ? 2 : 1),
(int) GT_Values.V[7]);
-
-
+
+
//Plasma Tank
CORE.RA.addAssemblylineRecipe(
ItemUtils.getOrePrefixStack(OrePrefixes.pipeMedium, Materials.Superconductor, 1),
@@ -250,17 +268,17 @@ public class RECIPES_GREGTECH {
CI.getTieredFluid(4, 144 * 9 * (GTNH ? 16 : 8)),
CI.getTertiaryTieredFluid(4, 144 * 9 * (GTNH ? 16 : 8)),
CI.getAlternativeTieredFluid(4, 144 * 9 * (GTNH ? 16 : 8)),
-
+
},
GregtechItemList.Plasma_Tank.get(1),
20 * 60 * 1 * (GTNH ? 2 : 1),
(int) GT_Values.V[5]);
-
-
+
+
/*
* Contianment casings
*/
-
+
ItemStack[] aGemCasings = new ItemStack[] {
GregtechItemList.Battery_Casing_Gem_1.get(1),
GregtechItemList.Battery_Casing_Gem_2.get(1),
@@ -273,7 +291,7 @@ public class RECIPES_GREGTECH {
GregtechItemList.Battery_Casing_Gem_2.get(1),
GregtechItemList.Battery_Casing_Gem_3.get(1),
};
-
+
int aCasingSlot = 0;
for (int j = 6; j < 10; j++) {
CORE.RA.addAssemblylineRecipe(
@@ -290,24 +308,24 @@ public class RECIPES_GREGTECH {
CI.getTieredFluid(j, 144 * 3 * (GTNH ? 16 : 8)),
CI.getTertiaryTieredFluid(j-2, 144 * 4 * (GTNH ? 16 : 8)),
CI.getAlternativeTieredFluid(j, 144 * 6 * (GTNH ? 16 : 8)),
-
+
},
aGemCasings[aCasingSlot++],
20 * 60 * 1 * (GTNH ? 2 : 1),
(int) GT_Values.V[j]);
}
-
+
/*
* Gem Battery Recipes
*/
-
+
ItemStack[] aGemBatteries = new ItemStack[] {
GregtechItemList.Battery_Gem_1.get(1),
GregtechItemList.Battery_Gem_2.get(1),
GregtechItemList.Battery_Gem_3.get(1),
GregtechItemList.Battery_Gem_4.get(1),
};
-
+
ItemStack[] aExoticInputs = new ItemStack[] {
Particle.getBaseParticle(Particle.PROTON),
Particle.getBaseParticle(Particle.ELECTRON),
@@ -338,8 +356,8 @@ public class RECIPES_GREGTECH {
20 * 60 * 1 * (GTNH ? 2 : 1),
(int) GT_Values.V[j]);
}
-
-
+
+
//Nano Healer
CORE.RA.addAssemblylineRecipe(
ItemUtils.simpleMetaStack(Items.golden_apple, 1, 1),
@@ -360,28 +378,28 @@ public class RECIPES_GREGTECH {
CI.getTertiaryTieredFluid(7, 144 * 18 * (GTNH ? 16 : 8)),
CI.getAlternativeTieredFluid(6, 144 * 18 * (GTNH ? 16 : 8)),
CI.getAlternativeTieredFluid(7, 144 * 18 * (GTNH ? 16 : 8)),
-
+
},
ItemUtils.getItemStackFromFQRN("miscutils:personalHealingDevice", 1),
20 * 60 * 30 * (GTNH ? 2 : 1),
(int) GT_Values.V[7]);
-
-
-
+
+
+
//Charge Pack LuV-UV
ItemStack[] aChargeResearch = new ItemStack[] {
ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore7", 1),
- ItemUtils.getSimpleStack(ModItems.itemChargePack1, 1),
- ItemUtils.getSimpleStack(ModItems.itemChargePack2, 1),
- ItemUtils.getSimpleStack(ModItems.itemChargePack3, 1),
+ ItemUtils.getSimpleStack(ModItems.itemChargePack_High_1, 1),
+ ItemUtils.getSimpleStack(ModItems.itemChargePack_High_2, 1),
+ ItemUtils.getSimpleStack(ModItems.itemChargePack_High_3, 1),
};
-
+
ItemStack[] aChargeOutputs = new ItemStack[] {
- ItemUtils.getSimpleStack(ModItems.itemChargePack1, 1),
- ItemUtils.getSimpleStack(ModItems.itemChargePack2, 1),
- ItemUtils.getSimpleStack(ModItems.itemChargePack3, 1),
- ItemUtils.getSimpleStack(ModItems.itemChargePack4, 1),
+ ItemUtils.getSimpleStack(ModItems.itemChargePack_High_1, 1),
+ ItemUtils.getSimpleStack(ModItems.itemChargePack_High_2, 1),
+ ItemUtils.getSimpleStack(ModItems.itemChargePack_High_3, 1),
+ ItemUtils.getSimpleStack(ModItems.itemChargePack_High_4, 1),
};
ItemStack[] aBufferCoreInputs = new ItemStack[] {
@@ -390,7 +408,7 @@ public class RECIPES_GREGTECH {
ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore9", GTNH ? 8 : 4),
ItemUtils.getItemStackFromFQRN("miscutils:item.itemBufferCore10", GTNH ? 8 : 4),
};
-
+
int aCurrSlot = 0;
for (int h = 6; h < 10; h++) {
CORE.RA.addAssemblylineRecipe(
@@ -398,7 +416,7 @@ public class RECIPES_GREGTECH {
20 * 60 * 10 * (aCurrSlot + 1),
new ItemStack[] {
ItemUtils.getSimpleStack(
- aGemBatteries[aCurrSlot], GTNH ? 4 : 2),
+ aGemBatteries[aCurrSlot], GTNH ? 4 : 2),
aBufferCoreInputs[aCurrSlot],
aCoilWire[aCurrSlot],
CI.getTieredComponent(OrePrefixes.plate, h, GTNH ? 16 : 8),
@@ -423,15 +441,15 @@ public class RECIPES_GREGTECH {
(int) GT_Values.V[h]);
aCurrSlot++;
}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
}
private static void laserEngraverRecipes() {
@@ -442,21 +460,21 @@ public class RECIPES_GREGTECH {
ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN.getDust(1),
20 * 60 * 3,
MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.CELESTIAL_TUNGSTEN.vTier));
-
+
GT_Values.RA.addLaserEngraverRecipe(
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Titanium, 8L),
GregtechItemList.Laser_Lens_Special.get(0),
ELEMENT.STANDALONE.ASTRAL_TITANIUM.getDust(1),
20 * 60 * 2,
MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.ASTRAL_TITANIUM.vTier));
-
+
GT_Values.RA.addLaserEngraverRecipe(
ALLOY.NITINOL_60.getBlock(2),
GregtechItemList.Laser_Lens_Special.get(0),
ELEMENT.STANDALONE.ADVANCED_NITINOL.getBlock(1),
20 * 60 * 1,
MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.ADVANCED_NITINOL.vTier));
-
+
GT_Values.RA.addLaserEngraverRecipe(
GT_OreDictUnificator.get(OrePrefixes.dust, Materials.Glass, 64L),
GregtechItemList.Laser_Lens_Special.get(0),
@@ -464,15 +482,15 @@ public class RECIPES_GREGTECH {
20 * 60 * 5,
MaterialUtils.getVoltageForTier(ELEMENT.STANDALONE.CHRONOMATIC_GLASS.vTier));
-
+
GT_Values.RA.addLaserEngraverRecipe(
CI.getFieldGenerator(6, 1),
CI.getEmitter(7, 2),
ItemDummyResearch.getResearchStack(ASSEMBLY_LINE_RESEARCH.RESEARCH_1_CONTAINMENT, 1),
20 * 60 * 5,
MaterialUtils.getVoltageForTier(5));
-
-
+
+
}
private static void breweryRecipes() {
@@ -537,7 +555,7 @@ public class RECIPES_GREGTECH {
FluidUtils.getFluidStack("molten.trinium", 136 * 144), 0, 20 * 3000,
2040*4);
}
-
+
//Eglin Steel
CORE.RA.addBlastSmelterRecipe(
new ItemStack[] {
@@ -553,7 +571,7 @@ public class RECIPES_GREGTECH {
0,
20 * 45,
120);
-
+
//HG1223
CORE.RA.addBlastSmelterRecipe(
new ItemStack[] {
@@ -568,12 +586,12 @@ public class RECIPES_GREGTECH {
new ItemStack[] {
CI.emptyCells(1)
},
- 100, //Output Chance
+ new int[] {10000}, //Output Chance
20 * 120,
122880);
-
-
-
+
+
+
// Germanium Roasting
CORE.RA.addBlastSmelterRecipe(
@@ -588,41 +606,6 @@ public class RECIPES_GREGTECH {
20 * 300,
4000);
- // Selenium Roasting
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] {
- ItemUtils.getGregtechCircuit(16),
- ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedPyrite", 8),
- ELEMENT.getInstance().CARBON.getDust(32),
- },
- Materials.SulfuricAcid.getFluid(4000),
- ELEMENT.getInstance().SELENIUM.getFluid(144),
- 0,
- 20 * 300,
- 2000);
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] {
- ItemUtils.getGregtechCircuit(17),
- ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedChalcopyrite", 8),
- ELEMENT.getInstance().CARBON.getDust(32),
- },
- Materials.SulfuricAcid.getFluid(4000),
- ELEMENT.getInstance().SELENIUM.getFluid(144),
- 0,
- 20 * 300,
- 2000);
- CORE.RA.addBlastSmelterRecipe(
- new ItemStack[] {
- ItemUtils.getGregtechCircuit(18),
- ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedGalena", 8),
- ELEMENT.getInstance().CARBON.getDust(32),
- },
- Materials.SulfuricAcid.getFluid(4000),
- ELEMENT.getInstance().SELENIUM.getFluid(144),
- 0,
- 20 * 300,
- 2000);
-
// Ruthenium Roasting
CORE.RA.addBlastSmelterRecipe(
@@ -669,7 +652,7 @@ public class RECIPES_GREGTECH {
0,
20 * 300,
8000);
-
+
// Rhenium Roasting
CORE.RA.addBlastSmelterRecipe(
new ItemStack[] {
@@ -704,7 +687,7 @@ public class RECIPES_GREGTECH {
0,
20 * 300,
4000);
-
+
//Thallium Roasting
CORE.RA.addBlastSmelterRecipe(
new ItemStack[] {
@@ -718,9 +701,28 @@ public class RECIPES_GREGTECH {
0,
20 * 300,
8000);
-
-
-
+
+
+
+ //Strontium processing
+ CORE.RA.addBlastSmelterRecipe(
+ new ItemStack[] {
+ ItemUtils.getGregtechCircuit(21),
+ MISC_MATERIALS.STRONTIUM_OXIDE.getDust(8),
+ ELEMENT.getInstance().ALUMINIUM.getDust(8),
+ },
+ null,
+ ELEMENT.getInstance().OXYGEN.getFluid(8000),
+ new ItemStack[] {
+ ELEMENT.getInstance().ALUMINIUM.getIngot(8),
+ ELEMENT.getInstance().STRONTIUM.getIngot(8)
+ },
+ new int[] {10000, 10000}, //Output Chance
+ 20 * 120,
+ 480*4);
+
+
+
}
@@ -733,7 +735,7 @@ public class RECIPES_GREGTECH {
ItemUtils.getSimpleStack(Items.glass_bottle), null, FluidUtils.getFluidStack("sulfuricacid", 250));
-
+
// Hydrofluoric Acid
boolean addedGtExtraction = false;
// Try use Internal GT Fluid first
@@ -751,10 +753,10 @@ public class RECIPES_GREGTECH {
FluidUtils.getFluidStack("hydrofluoricacid", 125), null);
//Add an empty recipe, but only if we didn't for the standard GT HF. Prevents Fluid transformation exploits.
if (!addedGtExtraction)
- GT_Values.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(ModItems.itemHydrofluoricPotion),
- ItemUtils.getSimpleStack(Items.glass_bottle), null, FluidUtils.getFluidStack("hydrofluoricacid", 125));
+ GT_Values.RA.addFluidCannerRecipe(ItemUtils.getSimpleStack(ModItems.itemHydrofluoricPotion),
+ ItemUtils.getSimpleStack(Items.glass_bottle), null, FluidUtils.getFluidStack("hydrofluoricacid", 125));
+
-
}
private static void cokeOvenRecipes() {
@@ -893,18 +895,18 @@ public class RECIPES_GREGTECH {
ItemStack cropGrape = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("cropGrape", 1);
ItemStack foodRaisins = ItemUtils.getItemStackOfAmountFromOreDictNoBroken("foodRaisins", 1);
-
+
if (cropGrape != null && foodRaisins != null)
- CORE.RA.addDehydratorRecipe(new ItemStack[] {
- cropGrape
- }, // Item
- null, // Fluid input (slot 1)
- null, // Fluid output (slot 2)
- new ItemStack[] {
- foodRaisins
- }, // Output
- new int[] { 0 }, 10, // Time in ticks
- 2); // EU
+ CORE.RA.addDehydratorRecipe(new ItemStack[] {
+ cropGrape
+ }, // Item
+ null, // Fluid input (slot 1)
+ null, // Fluid output (slot 2)
+ new ItemStack[] {
+ foodRaisins
+ }, // Output
+ new int[] { 0 }, 10, // Time in ticks
+ 2); // EU
}
catch (final NullPointerException e) {
@@ -914,7 +916,7 @@ public class RECIPES_GREGTECH {
// Calcium Hydroxide
if ((ItemUtils.checkForInvalidItems(ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 1))) || LoadedMods.IHL) {
try {
-
+
CORE.RA.addDehydratorRecipe(
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustQuicklime", 10) }, // Item
FluidUtils.getFluidStack("water", 10000), // Fluid input
@@ -1010,7 +1012,7 @@ public class RECIPES_GREGTECH {
null,
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogenChloride", 9),
FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getDust(9)
- },
+ },
new int[] { 0 }, 120 * 20, // Time in ticks
500); // EU
@@ -1112,7 +1114,7 @@ public class RECIPES_GREGTECH {
ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 2) }, // Output
3 * 20, // Time in ticks
30); // EU
-
+
/*
* Try Add custom Recipe for drying leather
*/
@@ -1297,41 +1299,41 @@ public class RECIPES_GREGTECH {
ItemUtils.getSimpleStack(ModItems.itemDetCable, 24),
30,
120);
-
+
/*addAR(ItemUtils.getItemStackOfAmountFromOreDict("plateIncoloy020", 16),
ItemUtils.getItemStackOfAmountFromOreDict("frameGtIncoloyMA956", 4), null,
GregtechItemList.Casing_Power_SubStation.get(4), 80, 120);*/
-
-
-
-
+
+
+
+
CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {
- GregtechItemList.Casing_Multi_Use.get(1),
- ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(6), 1),
- ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(4), 8),
- CI.sensor_HV,
- CI.emitter_HV,
- CI.fieldGenerator_HV,
- },
+ GregtechItemList.Casing_Multi_Use.get(1),
+ ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(6), 1),
+ ItemUtils.getItemStackOfAmountFromOreDict(CI.getTieredCircuitOreDictName(4), 8),
+ CI.sensor_HV,
+ CI.emitter_HV,
+ CI.fieldGenerator_HV,
+ },
null,
ItemUtils.getSimpleStack(Dimension_Everglades.blockPortalFrame),
20*20,
2048);
-
-
-
-
-
+
+
+
+
+
CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {ItemUtils.getSimpleStack(ModItems.itemRope, 6)}, null, ItemUtils.getSimpleStack(ModBlocks.blockNet, 2), 1*20, 8);
CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {ItemUtils.getSimpleStack(CI.explosiveITNT, 2), ItemUtils.getSimpleStack(CI.explosiveTNT, 4), ELEMENT.getInstance().SULFUR.getDust(2), ELEMENT.getInstance().IRON.getFrameBox(1)}, null, ItemUtils.getSimpleStack(ModBlocks.blockMiningExplosive, 3), 5*20, 60);
CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {ItemUtils.getSimpleStack(Items.nether_star), ItemUtils.getItemStackOfAmountFromOreDict("plateTungstenSteel", 8), ItemUtils.getItemStackOfAmountFromOreDict("stickBlackSteel", 8)}, null, ItemUtils.getSimpleStack(ModBlocks.blockWitherGuard, 32), 30*20, 500);
-
-
+
+
CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {
CI.electricPump_LV,
@@ -1357,7 +1359,7 @@ public class RECIPES_GREGTECH {
ItemUtils.getItemStackOfAmountFromOreDict("stickChrome", 1),
ItemUtils.getItemStackOfAmountFromOreDict("plateStainlessSteel", 2)
}, null, ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 3, 1), 10*20*3, 480);
-
+
CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {
CI.electricPump_EV,
CI.electricMotor_EV,
@@ -1368,6 +1370,93 @@ public class RECIPES_GREGTECH {
}, null, ItemUtils.simpleMetaStack(ModItems.itemGenericToken, 4, 1), 10*20*4, 1960);
+
+
+
+ //Low tier Charge Packs
+
+ final ItemStack[] aPackBatteries = new ItemStack[] {
+ ItemList.Battery_RE_LV_Lithium.get(GTNH ? 8 : 4),
+ ItemList.Battery_RE_MV_Lithium.get(GTNH ? 8 : 4),
+ ItemList.Battery_RE_HV_Lithium.get(GTNH ? 8 : 4),
+ GregtechItemList.Battery_RE_EV_Lithium.get(GTNH ? 8 : 4),
+ ItemList.Energy_LapotronicOrb.get(GTNH ? 8 : 4),
+ };
+ final ItemStack[] aPackPlates = new ItemStack[] {
+ CI.getPlate(1, GTNH ? 6 : 3),
+ CI.getPlate(2, GTNH ? 12 : 6),
+ CI.getPlate(3, GTNH ? 18 : 9),
+ CI.getPlate(4, GTNH ? 24 : 12),
+ CI.getPlate(5, GTNH ? 30 : 15),
+ };
+ final ItemStack[] aPackWire = new ItemStack[] {
+ CI.getTieredComponent(OrePrefixes.wireGt02, 1, GTNH ? 16 : 8),
+ CI.getTieredComponent(OrePrefixes.wireGt04, 2, GTNH ? 16 : 8),
+ CI.getTieredComponent(OrePrefixes.wireGt08, 3, GTNH ? 14 : 7),
+ CI.getTieredComponent(OrePrefixes.wireGt12, 4, GTNH ? 12 : 6),
+ CI.getTieredComponent(OrePrefixes.wireGt16, 5, GTNH ? 12 : 6),
+ };
+ final ItemStack[] aPackCircuit = new ItemStack[] {
+ CI.getTieredComponent(OrePrefixes.circuit, 1, GTNH ? 4 : 2),
+ CI.getTieredComponent(OrePrefixes.circuit, 2, GTNH ? 4 : 2),
+ CI.getTieredComponent(OrePrefixes.circuit, 3, GTNH ? 8 : 4),
+ CI.getTieredComponent(OrePrefixes.circuit, 4, GTNH ? 8 : 4),
+ CI.getTieredComponent(OrePrefixes.circuit, 5, GTNH ? 12 : 6),
+ };
+ final ItemStack[] aPackRing = new ItemStack[] {
+ CI.getTieredComponent(OrePrefixes.ring, 1, GTNH ? 20 : 10),
+ CI.getTieredComponent(OrePrefixes.ring, 2, GTNH ? 20 : 10),
+ CI.getTieredComponent(OrePrefixes.ring, 3, GTNH ? 20 : 10),
+ CI.getTieredComponent(OrePrefixes.ring, 4, GTNH ? 20 : 10),
+ CI.getTieredComponent(OrePrefixes.ring, 5, GTNH ? 20 : 10),
+ };
+ final ItemStack[] aPackOutput = new ItemStack[] {
+ ItemUtils.getSimpleStack(ModItems.itemChargePack_Low_1),
+ ItemUtils.getSimpleStack(ModItems.itemChargePack_Low_2),
+ ItemUtils.getSimpleStack(ModItems.itemChargePack_Low_3),
+ ItemUtils.getSimpleStack(ModItems.itemChargePack_Low_4),
+ ItemUtils.getSimpleStack(ModItems.itemChargePack_Low_5)
+ };
+
+ for (int i = 1; i < 6; i++) {
+
+ int aAS = i-1;
+
+ CORE.RA.addSixSlotAssemblingRecipe(
+ new ItemStack[] {
+ aPackPlates[aAS],
+ aPackRing[aAS],
+ aPackWire[aAS],
+ aPackCircuit[aAS],
+ aPackBatteries[aAS],
+ CI.getSensor(i, GTNH ? 4 : 2),
+ },
+ CI.getTieredFluid(i, (144 * (GTNH ? 4 : 2))),
+ aPackOutput[aAS],
+ 30 * 20 * i,
+ (int) GT_Values.V[i]);
+ }
+
+
+ if (!GTNH) {
+ if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 2L), GregtechItemList.Fluid_Cell_1L.get(1L, new Object[0]), 50, 32);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Bronze, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Bronze, 2L), GregtechItemList.Fluid_Cell_16L.get(1L, new Object[0]), 50, 32);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Brass, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Brass, 2L), GregtechItemList.Fluid_Cell_36L.get(1L, new Object[0]), 75, 32);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Invar, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Invar, 2L), GregtechItemList.Fluid_Cell_144L.get(1L, new Object[0]), 75, 32);
+
+ } else {
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 4L), GregtechItemList.Fluid_Cell_1L.get(1L, new Object[0]), 50, 32);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Bronze, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Bronze, 4L), GregtechItemList.Fluid_Cell_16L.get(1L, new Object[0]), 50, 32);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Brass, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Brass, 4L), GregtechItemList.Fluid_Cell_36L.get(1L, new Object[0]), 75, 32);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Invar, 4L), GregtechItemList.Fluid_Cell_144L.get(1L, new Object[0]), 75, 32);
+ }
+ }
+
+
+
+
+
}
private static boolean addAR(final ItemStack inputA, final ItemStack inputB, final FluidStack inputFluidA,
@@ -1467,14 +1556,14 @@ public class RECIPES_GREGTECH {
NUCLIDE.LiFBeF2ZrF4UF4.getFluid(144), 10000, 150, 2000);
GT_Values.RA.addFluidExtractionRecipe(NUCLIDE.LiFBeF2ThF4UF4.getDust(1), null,
NUCLIDE.LiFBeF2ThF4UF4.getFluid(144), 10000, 200, 1500);
-
+
//ZIRCONIUM_TETRAFLUORIDE
GT_Values.RA.addFluidExtractionRecipe(FLUORIDES.ZIRCONIUM_TETRAFLUORIDE.getDust(1), null,
FluidUtils.getFluidStack(ModItems.fluidZrF4, 144), 10000, 200, 512+256);
-
-
-
-/* GT_Values.RA.addFluidExtractionRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustLiBeF2ZrF4U235", 1), null,
+
+
+
+ /* GT_Values.RA.addFluidExtractionRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustLiBeF2ZrF4U235", 1), null,
FluidUtils.getFluidStack("molten.libef2zrf4u235", 144), 10000, 250, 1000);
//LFTR Fuel 2
GT_Values.RA.addFluidExtractionRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustLiBeF2ZrF4UF4", 1), null,
@@ -1516,10 +1605,10 @@ public class RECIPES_GREGTECH {
ItemUtils.getItemStackOfAmountFromOreDict("dustSmallThorium", 20),
ELEMENT.getInstance().URANIUM232.getDust(1), GT_Values.NI, GT_Values.NI, GT_Values.NI,
new int[] { 0, 0, 10 }, 500 * 20, 2000);
-
+
//Process Used Fuel Rods for Krypton
-
+
//Uranium
GT_Values.RA.addCentrifugeRecipe(
CI.getNumberedCircuit(20),
@@ -1546,7 +1635,7 @@ public class RECIPES_GREGTECH {
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),
@@ -1560,8 +1649,8 @@ public class RECIPES_GREGTECH {
ELEMENT.getInstance().POLONIUM.getSmallDust(1),
ELEMENT.getInstance().THALLIUM.getTinyDust(1),
new int[] { 0, 0, 5000, 5000, 5000, 2500 }, 250 * 20, 4000);
-
-
+
+
}
@@ -1615,7 +1704,7 @@ public class RECIPES_GREGTECH {
ItemUtils.getItemStackOfAmountFromOreDict("dustLithium7", 16), FluidUtils.getFluidStack("water", 1000),
FluidUtils.getFluidStack("lithiumhydroxide", 144 * 4),
CI.emptyCells(1), 300 * 20);
-
+
//Bombs
GT_Values.RA.addChemicalRecipe(
ItemUtils.getSimpleStack(ModItems.itemBombCasing, 4),
@@ -1624,7 +1713,7 @@ public class RECIPES_GREGTECH {
null,
ItemUtils.getSimpleStack(ModItems.itemBombUnf, 4),
300 * 20);
-
+
GT_Values.RA.addChemicalRecipe(
ItemUtils.getSimpleStack(ModItems.itemBombUnf, 4),
ItemUtils.getSimpleStack(ModItems.itemDetCable, 4),
@@ -1632,7 +1721,7 @@ public class RECIPES_GREGTECH {
null,
ItemUtils.getSimpleStack(ModItems.itemBomb, 4),
10 * 20);
-
+
// LFTR Fuel Related Compounds
if (GTNH) {
@@ -1697,32 +1786,32 @@ public class RECIPES_GREGTECH {
CI.emptyCells(7),
2 * 20);
}
-
-
+
+
//Technetium
GT_Values.RA.addChemicalRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustTechnetium99", 1), null,
FluidUtils.getFluidStack("sulfuricacid", 1000), FluidUtils.getFluidStack("sulfuricacid", 144 * 2),
ItemUtils.getItemStackOfAmountFromOreDict("dustTechnetium", 1), 100 * 20);
-
+
}
private static void blastFurnaceRecipes() {
- //public boolean addBlastRecipe(
+ //public boolean addBlastRecipe(
//ItemStack aInput1, ItemStack aInput2,
//FluidStack aFluidInput, FluidStack aFluidOutput,
//ItemStack aOutput1, ItemStack aOutput2,
//int aDuration, int aEUt, int aLevel)
-
+
GT_Values.RA.addBlastRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustLithiumFluoride", 2),
ItemUtils.getItemStackOfAmountFromOreDict("dustBerylliumFluoride", 1), GT_Values.NF, GT_Values.NF,
ItemUtils.getItemStackOfAmountFromOreDict("dustLi2BeF4", 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);
-
-
+
+
//Synthetic Graphite
GT_Values.RA.addBlastRecipe(
CI.getNumberedCircuit(22),
@@ -1734,7 +1823,7 @@ public class RECIPES_GREGTECH {
60 * 20,
MaterialUtils.getVoltageForTier(GTNH ? 5 : 4),
4500);
-
+
//Bomb Casings
GT_Values.RA.addBlastRecipe(
GregtechItemList.Bomb_Cast.get(4),
@@ -1746,7 +1835,7 @@ public class RECIPES_GREGTECH {
4 * 60 * 20,
MaterialUtils.getVoltageForTier(GTNH ? 3 : 2),
2800);
-
+
//Krypton Processing
if (ModItems.itemHotTitaniumIngot != null) {
GT_Values.RA.addBlastRecipe(
@@ -1760,8 +1849,8 @@ public class RECIPES_GREGTECH {
500,
Materials.Titanium.mBlastFurnaceTemp);
}
-
-
+
+
}
private static void autoclaveRecipes() {
@@ -1785,7 +1874,7 @@ public class RECIPES_GREGTECH {
ItemUtils.getItemStackOfAmountFromOreDict("plateMeatRaw", 1));
GT_ModHandler.addCompressionRecipe(ItemUtils.getItemStackOfAmountFromOreDict("dustMeatRaw", 9),
ItemUtils.getItemStackOfAmountFromOreDict("blockMeatRaw", 1));
-
+
CORE.RA.addCompressorRecipe(ItemList.FusionComputer_UV.get(9), GregtechItemList.Compressed_Fusion_Reactor.get(1), (int) GT_Values.V[7], (int) GT_Values.V[8]);
}
@@ -1861,13 +1950,13 @@ public class RECIPES_GREGTECH {
CORE.RA.addCyclotronRecipe(new ItemStack[] {ELEMENT.getInstance().URANIUM238.getDust(1) }, FluidUtils.getFluidStack("deuterium", 400),
new ItemStack[] {ItemUtils.getSimpleStack(ModItems.dustNeptunium238)}, null, new int[] { 500 }, 20 * 5, 500 * 4,
500 * 20); //PO Special Value
-
-
+
+
/**
* Particle Science
*/
-
+
// Quark Smash
CORE.RA.addCyclotronRecipe(
CI.getNumberedCircuit(3),
@@ -1879,7 +1968,7 @@ public class RECIPES_GREGTECH {
Particle.getBaseParticle(Particle.STRANGE),
Particle.getBaseParticle(Particle.TOP),
Particle.getBaseParticle(Particle.BOTTOM),
- },
+ },
null,
new int[] { 50, 50, 50, 50, 50, 50 },
20 * 300 * 9,
@@ -1897,7 +1986,7 @@ public class RECIPES_GREGTECH {
Particle.getBaseParticle(Particle.ELECTRON_NEUTRINO),
Particle.getBaseParticle(Particle.MUON_NEUTRINO),
Particle.getBaseParticle(Particle.TAU_NEUTRINO),
- },
+ },
null,
new int[] { 600, 40, 20, 15, 10, 5 },
20 * 300 * 8,
@@ -1914,14 +2003,14 @@ public class RECIPES_GREGTECH {
Particle.getBaseParticle(Particle.Z_BOSON),
Particle.getBaseParticle(Particle.W_BOSON),
Particle.getBaseParticle(Particle.HIGGS_BOSON),
- },
+ },
null,
new int[] { 160, 260, 150, 150, 1 },
20 * 300 * 6,
(int) GT_Values.V[7],
750 * 20);
-
-
+
+
// Mixed Smash 1
CORE.RA.addCyclotronRecipe(
CI.getNumberedCircuit(12),
@@ -1935,13 +2024,13 @@ public class RECIPES_GREGTECH {
Particle.getBaseParticle(Particle.LAMBDA),
Particle.getBaseParticle(Particle.OMEGA),
Particle.getBaseParticle(Particle.HIGGS_BOSON),
- },
+ },
null,
new int[] { 10, 20, 20, 10, 10, 5, 5, 2 },
17 * 247 * 32,
(int) GT_Values.V[8],
750 * 20);
-
+
// Graviton Smash
CORE.RA.addCyclotronRecipe(
CI.getNumberedCircuit(15),
@@ -1949,20 +2038,20 @@ public class RECIPES_GREGTECH {
new ItemStack[] {
Particle.getBaseParticle(Particle.GRAVITON),
Particle.getBaseParticle(Particle.UNKNOWN)
- },
+ },
null,
new int[] {15, 100},
20 * (GTNH ? 90 : 30),
(int) GT_Values.V[6],
1000 * 20);
-
+
FluidStack aPlasma = Materials.Duranium.getMolten(GTNH ? 40 : 10);
FluidStack aPlasma_NULL = Materials._NULL.getPlasma(1);
-
+
if (aPlasma == null || aPlasma.isFluidEqual(aPlasma_NULL)) {
aPlasma = Materials.Americium.getMolten(GTNH ? 20 : 5);
}
-
+
// Quantum Anomaly
CORE.RA.addCyclotronRecipe(
new ItemStack[] {
@@ -1972,17 +2061,17 @@ public class RECIPES_GREGTECH {
aPlasma,
new ItemStack[] {
GregtechItemList.Laser_Lens_Special.get(1)
- },
+ },
null,
new int[] {100},
20 * (GTNH ? 300 : 60),
(int) GT_Values.V[6],
1000 * 20);
-
+
/*
* Ions
*/
-
+
int IonCount = 2;
int tenCountA = (GTNH ? 2 : 1);
int tenCountB = 0;
@@ -1993,33 +2082,33 @@ public class RECIPES_GREGTECH {
FluidStack aPlasma2 = FluidUtils.getFluidStack("plasma."+y.toLowerCase(), 2);
Materials aTestMat = MaterialUtils.getMaterial(y);
FluidStack aPlasma3 = aTestMat != null ? aTestMat.getPlasma(2) : aPlasma2;
-
+
// Ionize Plasma
if ((aPlasma2 != null && !aPlasma2.isFluidEqual(aPlasma_NULL)) || (aPlasma3 != null && !aPlasma3.isFluidEqual(aPlasma_NULL))) {
- CORE.RA.addCyclotronRecipe(
- CI.getNumberedCircuit(1+(tenCountA-1)),
- aPlasma2 != null ? aPlasma2 : aPlasma3,
- new ItemStack[] {
- Particle.getIon(y, 1),
- Particle.getIon(y, 2),
- Particle.getIon(y, 3),
- Particle.getIon(y, -1),
- Particle.getIon(y, -2),
- Particle.getIon(y, -3),
- Particle.getIon(y, 1),
- Particle.getIon(y, 2),
- Particle.getIon(y, -1),
- },
- null,
- new int[] { 275, 250, 225, 275, 250, 225, 275, 250, 275},
- 20 * 20 * (IonCount++) * tenCountA,
- (int) GT_Values.V[7],
- 1500 * 20 * tenCountA);
+ CORE.RA.addCyclotronRecipe(
+ CI.getNumberedCircuit(1+(tenCountA-1)),
+ aPlasma2 != null ? aPlasma2 : aPlasma3,
+ new ItemStack[] {
+ Particle.getIon(y, 1),
+ Particle.getIon(y, 2),
+ Particle.getIon(y, 3),
+ Particle.getIon(y, -1),
+ Particle.getIon(y, -2),
+ Particle.getIon(y, -3),
+ Particle.getIon(y, 1),
+ Particle.getIon(y, 2),
+ Particle.getIon(y, -1),
+ },
+ null,
+ new int[] { 275, 250, 225, 275, 250, 225, 275, 250, 275},
+ 20 * 20 * (IonCount++) * tenCountA,
+ (int) GT_Values.V[7],
+ 1500 * 20 * tenCountA);
}
else {
Logger.INFO("Plasma for "+y+" does not exist, please report this to Alkalus.");
}
-
+
if (tenCountB == 12) {
tenCountB = 0;
tenCountA++;
@@ -2028,7 +2117,7 @@ public class RECIPES_GREGTECH {
tenCountB++;
}
}
-
+
// Generate Hydrogen Ion Recipe
CORE.RA.addCyclotronRecipe(
CI.getNumberedCircuit(24),
@@ -2043,19 +2132,19 @@ public class RECIPES_GREGTECH {
Particle.getIon("Hydrogen", -1),
Particle.getIon("Hydrogen", -2),
Particle.getIon("Hydrogen", -3)
- },
+ },
null,
new int[] { 125, 125, 125, 125, 125, 125, 125, 125, 125 },
20 * 20,
(int) GT_Values.V[6],
15000);
-
+
// Generate Hydrogen Plasma Recipe
CORE.RA.addCyclotronRecipe(
new ItemStack[] {
Particle.getIon("Hydrogen", 0),
ItemUtils.getItemStackOfAmountFromOreDict("cellHydrogen", 1)
- },
+ },
null,
new ItemStack[] {
Particle.getBaseParticle(Particle.PROTON),
@@ -2065,20 +2154,20 @@ public class RECIPES_GREGTECH {
Particle.getBaseParticle(Particle.UNKNOWN),
Particle.getBaseParticle(Particle.UNKNOWN),
CI.emptyCells(1)
- },
+ },
FluidUtils.getFluidStack("plasma.hydrogen", 1),
new int[] { 250, 250, 250, 500, 500, 500, 10000 },
20 * 60 * 2,
(int) GT_Values.V[7],
750 * 20);
-
+
// Generate Protons Easily
CORE.RA.addCyclotronRecipe(
new ItemStack[] {
CI.getNumberedCircuit(20),
Particle.getIon("Hydrogen", 0)
- },
+ },
FluidUtils.getWildcardFluidStack("hydrogen", 100),
new ItemStack[] {
Particle.getBaseParticle(Particle.PROTON),
@@ -2090,18 +2179,18 @@ public class RECIPES_GREGTECH {
Particle.getBaseParticle(Particle.PROTON),
Particle.getBaseParticle(Particle.PROTON),
Particle.getBaseParticle(Particle.PROTON),
- },
+ },
null,
new int[] { 750, 750, 750, 750, 750, 750, 750, 750, 750 },
20 * 20,
(int) GT_Values.V[6],
15000);
-
+
CORE.RA.addCyclotronRecipe(
new ItemStack[] {
CI.getNumberedCircuit(22),
Particle.getBaseParticle(Particle.UNKNOWN),
- },
+ },
FluidUtils.getWildcardFluidStack("hydrogen", 100),
new ItemStack[] {
Particle.getBaseParticle(Particle.PROTON),
@@ -2113,14 +2202,14 @@ public class RECIPES_GREGTECH {
Particle.getBaseParticle(Particle.PROTON),
Particle.getBaseParticle(Particle.PROTON),
Particle.getBaseParticle(Particle.PROTON),
- },
+ },
null,
new int[] { 375, 375, 375, 375, 375, 375, 375, 375, 375 },
20 * 20,
(int) GT_Values.V[6],
15000);
-
-
+
+
//Create Strange Dust
CORE.RA.addCyclotronRecipe(
new ItemStack[] {
@@ -2133,20 +2222,20 @@ public class RECIPES_GREGTECH {
Particle.getBaseParticle(Particle.UNKNOWN),
Particle.getBaseParticle(Particle.UNKNOWN),
Particle.getBaseParticle(Particle.UNKNOWN),
- },
+ },
FluidUtils.getFluidStack(FluidUtils.getWildcardFluidStack("ender", 1000), 1000),
new ItemStack[] {
ORES.DEEP_EARTH_REACTOR_FUEL_DEPOSIT.getDust(1)
- },
+ },
null,
new int[] { 2500 },
20 * 60 * 15,
(int) GT_Values.V[7],
15000);
-
-
-
-
+
+
+
+
}
@@ -2161,12 +2250,15 @@ public class RECIPES_GREGTECH {
ELEMENT.getInstance().CERIUM.getSmallDust(1),
ELEMENT.getInstance().CADMIUM.getSmallDust(1),
ELEMENT.getInstance().CAESIUM.getSmallDust(1),
- ELEMENT.getInstance().YTTERBIUM.getTinyDust(1),
- ELEMENT.getInstance().SAMARIUM.getTinyDust(1),
- ELEMENT.getInstance().GADOLINIUM.getTinyDust(1)
- },
- new int[] { 2000, 2000, 2000, 2000, 2000, 2000, 1000, 1000, 1000 }, 20 * 30, 500);
-
+ ORES.SAMARSKITE_YB.getSmallDust(1),
+ ORES.FLORENCITE.getSmallDust(1),
+ ORES.FLUORCAPHITE.getSmallDust(1),
+ //ELEMENT.getInstance().YTTERBIUM.getTinyDust(1),
+ //ELEMENT.getInstance().SAMARIUM.getTinyDust(1),
+ //ELEMENT.getInstance().GADOLINIUM.getTinyDust(1)
+ },
+ new int[] { 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000 }, 20 * 30, 500);
+
// Zirconium
GT_Values.RA.addSifterRecipe(ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedIlmenite", 1),
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustIron", 1),
@@ -2176,7 +2268,7 @@ public class RECIPES_GREGTECH {
ItemUtils.getItemStackOfAmountFromOreDict("dustHafnium", 1),
ItemUtils.getItemStackOfAmountFromOreDict("dustHafnium", 1) },
new int[] { 5000, 2500, 1000, 1000, 300, 300 }, 20 * 30, 500);
-
+
// Zirconium
GT_Values.RA.addSifterRecipe(ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedTin", 1),
new ItemStack[] { ItemUtils.getItemStackOfAmountFromOreDict("dustTin", 1),
@@ -2247,38 +2339,38 @@ public class RECIPES_GREGTECH {
ItemUtils.getItemStackOfAmountFromOreDict("dustSmallZircon", 1),
ItemUtils.getItemStackOfAmountFromOreDict("dustTinyZircon", 1), new int[] { 10000, 1250, 2500 },
20 * 20, 24);
-
-
+
+
if (!GTNH) {
- // Trinium
- GT_Values.RA.addElectromagneticSeparatorRecipe(
- ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedNaquadah", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustNaquadah", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustSmallNaquadahEnriched", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTrinium", 1), new int[] { 10000, 2500, 5000 },
- 20 * 20, 24);
+ // Trinium
+ GT_Values.RA.addElectromagneticSeparatorRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedNaquadah", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustNaquadah", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustSmallNaquadahEnriched", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTrinium", 1), new int[] { 10000, 2500, 5000 },
+ 20 * 20, 24);
- // Trinium
- GT_Values.RA.addElectromagneticSeparatorRecipe(
- ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedIridium", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustIridium", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustSmallOsmium", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTrinium", 1), new int[] { 10000, 2500, 5000 },
- 20 * 20, 24);
+ // Trinium
+ GT_Values.RA.addElectromagneticSeparatorRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedIridium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustIridium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustSmallOsmium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTrinium", 1), new int[] { 10000, 2500, 5000 },
+ 20 * 20, 24);
- // Trinium
- GT_Values.RA.addElectromagneticSeparatorRecipe(
- ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedWulfenite", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustWulfenite", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTrinium", 1),
- ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTrinium", 1), new int[] { 10000, 3000, 3000 },
- 20 * 20, 24);
+ // Trinium
+ GT_Values.RA.addElectromagneticSeparatorRecipe(
+ ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedWulfenite", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustWulfenite", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTrinium", 1),
+ ItemUtils.getItemStackOfAmountFromOreDict("dustSmallTrinium", 1), new int[] { 10000, 3000, 3000 },
+ 20 * 20, 24);
}
-
-
-
-
+
+
+
+
}
private static void advancedMixerRecipes() {
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java
index bfd50e0ce1..52a6c4889e 100644
--- a/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_Machines.java
@@ -221,6 +221,9 @@ public class RECIPES_Machines {
energyCores();
wirelessChargers();
largeArcFurnace();
+ industrialVacuumFurnace();
+ fakeMachineCasingCovers();
+ superBuses();
}
private static void initModItems(){
@@ -1031,25 +1034,25 @@ public class RECIPES_Machines {
if (CORE.ConfigSwitches.enableMultiblock_ThermalBoiler){
RECIPE_ThermalBoilerController = GregtechItemList.GT4_Thermal_Boiler.get(1);
- RECIPE_ThermalBoilerCasing = GregtechItemList.Casing_ThermalContainment.get(4);
- ItemStack centrifugeHV = ItemList.Machine_HV_Centrifuge.get(1);
+ RECIPE_ThermalBoilerCasing = GregtechItemList.Casing_ThermalContainment.get(GTNH ? 1 : 2);
+ ItemStack centrifugeHV = GTNH ? ItemList.Machine_IV_Centrifuge.get(1) : ItemList.Machine_EV_Centrifuge.get(1);
RecipeUtils.addShapedGregtechRecipe(
"craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator",
- "gearGtTitanium", "circuitElite", "gearGtTitanium",
+ "gearGtTitanium", CI.getTieredCircuitOreDictName(6), "gearGtTitanium",
"craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator",
RECIPE_ThermalBoilerController);
RecipeUtils.addShapedGregtechRecipe(
"craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator",
- "gearGtTungstenSteel", "circuitElite", "gearGtTungstenSteel",
+ "gearGtTungstenSteel", CI.getTieredCircuitOreDictName(5), "gearGtTungstenSteel",
"craftingGeothermalGenerator", centrifugeHV, "craftingGeothermalGenerator",
RECIPE_ThermalBoilerController);
RecipeUtils.addShapedGregtechRecipe(
- "plateStainlessSteel", "plateStainlessSteel", "plateStainlessSteel",
+ ALLOY.MARAGING350.getPlate(1), "plateStainlessSteel", ALLOY.MARAGING350.getPlate(1),
"circuitAdvanced", CI.machineCasing_HV, "circuitAdvanced",
- "plateStainlessSteel", "plateStainlessSteel", "plateStainlessSteel",
+ ALLOY.MARAGING350.getPlate(1), ALLOY.MARAGING350.getPlate(1), ALLOY.MARAGING350.getPlate(1),
RECIPE_ThermalBoilerCasing);
//Lava Filter Recipe
@@ -2022,4 +2025,146 @@ public class RECIPES_Machines {
60 * 20 * 8,
MaterialUtils.getVoltageForTier(6));
}
+
+ private static void industrialVacuumFurnace() {
+ int aCostMultiplier = GTNH ? 2 : 1;
+
+ CORE.RA.addSixSlotAssemblingRecipe(
+ new ItemStack[] {
+ CI.getTieredMachineHull(-1, 1 * aCostMultiplier),
+ CI.getHeatCoil(2),
+ CI.getElectricPiston(3, 2 * aCostMultiplier),
+ CI.getTieredComponent(OrePrefixes.plate, 6, 4 * aCostMultiplier),
+ CI.getTieredComponent(OrePrefixes.gearGt, 6, 2 * aCostMultiplier),
+ },
+ CI.getTertiaryTieredFluid(5, (144 * 2 * 4 * aCostMultiplier)), //Input Fluid
+ GregtechItemList.Casing_Vacuum_Furnace.get(Casing_Amount),
+ 20 * 10 * 6,
+ MaterialUtils.getVoltageForTier(6));
+
+ ;
+
+ CORE.RA.addSixSlotAssemblingRecipe(
+ new ItemStack[] {
+ GregtechItemList.Casing_Vacuum_Furnace.get(Casing_Amount),
+ CI.getTieredComponent(OrePrefixes.wireGt16, 7, 4 * aCostMultiplier),
+ CI.getEnergyCore(6, 1 * aCostMultiplier),
+ CI.getRobotArm(4, 4 * aCostMultiplier),
+ CI.getTieredComponent(OrePrefixes.plate, 7, 8 * aCostMultiplier),
+ CI.getTieredComponent(OrePrefixes.circuit, 6, 8 * aCostMultiplier),
+ },
+ CI.getTieredFluid(7, (144 * 4 * 5 * aCostMultiplier)), //Input Fluid
+ GregtechItemList.Controller_Vacuum_Furnace.get(1),
+ 60 * 20 * 12,
+ MaterialUtils.getVoltageForTier(7));
+ }
+
+ private static void fakeMachineCasingCovers() {
+ GregtechItemList[] mMachineCasingCovers = new GregtechItemList[] {
+ GregtechItemList.FakeMachineCasingPlate_ULV,
+ GregtechItemList.FakeMachineCasingPlate_LV,
+ GregtechItemList.FakeMachineCasingPlate_MV,
+ GregtechItemList.FakeMachineCasingPlate_HV,
+ GregtechItemList.FakeMachineCasingPlate_EV,
+ GregtechItemList.FakeMachineCasingPlate_IV,
+ GregtechItemList.FakeMachineCasingPlate_LuV,
+ GregtechItemList.FakeMachineCasingPlate_ZPM,
+ GregtechItemList.FakeMachineCasingPlate_UV,
+ GregtechItemList.FakeMachineCasingPlate_MAX,
+ };
+ for (int i = 0;i<10;i++) {
+ GT_Values.RA.addCutterRecipe(
+ CI.getTieredMachineCasing(i),
+ mMachineCasingCovers[i].get(5),
+ null,
+ 20 * 5 * i,
+ (int) GT_Values.V[i]);
+ }
+ }
+
+ private static void superBuses() {
+ GregtechItemList[] mSuperBusesInput = new GregtechItemList[] {
+ GregtechItemList.Hatch_SuperBus_Input_ULV,
+ GregtechItemList.Hatch_SuperBus_Input_LV,
+ GregtechItemList.Hatch_SuperBus_Input_MV,
+ GregtechItemList.Hatch_SuperBus_Input_HV,
+ GregtechItemList.Hatch_SuperBus_Input_EV,
+ GregtechItemList.Hatch_SuperBus_Input_IV,
+ GregtechItemList.Hatch_SuperBus_Input_LuV,
+ GregtechItemList.Hatch_SuperBus_Input_ZPM,
+ GregtechItemList.Hatch_SuperBus_Input_UV,
+ GregtechItemList.Hatch_SuperBus_Input_MAX,
+ };
+
+ GregtechItemList[] mSuperBusesOutput = new GregtechItemList[] {
+ GregtechItemList.Hatch_SuperBus_Output_ULV,
+ GregtechItemList.Hatch_SuperBus_Output_LV,
+ GregtechItemList.Hatch_SuperBus_Output_MV,
+ GregtechItemList.Hatch_SuperBus_Output_HV,
+ GregtechItemList.Hatch_SuperBus_Output_EV,
+ GregtechItemList.Hatch_SuperBus_Output_IV,
+ GregtechItemList.Hatch_SuperBus_Output_LuV,
+ GregtechItemList.Hatch_SuperBus_Output_ZPM,
+ GregtechItemList.Hatch_SuperBus_Output_UV,
+ GregtechItemList.Hatch_SuperBus_Output_MAX,
+ };
+
+ ItemStack[] mInputHatch = new ItemStack[] {
+ ItemList.Hatch_Input_Bus_EV.get(1),
+ ItemList.Hatch_Input_Bus_IV.get(1),
+ ItemList.Hatch_Input_Bus_LuV.get(1),
+ ItemList.Hatch_Input_Bus_ZPM.get(1),
+ ItemList.Hatch_Input_Bus_UV.get(1),
+ ItemList.Hatch_Input_Bus_MAX.get(1),
+ GregtechItemList.Hatch_SuperBus_Input_ULV.get(1),
+ GregtechItemList.Hatch_SuperBus_Input_LV.get(1),
+ GregtechItemList.Hatch_SuperBus_Input_MV.get(1),
+ GregtechItemList.Hatch_SuperBus_Input_HV.get(1),
+ };
+
+ ItemStack[] mOutputHatch = new ItemStack[] {
+ ItemList.Hatch_Output_Bus_EV.get(1),
+ ItemList.Hatch_Output_Bus_IV.get(1),
+ ItemList.Hatch_Output_Bus_LuV.get(1),
+ ItemList.Hatch_Output_Bus_ZPM.get(1),
+ ItemList.Hatch_Output_Bus_UV.get(1),
+ ItemList.Hatch_Output_Bus_MAX.get(1),
+ GregtechItemList.Hatch_SuperBus_Output_ULV.get(1),
+ GregtechItemList.Hatch_SuperBus_Output_LV.get(1),
+ GregtechItemList.Hatch_SuperBus_Output_MV.get(1),
+ GregtechItemList.Hatch_SuperBus_Output_HV.get(1),
+ };
+
+ //Input Buses
+ for (int i = 0; i < 10; i++) {
+ CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {
+ CI.getNumberedCircuit(16),
+ mInputHatch[i],
+ CI.getElectricMotor(i, GTNH ? 8 : 2),
+ CI.getConveyor(i, GTNH ? 10 : 5),
+ CI.getGear(i, GTNH ? 6 : 3),
+ CI.getTieredComponent(OrePrefixes.circuit, i, GTNH ? 4 : 2)
+ },
+ CI.getAlternativeTieredFluid(i, 144 * 8),
+ mSuperBusesInput[i].get(1), 20 * 30 * 2 * i,
+ (int) GT_Values.V[i]);
+ }
+ //Output Buses
+ for (int i = 0; i < 10; i++) {
+ CORE.RA.addSixSlotAssemblingRecipe(new ItemStack[] {
+ CI.getNumberedCircuit(18),
+ mOutputHatch[i],
+ CI.getElectricPiston(i, GTNH ? 8 : 2),
+ CI.getConveyor(i, GTNH ? 10 : 5),
+ CI.getGear(i, GTNH ? 6 : 3),
+ CI.getTieredComponent(OrePrefixes.circuit, i, GTNH ? 4 : 2)
+ },
+ CI.getTertiaryTieredFluid(i, 144 * 8),
+ mSuperBusesOutput[i].get(1), 20 * 30 * 2 * i,
+ (int) GT_Values.V[i]);
+ }
+
+
+ }
+
}
diff --git a/src/Java/gtPlusPlus/core/recipe/RECIPES_SeleniumProcessing.java b/src/Java/gtPlusPlus/core/recipe/RECIPES_SeleniumProcessing.java
new file mode 100644
index 0000000000..471a3cc33e
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/recipe/RECIPES_SeleniumProcessing.java
@@ -0,0 +1,217 @@
+package gtPlusPlus.core.recipe;
+
+import gregtech.api.enums.Materials;
+import gregtech.api.enums.OrePrefixes;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.material.ELEMENT;
+import gtPlusPlus.core.material.MISC_MATERIALS;
+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 gtPlusPlus.core.util.reflect.AddGregtechRecipe;
+import net.minecraft.item.ItemStack;
+
+public class RECIPES_SeleniumProcessing {
+
+ public static void init() {
+
+ //We need this
+ MaterialUtils.generateSpecialDustAndAssignToAMaterial(MISC_MATERIALS.SELENIUM_DIOXIDE);
+
+ // Makes Selenium Dioxide
+ processCopperRecipes();
+
+ //Liquify the Dried Dioxide
+ AddGregtechRecipe.addCokeAndPyrolyseRecipes(MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1), 13, FluidUtils.getSteam(500), null, MISC_MATERIALS.SELENIUM_DIOXIDE.getFluid(1000), 20, 1024);
+
+ // Produce Selenious Acid
+ AddGregtechRecipe.addCokeAndPyrolyseRecipes(MISC_MATERIALS.SELENIUM_DIOXIDE.getCell(1), 14, FluidUtils.getHotWater(4000), CI.emptyCells(1), MISC_MATERIALS.SELENIOUS_ACID.getFluid(1000), 20, 2048);
+
+ // Make Selenium
+ CORE.RA.addBlastSmelterRecipe(
+ new ItemStack[] {
+ ItemUtils.getGregtechCircuit(14),
+ ItemUtils.getItemStackOfAmountFromOreDict("cellSulfuricAcid", 8),
+ ELEMENT.getInstance().CARBON.getDust(16),
+ },
+ MISC_MATERIALS.SELENIOUS_ACID.getFluid(750),
+ ELEMENT.getInstance().SELENIUM.getFluid(144 * 1),
+ new ItemStack[] {
+ CI.emptyCells(8),
+ ELEMENT.getInstance().SELENIUM.getIngot(1),
+ ELEMENT.getInstance().SELENIUM.getIngot(1),
+ },
+ new int[] {10000, 2000, 2000},
+ 20 * 300,
+ 7200);
+
+
+ /*// Old recipes for Selenium Roasting
+ CORE.RA.addBlastSmelterRecipe(
+ new ItemStack[] {
+ ItemUtils.getGregtechCircuit(16),
+ ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedPyrite", 8),
+ ELEMENT.getInstance().CARBON.getDust(32),
+ },
+ Materials.SulfuricAcid.getFluid(4000),
+ ELEMENT.getInstance().SELENIUM.getFluid(144),
+ 0,
+ 20 * 300,
+ 2000);
+ CORE.RA.addBlastSmelterRecipe(
+ new ItemStack[] {
+ ItemUtils.getGregtechCircuit(17),
+ ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedChalcopyrite", 8),
+ ELEMENT.getInstance().CARBON.getDust(32),
+ },
+ Materials.SulfuricAcid.getFluid(4000),
+ ELEMENT.getInstance().SELENIUM.getFluid(144),
+ 0,
+ 20 * 300,
+ 2000);
+ CORE.RA.addBlastSmelterRecipe(
+ new ItemStack[] {
+ ItemUtils.getGregtechCircuit(18),
+ ItemUtils.getItemStackOfAmountFromOreDict("crushedPurifiedGalena", 8),
+ ELEMENT.getInstance().CARBON.getDust(32),
+ },
+ Materials.SulfuricAcid.getFluid(4000),
+ ELEMENT.getInstance().SELENIUM.getFluid(144),
+ 0,
+ 20 * 300,
+ 2000);*/
+ }
+
+
+ public static void processCopperRecipes() {
+
+ //Copper
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[]{
+ ItemUtils.getOrePrefixStack(OrePrefixes.crushedCentrifuged, Materials.Copper, 1), // Item Input
+ },
+ FluidUtils.getHotWater(1000), // Fluid
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getFluid(20), // Fluid
+ new ItemStack[] {
+ ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Copper, 1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1),
+ }, // Output
+ new int[] {
+ 10000,
+ 100,
+ 100,
+ 500,
+ 500,
+ 500,
+ 1000,
+ 1000,
+ 1000
+ },
+ 40 * 20, // Time in ticks
+ 1024); // EU
+
+
+ //Tetra
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[]{
+ ItemUtils.getOrePrefixStack(OrePrefixes.crushedCentrifuged, Materials.Tetrahedrite, 1), // Item Input
+ },
+ FluidUtils.getHotWater(1000), // Fluid
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getFluid(10), // Fluid
+ new ItemStack[] {
+ ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Tetrahedrite, 1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1),
+ }, // Output
+ new int[] {
+ 10000,
+ 100,
+ 100,
+ 300,
+ 300,
+ 300,
+ 800,
+ 800,
+ 800
+ },
+ 40 * 20, // Time in ticks
+ 1024); // EU
+ //Chalco
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[]{
+ ItemUtils.getOrePrefixStack(OrePrefixes.crushedCentrifuged, Materials.Chalcopyrite, 1), // Item Input
+ },
+ FluidUtils.getHotWater(1000), // Fluid
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getFluid(10), // Fluid
+ new ItemStack[] {
+ ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Chalcopyrite, 1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1),
+ }, // Output
+ new int[] {
+ 10000,
+ 100,
+ 100,
+ 300,
+ 300,
+ 300,
+ 800,
+ 800,
+ 800
+ },
+ 40 * 20, // Time in ticks
+ 1024); // EU
+ //Malachite
+ CORE.RA.addDehydratorRecipe(
+ new ItemStack[]{
+ ItemUtils.getOrePrefixStack(OrePrefixes.crushedCentrifuged, Materials.Malachite, 1), // Item Input
+ },
+ FluidUtils.getHotWater(1000), // Fluid
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getFluid(10), // Fluid
+ new ItemStack[] {
+ ItemUtils.getOrePrefixStack(OrePrefixes.crushedPurified, Materials.Malachite, 1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getSmallDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1),
+ MISC_MATERIALS.SELENIUM_DIOXIDE.getTinyDust(1),
+ }, // Output
+ new int[] {
+ 10000,
+ 100,
+ 100,
+ 300,
+ 300,
+ 300,
+ 800,
+ 800,
+ 800
+ },
+ 40 * 20, // Time in ticks
+ 1024); // EU
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/core/recipe/common/CI.java b/src/Java/gtPlusPlus/core/recipe/common/CI.java
index dffb438e4a..a9f336d19c 100644
--- a/src/Java/gtPlusPlus/core/recipe/common/CI.java
+++ b/src/Java/gtPlusPlus/core/recipe/common/CI.java
@@ -17,6 +17,7 @@ import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.eio.material.MaterialEIO;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechItemList;
+import gtPlusPlus.xmod.gregtech.common.StaticFields59;
import ic2.core.Ic2Items;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
@@ -574,7 +575,7 @@ public class CI {
private static final Material[] aMaterial_Tertiary = new Material[] {
ALLOY.STEEL,
ELEMENT.getInstance().ALUMINIUM,
- ALLOY.STAINLESSSTEEL,
+ ALLOY.STAINLESS_STEEL,
ELEMENT.getInstance().TUNGSTEN,
ALLOY.HASTELLOY_N,
ALLOY.ENERGYCRYSTAL,
@@ -1201,4 +1202,28 @@ public class CI {
return ItemUtils.getSimpleStack(aType, aSize);
}
+ public static ItemStack getHeatCoil(int i) {
+ if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
+ if (i == 1) {
+ return ItemList.Casing_Coil_Kanthal.get(1);
+ } else if (i == 2) {
+ return ItemList.Casing_Coil_Nichrome.get(1);
+ } else {
+ return ItemList.Casing_Coil_Cupronickel.get(1);
+ }
+ } else {
+ if (!CORE.GTNH) {
+ if (i > 6) {
+ i = 6;
+ }
+ } else {
+ if (i > 8) {
+ i = 8;
+ }
+ }
+ return ItemUtils.simpleMetaStack(StaticFields59.getBlockCasings5(), i, 1);
+ }
+
+ }
+
}
diff --git a/src/Java/gtPlusPlus/core/slots/SlotAirFilter.java b/src/Java/gtPlusPlus/core/slots/SlotAirFilter.java
new file mode 100644
index 0000000000..92e9bebe21
--- /dev/null
+++ b/src/Java/gtPlusPlus/core/slots/SlotAirFilter.java
@@ -0,0 +1,30 @@
+package gtPlusPlus.core.slots;
+
+import gtPlusPlus.core.item.general.ItemAirFilter;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.Slot;
+import net.minecraft.item.ItemStack;
+
+public class SlotAirFilter extends Slot {
+
+ public SlotAirFilter(final IInventory inventory, final int slot, final int x, final int y) {
+ super(inventory, slot, x, y);
+ }
+
+ @Override
+ public boolean isItemValid(final ItemStack itemstack) {
+ if (itemstack == null) {
+ return false;
+ }
+ if (itemstack.getItem() instanceof ItemAirFilter){
+ return true;
+ }
+ return false;
+ }
+
+ @Override
+ public int getSlotStackLimit() {
+ return 1;
+ }
+
+}
diff --git a/src/Java/gtPlusPlus/core/util/math/MathUtils.java b/src/Java/gtPlusPlus/core/util/math/MathUtils.java
index 3cef3c511f..bda722b47e 100644
--- a/src/Java/gtPlusPlus/core/util/math/MathUtils.java
+++ b/src/Java/gtPlusPlus/core/util/math/MathUtils.java
@@ -7,6 +7,7 @@ import gregtech.api.enums.GT_Values;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.api.objects.data.Pair;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
@@ -227,7 +228,7 @@ public class MathUtils {
* @param x Value A.
* @return boolean Whether or not it divides evenly.
*/
- public static boolean isNumberEven(final int x){
+ public static boolean isNumberEven(final long x){
if ((x % 2) == 0)
{
return true;
@@ -696,5 +697,11 @@ public class MathUtils {
int aAmount = Math.max(Math.min(i, aMax), aMin);
return aAmount;
}
+
+ public static Pair<Integer, Integer> splitLongIntoIntegers(long aLong){
+ int aIntMaxInLong = (int) Math.min(Integer.MAX_VALUE, Math.floor(aLong/Integer.MAX_VALUE));
+ int aRemainder = (int) (aLong - (aIntMaxInLong * Integer.MAX_VALUE));
+ return new Pair<Integer, Integer>(aIntMaxInLong, aRemainder);
+ }
}
diff --git a/src/Java/gtPlusPlus/core/util/minecraft/EnergyUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/EnergyUtils.java
index ef68436f21..7daefbcc23 100644
--- a/src/Java/gtPlusPlus/core/util/minecraft/EnergyUtils.java
+++ b/src/Java/gtPlusPlus/core/util/minecraft/EnergyUtils.java
@@ -1,9 +1,7 @@
package gtPlusPlus.core.util.minecraft;
-import gregtech.api.enums.GT_Values;
import gregtech.api.util.GT_ModHandler;
import gtPlusPlus.api.objects.Logger;
-import ic2.api.item.ElectricItem;
import ic2.api.item.IElectricItem;
import ic2.api.item.IElectricItemManager;
import ic2.api.item.ISpecialElectricItem;
@@ -40,7 +38,7 @@ public class EnergyUtils {
if (isElectricItem(aStack)) {
int tTier = ((IElectricItem) aStack.getItem()).getTier(aStack);
int aDischargeValue = GT_ModHandler.dischargeElectricItem(aStack, aEnergyToDrain, tTier, true, false, false);
- Logger.INFO("Trying to drain "+aDischargeValue);
+ //Logger.INFO("Trying to drain "+aDischargeValue);
return aDischargeValue > 0;
}
else {
diff --git a/src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java
index 8c5a9f6581..49aa3a1306 100644
--- a/src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java
+++ b/src/Java/gtPlusPlus/core/util/minecraft/EntityUtils.java
@@ -11,6 +11,7 @@ import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.data.AutoMap;
import gtPlusPlus.api.objects.minecraft.AABB;
import gtPlusPlus.api.objects.minecraft.BlockPos;
+import gtPlusPlus.core.handler.events.EntityDeathHandler;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import ic2.core.IC2Potion;
import ic2.core.item.armor.ItemArmorHazmat;
@@ -20,6 +21,7 @@ import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
import net.minecraft.util.DamageSource;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
@@ -87,7 +89,7 @@ public class EntityUtils {
}
return false;
}
-
+
public static boolean applyHeatDamageToEntity(final int heatLevel, final World world, final Entity entityHolding){
if (!world.isRemote){
if ((heatLevel > 0) && (entityHolding instanceof EntityLivingBase)) {
@@ -113,11 +115,7 @@ public class EntityUtils {
*/
public synchronized static boolean doFireDamage(Entity entity, int amount){
if (dealFireDamage == null){
- try {
- dealFireDamage = Entity.class.getDeclaredMethod("dealFireDamage", int.class);
- dealFireDamage.setAccessible(true);
- }
- catch (NoSuchMethodException | SecurityException e) {}
+ dealFireDamage = ReflectionUtils.getMethod(Entity.class, "dealFireDamage", int.class);
}
else {
try {
@@ -131,42 +129,41 @@ public class EntityUtils {
public static void doDamage(Entity entity, DamageSource dmg, int i) {
entity.attackEntityFrom(dmg, i);
}
-
+
public static boolean isTileEntityRegistered(Class aTileClass, String aTileName) {
Field aRegistry = ReflectionUtils.getField(ReflectionUtils.getClass("net.minecraft.tileentity.TileEntity"), "nameToClassMap");
Field aRegistry2 = ReflectionUtils.getField(ReflectionUtils.getClass("net.minecraft.tileentity.TileEntity"), "classToNameMap");
try {
Object o = aRegistry.get(null);
if (o != null) {
- Map nameToClassMap = (Map) o;
- if (!nameToClassMap.containsKey(aTileName)) {
- o = aRegistry2.get(null);
- if (o != null) {
- Map classToNameMap = (Map) o;
- if (!classToNameMap.containsKey(aTileClass)) {
- return false;
- }
- else {
- return true;
- }
- }
- }
- else {
- return true;
- }
+ Map nameToClassMap = (Map) o;
+ if (!nameToClassMap.containsKey(aTileName)) {
+ o = aRegistry2.get(null);
+ if (o != null) {
+ Map classToNameMap = (Map) o;
+ if (!classToNameMap.containsKey(aTileClass)) {
+ return false;
+ }
+ else {
+ return true;
+ }
+ }
+ }
+ else {
+ return true;
+ }
}
} catch (IllegalArgumentException | IllegalAccessException e) {
e.printStackTrace();
}
return false;
}
-
+
public static double getDistance(Entity p1, Entity p2) {
- return Math.sqrt( Math.pow(p1.posX - p2.posX, 2) + Math.pow(p1.posY - p2.posY, 2) + Math.pow(p1.posZ - p2.posZ, 2));
+ return Math.sqrt( Math.pow(p1.posX - p2.posX, 2) + Math.pow(p1.posY - p2.posY, 2) + Math.pow(p1.posZ - p2.posZ, 2));
}
-
+
public static AutoMap<Entity> getEntitiesWithinBoundingBoxExcluding(Entity aExclusion, AABB aBoundingBox){
-
if (aExclusion == null) {
return new AutoMap<Entity>();
}
@@ -175,9 +172,8 @@ public class EntityUtils {
return new AutoMap<Entity>(aEntities);
}
}
-
+
public static AutoMap<Entity> getEntitiesWithinBoundingBox(Class aEntityType, AABB aBoundingBox){
-
if (aEntityType == null) {
return new AutoMap<Entity>();
}
@@ -186,5 +182,26 @@ public class EntityUtils {
return new AutoMap<Entity>(aEntities);
}
}
+
+ /**
+ * Provides the ability to provide custom drops upon the death of EntityLivingBase objects. Simplified function with static Max drop size of 1.
+ * @param aMobClass - The Base Class you want to drop this item.
+ * @param aStack - The ItemStack, stack size is not respected.
+ * @param aChance - Chance out of 10000, where 100 is 1%. (1 = 0.01% - this is ok)
+ */
+ public static void registerDropsForMob(Class aMobClass, ItemStack aStack, int aChance) {
+ registerDropsForMob(aMobClass, aStack, 1, aChance);
+ }
+
+ /**
+ * Provides the ability to provide custom drops upon the death of EntityLivingBase objects.
+ * @param aMobClass - The Base Class you want to drop this item.
+ * @param aStack - The ItemStack, stack size is not respected.
+ * @param aMaxAmount - The maximum size of the ItemStack which drops.
+ * @param aChance - Chance out of 10000, where 100 is 1%. (1 = 0.01% - this is ok)
+ */
+ public static void registerDropsForMob(Class aMobClass, ItemStack aStack, int aMaxAmount, int aChance) {
+ EntityDeathHandler.registerDropsForMob(aMobClass, aStack, aMaxAmount, aChance);
+ }
}
diff --git a/src/Java/gtPlusPlus/core/util/minecraft/FluidUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/FluidUtils.java
index 0ae751a20b..09263bb639 100644
--- a/src/Java/gtPlusPlus/core/util/minecraft/FluidUtils.java
+++ b/src/Java/gtPlusPlus/core/util/minecraft/FluidUtils.java
@@ -25,14 +25,64 @@ public class FluidUtils {
return FluidUtils.getFluidStack("water", amount);
}
- public static FluidStack getlava(final int amount){
+ public static FluidStack getDistilledWater(final int amount){
+ return FluidUtils.getFluidStack("ic2distilledwater", amount);
+ }
+
+ public static FluidStack getHotWater(final int amount) {
+ return FluidUtils.getFluidStack("ic2hotwater", amount);
+ }
+
+ public static FluidStack getLava(final int amount){
return FluidUtils.getFluidStack("lava", amount);
}
+ public static FluidStack getPahoehoeLava(final int amount){
+ return FluidUtils.getFluidStack("ic2pahoehoelava", amount);
+ }
+
public static FluidStack getMilk(final int amount){
return FluidUtils.getFluidStack("milk", amount);
}
+ public static FluidStack getColdCoolant(final int amount){
+ return FluidUtils.getFluidStack("ic2coolant", amount);
+ }
+
+ public static FluidStack getHotCoolant(final int amount){
+ return FluidUtils.getFluidStack("ic2hotcoolant", amount);
+ }
+
+ public static FluidStack getSteam(final int amount){
+ return FluidUtils.getFluidStack("steam", amount);
+ }
+
+ public static FluidStack getIC2Steam(final int amount){
+ return FluidUtils.getFluidStack("ic2steam", amount);
+ }
+
+ public static FluidStack getSuperHeatedSteam(final int amount){
+ return FluidUtils.getFluidStack("ic2superheatedsteam", amount);
+ }
+
+ @Deprecated
+ /**
+ * Do not use - Gives third tier steam - Not implemented
+ * @param amount
+ * @return
+ */
+ public static FluidStack getHyperSteam(final int amount){
+ return FluidUtils.getFluidStack("water", amount);
+ }
+
+ public static FluidStack getUUA(final int amount){
+ return FluidUtils.getFluidStack("uuamplifier", amount);
+ }
+
+ public static FluidStack getUUM(final int amount){
+ return FluidUtils.getFluidStack("ic2uumatter", amount);
+ }
+
public static FluidStack getFluidStack(final String fluidName, final int amount){
Logger.WARNING("Trying to get a fluid stack of "+fluidName);
try {
diff --git a/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java
index ae799baa2b..adeaf8c8ad 100644
--- a/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java
+++ b/src/Java/gtPlusPlus/core/util/minecraft/ItemUtils.java
@@ -15,6 +15,7 @@ import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
import gregtech.common.items.GT_MetaGenerated_Tool_01;
import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.api.objects.data.AutoMap;
import gtPlusPlus.api.objects.data.Pair;
import gtPlusPlus.api.objects.minecraft.BlockPos;
import gtPlusPlus.core.item.ModItems;
@@ -34,6 +35,8 @@ import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaTool;
import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools;
import gtPlusPlus.xmod.gregtech.loaders.RecipeGen_DustGeneration;
import net.minecraft.block.Block;
+import net.minecraft.enchantment.Enchantment;
+import net.minecraft.enchantment.EnchantmentData;
import net.minecraft.init.Items;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
@@ -479,20 +482,27 @@ public class ItemUtils {
return new BaseItemPlate_OLD(internalName, displayName, mFormula, rgb, radioactivity);
}
+
public static Item[] generateSpecialUseDusts(final Material material, final boolean onlyLargeDust) {
+ return generateSpecialUseDusts(material, onlyLargeDust, false);
+ }
+
+ public static Item[] generateSpecialUseDusts(final Material material, final boolean onlyLargeDust, final boolean disableExtraRecipes) {
final String materialName = material.getLocalizedName();
final String unlocalizedName = Utils.sanitizeString(materialName);
final int Colour = material.getRgbAsHex();
+ final String aChemForm = material.vChemicalFormula;
+ final boolean isChemFormvalid = (aChemForm != null && aChemForm.length() > 0);
Item[] output = null;
if (onlyLargeDust == false) {
- output = new Item[] { new BaseItemDustUnique("itemDust" + unlocalizedName, materialName, Colour, "Dust"),
- new BaseItemDustUnique("itemDustSmall" + unlocalizedName, materialName, Colour, "Small"),
- new BaseItemDustUnique("itemDustTiny" + unlocalizedName, materialName, Colour, "Tiny") };
+ output = new Item[] { new BaseItemDustUnique("itemDust" + unlocalizedName, materialName, isChemFormvalid ? aChemForm : "", Colour, "Dust"),
+ new BaseItemDustUnique("itemDustSmall" + unlocalizedName, materialName, isChemFormvalid ? aChemForm : "", Colour, "Small"),
+ new BaseItemDustUnique("itemDustTiny" + unlocalizedName, materialName, isChemFormvalid ? aChemForm : "", Colour, "Tiny") };
} else {
output = new Item[] { new BaseItemDustUnique("itemDust" + unlocalizedName, materialName, Colour, "Dust") };
}
- new RecipeGen_DustGeneration(material);
+ new RecipeGen_DustGeneration(material, disableExtraRecipes);
return output;
}
@@ -1179,4 +1189,35 @@ public class ItemUtils {
return false;
}
+ public static ItemStack[] cleanItemStackArray(ItemStack[] input) {
+ int aArraySize = input.length;
+ ItemStack[] aOutput = new ItemStack[aArraySize];
+ AutoMap<ItemStack> aCleanedItems = new AutoMap<ItemStack>();
+ for (ItemStack checkStack : input) {
+ if (ItemUtils.checkForInvalidItems(checkStack)) {
+ aCleanedItems.put(checkStack);
+ }
+ }
+ for (int i=0;i<aArraySize;i++) {
+ ItemStack aMappedStack = aCleanedItems.get(i);
+ if (aMappedStack != null){
+ aOutput[i] = aMappedStack;
+ }
+ }
+ return aOutput;
+ }
+
+ public static ItemStack getEnchantedBook(Enchantment aEnch, int aLevel) {
+ return enchantItem(new ItemStack(Items.enchanted_book), aEnch, aLevel);
+ }
+
+ public static ItemStack enchantItem(ItemStack aStack, Enchantment aEnch, int aLevel) {
+ Items.enchanted_book.addEnchantment(aStack, new EnchantmentData(aEnch, aLevel));
+ return aStack;
+ }
+
+ public static boolean doesOreDictHaveEntryFor(String string) {
+ return OreDictionary.doesOreNameExist(string);
+ }
+
}
diff --git a/src/Java/gtPlusPlus/core/util/minecraft/MaterialUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/MaterialUtils.java
index 743e4bedf1..364430b07d 100644
--- a/src/Java/gtPlusPlus/core/util/minecraft/MaterialUtils.java
+++ b/src/Java/gtPlusPlus/core/util/minecraft/MaterialUtils.java
@@ -15,6 +15,9 @@ import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.data.AutoMap;
import gtPlusPlus.api.objects.data.TypeCounter;
import gtPlusPlus.core.client.CustomTextureSet.TextureSets;
+import gtPlusPlus.core.item.base.BaseItemComponent;
+import gtPlusPlus.core.item.base.BaseItemComponent.ComponentTypes;
+import gtPlusPlus.core.item.base.plates.BaseItemPlateHeavy;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.material.Material;
import gtPlusPlus.core.material.MaterialStack;
@@ -23,6 +26,7 @@ import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.data.EnumUtils;
import gtPlusPlus.core.util.data.StringUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
@@ -439,6 +443,61 @@ public class MaterialUtils {
}
return resultList;
}
+
+ public static void generateComponentAndAssignToAMaterial(ComponentTypes aType, Material aMaterial) {
+ generateComponentAndAssignToAMaterial(aType, aMaterial, true);
+ }
+
+ public static void generateComponentAndAssignToAMaterial(ComponentTypes aType, Material aMaterial, boolean generateRecipes) {
+ Item aGC;
+ if (aType == ComponentTypes.PLATEHEAVY) {
+ aGC = new BaseItemPlateHeavy(aMaterial);
+ }
+ else {
+ aGC = new BaseItemComponent(aMaterial, aType);
+ }
+ if (aGC != null) {
+ String aFormattedLangName = aType.getName();
+
+ if (!aFormattedLangName.startsWith(" ")) {
+ if (aFormattedLangName.contains("@")) {
+ String[] aSplit = aFormattedLangName.split("@");
+ aFormattedLangName = aSplit[0] + " " + aMaterial.getLocalizedName() + " " + aSplit[1];
+ }
+ }
+
+ if (aFormattedLangName.equals(aType.getName())) {
+ aFormattedLangName = aMaterial.getLocalizedName() + aFormattedLangName;
+
+ }
+
+
+
+ Logger.MATERIALS("[Lang] "+aGC.getUnlocalizedName()+".name="+aFormattedLangName);
+ aMaterial.registerComponentForMaterial(aType, ItemUtils.getSimpleStack(aGC));
+ }
+ }
+
+
+
+
+
+
+
+
+ public static void generateSpecialDustAndAssignToAMaterial(Material aMaterial) {
+ generateSpecialDustAndAssignToAMaterial(aMaterial, true);
+ }
+
+ public static void generateSpecialDustAndAssignToAMaterial(Material aMaterial, boolean generateMixerRecipes) {
+ Item[] aDusts = ItemUtils.generateSpecialUseDusts(aMaterial, false, Utils.invertBoolean(generateMixerRecipes));
+ if (aDusts != null && aDusts.length > 0) {
+ aMaterial.registerComponentForMaterial(OrePrefixes.dust, ItemUtils.getSimpleStack(aDusts[0]));
+ aMaterial.registerComponentForMaterial(OrePrefixes.dustSmall, ItemUtils.getSimpleStack(aDusts[1]));
+ aMaterial.registerComponentForMaterial(OrePrefixes.dustTiny, ItemUtils.getSimpleStack(aDusts[2]));
+ }
+
+ }
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/core/util/minecraft/PlayerUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/PlayerUtils.java
index 7dd127203e..2fb7344a28 100644
--- a/src/Java/gtPlusPlus/core/util/minecraft/PlayerUtils.java
+++ b/src/Java/gtPlusPlus/core/util/minecraft/PlayerUtils.java
@@ -174,4 +174,8 @@ public class PlayerUtils {
return false;
}
+ public static void messageAllPlayers(String string) {
+ Utils.sendServerMessage(string);
+ }
+
}
diff --git a/src/Java/gtPlusPlus/core/util/minecraft/RecipeUtils.java b/src/Java/gtPlusPlus/core/util/minecraft/RecipeUtils.java
index 774c8b6f13..13bc0c9382 100644
--- a/src/Java/gtPlusPlus/core/util/minecraft/RecipeUtils.java
+++ b/src/Java/gtPlusPlus/core/util/minecraft/RecipeUtils.java
@@ -6,8 +6,11 @@ import java.util.List;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.Materials;
+import gregtech.api.interfaces.internal.IGT_CraftingRecipe;
import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
import gtPlusPlus.GTplusplus;
import gtPlusPlus.api.interfaces.RunnableWithInfo;
@@ -23,6 +26,7 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
+import net.minecraft.item.crafting.ShapelessRecipes;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
@@ -579,7 +583,53 @@ public static int mInvalidID = 1;
return aRecipeMap.mRecipeList.remove(aRecipeToRemove);
}
return false;
- }
+ }
+
+ public static boolean addGtRecipe(GT_Recipe aRecipeToAdd, GT_Recipe_Map aRecipeMap) {
+ if (!aRecipeMap.mRecipeList.contains(aRecipeToAdd)) {
+ return aRecipeMap.mRecipeList.add(aRecipeToAdd);
+ }
+ return false;
+ }
+
+ public static boolean removeRecipeByOutput(ItemStack aOutput) {
+ return removeRecipeByOutput(aOutput, true, false, false);
+ }
+
+ public static boolean removeRecipeByOutput(ItemStack aOutput, boolean aIgnoreNBT,
+ boolean aNotRemoveShapelessRecipes, boolean aOnlyRemoveNativeHandlers) {
+ if (aOutput == null) {
+ return false;
+ } else {
+ boolean rReturn = false;
+ ArrayList<IRecipe> tList = (ArrayList) CraftingManager.getInstance().getRecipeList();
+ aOutput = GT_OreDictUnificator.get(aOutput);
+ int tList_sS = tList.size();
+
+ for (int i = 0; i < tList_sS; ++i) {
+ IRecipe tRecipe = (IRecipe) tList.get(i);
+ if (!aNotRemoveShapelessRecipes
+ || !(tRecipe instanceof ShapelessRecipes) && !(tRecipe instanceof ShapelessOreRecipe)) {
+ if (aOnlyRemoveNativeHandlers) {
+ if (!gregtech.api.util.GT_ModHandler.sNativeRecipeClasses.contains(tRecipe.getClass().getName())) {
+ continue;
+ }
+ } else if (gregtech.api.util.GT_ModHandler.sSpecialRecipeClasses.contains(tRecipe.getClass().getName())) {
+ continue;
+ }
+
+ ItemStack tStack = tRecipe.getRecipeOutput();
+ if (GT_Utility.areStacksEqual(GT_OreDictUnificator.get(tStack), aOutput, aIgnoreNBT)) {
+ tList.remove(i--);
+ tList_sS = tList.size();
+ rReturn = true;
+ }
+ }
+ }
+
+ return rReturn;
+ }
+ }
diff --git a/src/Java/gtPlusPlus/core/util/reflect/AddGregtechRecipe.java b/src/Java/gtPlusPlus/core/util/reflect/AddGregtechRecipe.java
index fcb8c42197..0b22ea3acc 100644
--- a/src/Java/gtPlusPlus/core/util/reflect/AddGregtechRecipe.java
+++ b/src/Java/gtPlusPlus/core/util/reflect/AddGregtechRecipe.java
@@ -7,13 +7,72 @@ import net.minecraft.item.ItemStack;
import gregtech.api.enums.GT_Values;
import gregtech.api.interfaces.internal.IGT_RecipeAdder;
-
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import net.minecraftforge.fluids.FluidStack;
public final class AddGregtechRecipe {
+
+
+ public static boolean importPyroRecipe(GT_Recipe aRecipe) {
+
+ int aModifiedTime = (int) (aRecipe.mDuration * 0.8);
+
+ if (aRecipe.mInputs == null || aRecipe.mFluidInputs == null || aRecipe.mFluidOutputs == null || aRecipe.mOutputs == null) {
+ return false;
+ }
+
+ if (aRecipe.mInputs.length > 2 || aRecipe.mFluidInputs.length > 1 || aRecipe.mFluidOutputs.length > 1 || aRecipe.mOutputs.length > 1) {
+ return false;
+ }
+ else if (aRecipe.mInputs.length <= 0 || aRecipe.mFluidInputs.length <= 0 || aRecipe.mFluidOutputs.length <= 0 || aRecipe.mOutputs.length <= 0) {
+ return false;
+ }
+
+ int aCircuitNumber = -1;
+ int aItemSlot = -1;
+
+ int aSlot = 0;
+ for (ItemStack a : aRecipe.mInputs) {
+ if (a != null && a.getItem() != CI.getNumberedCircuit(1).getItem()) {
+ aItemSlot = aSlot;
+ }
+ else {
+ aSlot++;
+ }
+ }
+
+ for (int i=0;i<25;i++) {
+ ItemStack aTest = CI.getNumberedCircuit(i);
+ for (ItemStack a : aRecipe.mInputs) {
+ if (a != null && GT_Utility.areStacksEqual(a, aTest)) {
+ aCircuitNumber = i;
+ break;
+ }
+ }
+ }
+
+ if (aCircuitNumber < 0) {
+ return false;
+ }
+
+
+ return CORE.RA.addCokeOvenRecipe(
+ aRecipe.mInputs[aItemSlot],
+ ItemUtils.getGregtechCircuit(aCircuitNumber),
+ aRecipe.mFluidInputs[0],
+ aRecipe.mFluidOutputs[0],
+ aRecipe.mOutputs[0],
+ aModifiedTime,
+ aRecipe.mEUt);
+
+
+ }
+
public static boolean addCokeAndPyrolyseRecipes(
ItemStack input1, int circuitNumber,
diff --git a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java
index 722a4f3ff7..2371753fe6 100644
--- a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java
+++ b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java
@@ -3,10 +3,17 @@ package gtPlusPlus.core.util.reflect;
import java.io.IOException;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
+import java.lang.reflect.GenericDeclaration;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
+import java.util.HashMap;
import java.util.LinkedHashMap;
+import java.util.LinkedList;
+import java.util.List;
import java.util.Map;
import org.apache.commons.lang3.ArrayUtils;
@@ -133,8 +140,8 @@ public class ReflectionUtils {
public static Method getMethod(Object aObject, String aMethodName, Class[] aTypes) {
return getMethod(aObject.getClass(), aMethodName, aTypes);
}
-
-
+
+
/**
* Returns a cached {@link Method} object.
* @param aClass - Class containing the Method.
@@ -193,7 +200,7 @@ public class ReflectionUtils {
return y.get();
}
}
-
+
/**
* Returns a cached {@link Field} object.
* @param aInstance - {@link Object} to get the field instance from.
@@ -219,6 +226,20 @@ public class ReflectionUtils {
return isClassPresent(classname);
}
+
+ /**
+ * Returns the class of the objects type parameter
+ * @param o - Object to examine paramters on
+ * @return - a Class<?> or null
+ */
+ public static Class<?> getTypeOfGenericObject(Object o) {
+ Class<?> aTypeParam = findSuperClassParameterType(o, o.getClass(), 0);
+ if (aTypeParam == null) {
+ aTypeParam = findSubClassParameterType(o, o.getClass(), 0);
+ }
+ return aTypeParam;
+ }
+
public static void makeFieldAccessible(final Field field) {
if (!Modifier.isPublic(field.getModifiers()) ||
!Modifier.isPublic(field.getDeclaringClass().getModifiers()))
@@ -271,6 +292,7 @@ public class ReflectionUtils {
return loaded > 0;
}
+
public static boolean setField(final Object object, final String fieldName, final Object fieldValue) {
@@ -291,15 +313,42 @@ public class ReflectionUtils {
}
}
return false;
+
+
+ }
+
+ public static boolean setField(final Object object, final Field field, final Object fieldValue) {
+ Class<?> clazz = object.getClass();
+ while (clazz != null) {
+ try {
+ final Field field2 = getField(clazz, field.getName());
+ if (field2 != null) {
+ setFieldValue_Internal(object, field, fieldValue);
+ return true;
+ }
+ } catch (final NoSuchFieldException e) {
+ Logger.REFLECTION("setField("+object.toString()+", "+field.getName()+") failed.");
+ clazz = clazz.getSuperclass();
+ } catch (final Exception e) {
+ Logger.REFLECTION("setField("+object.toString()+", "+field.getName()+") failed.");
+ throw new IllegalStateException(e);
+ }
+ }
+ return false;
}
/**
* Allows to change the state of an immutable instance. Huh?!?
*/
- public static void setFinalFieldValue(Class<?> clazz, String fieldName, Object newValue) throws Exception {
+ public static void setFinalFieldValue(Class<?> clazz, String fieldName, Object newValue) {
Field nameField = getField(clazz, fieldName);
- setFieldValue_Internal(clazz, nameField, newValue);
+ try {
+ setFieldValue_Internal(clazz, nameField, newValue);
+ }
+ catch (Throwable t) {
+ t.printStackTrace();
+ }
}
@Deprecated
@@ -414,13 +463,27 @@ public class ReflectionUtils {
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /*
+ * Internal Magic that probably should not get exposed.
+ */
+
@@ -429,11 +492,126 @@ public class ReflectionUtils {
+ /*
+ *
+ * Below Code block is used for determining generic types associated with type<E>
+ *
+ */
+
+
+ //https://xebia.com/blog/acessing-generic-types-at-runtime-in-java/
+ //https://www.javacodegeeks.com/2013/12/advanced-java-generics-retreiving-generic-type-arguments.html
+ public static Class<?> findSuperClassParameterType(Object instance, Class<?> classOfInterest, int parameterIndex) {
+ Class<?> subClass = instance.getClass();
+ while (classOfInterest != subClass.getSuperclass()) {
+ // instance.getClass() is no subclass of classOfInterest or instance is a direct instance of classOfInterest
+ subClass = subClass.getSuperclass();
+ if (subClass == null) {
+ return null;
+ }
+ }
+ ParameterizedType parameterizedType = (ParameterizedType) subClass.getGenericSuperclass();
+ Class<?> aReturn;
+ aReturn = (Class<?>) parameterizedType.getActualTypeArguments()[parameterIndex];
+ return aReturn;
+ }
+
+ public static Class<?> findSubClassParameterType(Object instance, Class<?> classOfInterest, int parameterIndex) {
+ Map<Type, Type> typeMap = new HashMap<Type, Type>();
+ Class<?> instanceClass = instance.getClass();
+ while (classOfInterest != instanceClass.getSuperclass()) {
+ extractTypeArguments(typeMap, instanceClass);
+ instanceClass = instanceClass.getSuperclass();
+ if (instanceClass == null) {
+ return null;
+ }
+ }
+
+ ParameterizedType parameterizedType = (ParameterizedType) instanceClass.getGenericSuperclass();
+ Type actualType = parameterizedType.getActualTypeArguments()[parameterIndex];
+ if (typeMap.containsKey(actualType)) {
+ actualType = typeMap.get(actualType);
+ }
+ if (actualType instanceof Class) {
+ return (Class<?>) actualType;
+ } else if (actualType instanceof TypeVariable) {
+ return browseNestedTypes(instance, (TypeVariable<?>) actualType);
+ } else {
+ return null;
+ }
+ }
+
+ private static void extractTypeArguments(Map<Type, Type> typeMap, Class<?> clazz) {
+ Type genericSuperclass = clazz.getGenericSuperclass();
+ if (!(genericSuperclass instanceof ParameterizedType)) {
+ return;
+ }
+
+ ParameterizedType parameterizedType = (ParameterizedType) genericSuperclass;
+ Type[] typeParameter = ((Class<?>) parameterizedType.getRawType()).getTypeParameters();
+ Type[] actualTypeArgument = parameterizedType.getActualTypeArguments();
+ for (int i = 0; i < typeParameter.length; i++) {
+ if(typeMap.containsKey(actualTypeArgument[i])) {
+ actualTypeArgument[i] = typeMap.get(actualTypeArgument[i]);
+ }
+ typeMap.put(typeParameter[i], actualTypeArgument[i]);
+ }
+ }
+
+ private static Class<?> browseNestedTypes(Object instance, TypeVariable<?> actualType) {
+ Class<?> instanceClass = instance.getClass();
+ List<Class<?>> nestedOuterTypes = new LinkedList<Class<?>>();
+ for (Class<?> enclosingClass = instanceClass
+ .getEnclosingClass(); enclosingClass != null; enclosingClass = enclosingClass.getEnclosingClass()) {
+ try {
+ Field this$0 = instanceClass.getDeclaredField("this$0");
+ Object outerInstance = this$0.get(instance);
+ Class<?> outerClass = outerInstance.getClass();
+ nestedOuterTypes.add(outerClass);
+ Map<Type, Type> outerTypeMap = new HashMap<Type, Type>();
+ extractTypeArguments(outerTypeMap, outerClass);
+ for (Map.Entry<Type, Type> entry : outerTypeMap.entrySet()) {
+ if (!(entry.getKey() instanceof TypeVariable)) {
+ continue;
+ }
+ TypeVariable<?> foundType = (TypeVariable<?>) entry.getKey();
+ if (foundType.getName().equals(actualType.getName())
+ && isInnerClass(foundType.getGenericDeclaration(), actualType.getGenericDeclaration())) {
+ if (entry.getValue() instanceof Class) {
+ return (Class<?>) entry.getValue();
+ }
+ actualType = (TypeVariable<?>) entry.getValue();
+ }
+ }
+ } catch (NoSuchFieldException | IllegalAccessException e) {
+
+ }
+
+ }
+ return null;
+ }
+
+ private static boolean isInnerClass(GenericDeclaration outerDeclaration, GenericDeclaration innerDeclaration) {
+ if (!(outerDeclaration instanceof Class) || !(innerDeclaration instanceof Class)) {
+ return false;
+ }
+ Class<?> outerClass = (Class<?>) outerDeclaration;
+ Class<?> innerClass = (Class<?>) innerDeclaration;
+ while ((innerClass = innerClass.getEnclosingClass()) != null) {
+ if (innerClass == outerClass) {
+ return true;
+ }
+ }
+ return false;
+ }
/*
- * Internal Magic that probably should not get exposed.
- */
+ *
+ * End of Generics Block
+ *
+ */
+
private static Field getField_Internal(final Class<?> clazz, final String fieldName) throws NoSuchFieldException {
@@ -525,26 +703,26 @@ public class ReflectionUtils {
return getMethod_Internal(superClass, aMethodName);
}
}
-
+
private static void dumpClassInfo(Class aClass) {
Logger.INFO("We ran into an error processing reflection in "+aClass.getName()+", dumping all data for debugging.");
// Get the methods
- Method[] methods = aClass.getDeclaredMethods();
- Field[] fields = aClass.getDeclaredFields();
- Constructor[] consts = aClass.getDeclaredConstructors();
+ Method[] methods = aClass.getDeclaredMethods();
+ Field[] fields = aClass.getDeclaredFields();
+ Constructor[] consts = aClass.getDeclaredConstructors();
Logger.INFO("Dumping all Methods.");
- for (Method method : methods) {
- System.out.println(method.getName()+" | "+StringUtils.getDataStringFromArray(method.getParameterTypes()));
- }
+ for (Method method : methods) {
+ System.out.println(method.getName()+" | "+StringUtils.getDataStringFromArray(method.getParameterTypes()));
+ }
Logger.INFO("Dumping all Fields.");
- for (Field f : fields) {
- System.out.println(f.getName());
- }
+ for (Field f : fields) {
+ System.out.println(f.getName());
+ }
Logger.INFO("Dumping all Constructors.");
- for (Constructor c : consts) {
- System.out.println(c.getName()+" | "+c.getParameterCount()+" | "+StringUtils.getDataStringFromArray(c.getParameterTypes()));
- }
+ for (Constructor c : consts) {
+ System.out.println(c.getName()+" | "+c.getParameterCount()+" | "+StringUtils.getDataStringFromArray(c.getParameterTypes()));
+ }
}
private static Class<?> getNonPublicClass(final String className) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java b/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java
index 169683d251..7acd76882e 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/HANDLER_GT.java
@@ -1,5 +1,6 @@
package gtPlusPlus.xmod.gregtech;
+import static gtPlusPlus.core.recipe.common.CI.bits;
import static gtPlusPlus.core.util.minecraft.MaterialUtils.getMaterialName;
import java.util.ArrayList;
@@ -7,23 +8,30 @@ import java.util.Collection;
import java.util.List;
import cpw.mods.fml.common.event.FMLLoadCompleteEvent;
+import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
-import gregtech.api.interfaces.IToolStats;
+import gregtech.api.enums.OrePrefixes;
import gregtech.api.items.GT_MetaGenerated_Tool;
import gregtech.api.util.GT_Config;
+import gregtech.api.util.GT_ModHandler;
+import gregtech.api.util.GT_ModHandler.RecipeBits;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_Map;
-import gregtech.api.util.Recipe_GT;
+import gregtech.api.util.GT_Utility;
import gregtech.common.items.GT_MetaGenerated_Tool_01;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.api.objects.data.AutoMap;
+import gtPlusPlus.api.objects.data.Pair;
import gtPlusPlus.australia.gen.gt.WorldGen_GT_Australia;
import gtPlusPlus.core.handler.COMPAT_HANDLER;
import gtPlusPlus.core.handler.OldCircuitHandler;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.lib.CORE.ConfigSwitches;
+import gtPlusPlus.core.material.ELEMENT;
+import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.core.util.minecraft.MaterialUtils;
+import gtPlusPlus.core.util.minecraft.RecipeUtils;
+import gtPlusPlus.core.util.reflect.AddGregtechRecipe;
import gtPlusPlus.everglades.gen.gt.WorldGen_GT;
import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials;
import gtPlusPlus.xmod.gregtech.api.util.GTPP_Config;
@@ -31,7 +39,12 @@ import gtPlusPlus.xmod.gregtech.api.world.GTPP_Worldgen;
import gtPlusPlus.xmod.gregtech.common.StaticFields59;
import gtPlusPlus.xmod.gregtech.common.blocks.fluid.GregtechFluidHandler;
import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools;
-import gtPlusPlus.xmod.gregtech.loaders.*;
+import gtPlusPlus.xmod.gregtech.loaders.Gregtech_Blocks;
+import gtPlusPlus.xmod.gregtech.loaders.ProcessingAngelGrinder;
+import gtPlusPlus.xmod.gregtech.loaders.ProcessingElectricButcherKnife;
+import gtPlusPlus.xmod.gregtech.loaders.ProcessingElectricLighter;
+import gtPlusPlus.xmod.gregtech.loaders.ProcessingElectricSnips;
+import gtPlusPlus.xmod.gregtech.loaders.ProcessingToolHeadChoocher;
import gtPlusPlus.xmod.gregtech.recipes.RecipesToRemove;
import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechConduits;
import gtPlusPlus.xmod.gregtech.registration.gregtech.GregtechNitroDieselFix;
@@ -41,24 +54,24 @@ import net.minecraft.item.ItemStack;
public class HANDLER_GT {
public static GT_Config mMaterialProperties = null;
-
+
public static GTPP_Config sCustomWorldgenFile = null;
public static final List<WorldGen_GT> sWorldgenListEverglades = new ArrayList<WorldGen_GT>();
public static final List<WorldGen_GT_Australia> sWorldgenListAustralia = new ArrayList<WorldGen_GT_Australia>();
public static final List<GTPP_Worldgen> sCustomWorldgenList = new ArrayList<GTPP_Worldgen>();
public static void preInit(){
-
+
if (mMaterialProperties != null){
GT_Materials.init(mMaterialProperties);
}
-
+
if (ConfigSwitches.enableOldGTcircuits && !CORE.GTNH){
OldCircuitHandler.preInit();
}
-
+
GregtechFluidHandler.run();
-
+
}
public static void init(){
@@ -68,7 +81,7 @@ public class HANDLER_GT {
//Add Custom Pipes, Wires and Cables.
GregtechConduits.run();
-
+
//Register Tile Entities
COMPAT_HANDLER.registerGregtechMachines();
@@ -81,7 +94,7 @@ public class HANDLER_GT {
if (ConfigSwitches.enableOldGTcircuits && !CORE.GTNH){
OldCircuitHandler.init();
}
-
+
//Generates recipes for all gregtech smelting and alloy smelting combinations.
//RecipeGen_BlastSmelterGT.generateRecipes();
//new RecipeGen_BlastSmelterGT_Ex();
@@ -89,7 +102,7 @@ public class HANDLER_GT {
}
public static void postInit(){
-
+
//Only loads if the config option is true (default: true)
if (CORE.ConfigSwitches.enableSkookumChoochers){
new ProcessingToolHeadChoocher().run();
@@ -98,7 +111,7 @@ public class HANDLER_GT {
new ProcessingElectricSnips().run();
new ProcessingElectricButcherKnife().run();
new ProcessingElectricLighter().run();
-
+
if (CORE.ConfigSwitches.enableNitroFix){
GregtechNitroDieselFix.run();
}
@@ -106,18 +119,309 @@ public class HANDLER_GT {
if (ConfigSwitches.enableOldGTcircuits && !CORE.GTNH){
OldCircuitHandler.postInit();
}
-
-
+
+
//Register some custom recipe maps for any enabled multiblocks.
//MultiblockRecipeMapHandler.run();
}
-
+
public static void onLoadComplete(FMLLoadCompleteEvent event) {
removeCrudeTurbineRotors();
- cleanAssemblyLineRecipeMap();
+ cleanAssemblyLineRecipeMap();
+ if (ConfigSwitches.enableHarderRecipesForHighTierCasings) {
+ removeOldHighTierCasingRecipes();
+ }
RecipesToRemove.go();
+ convertPyroToCokeOven();
+ }
+
+ private static void convertPyroToCokeOven() {
+ int aCount = 0;
+ for (GT_Recipe g : GT_Recipe.GT_Recipe_Map.sPyrolyseRecipes.mRecipeList) {
+ if (AddGregtechRecipe.importPyroRecipe(g)) {
+ aCount++;
+ }
+ }
+ Logger.INFO("Converted "+aCount+" Pyrolyse recipes into Industrial Coke Oven recipes.");
+
+ }
+
+ private static GT_Recipe replaceItemInRecipeWithAnother(GT_Recipe aRecipe, ItemStack aExisting, ItemStack aNewItem) {
+ ItemStack[] aInputItemsCopy = aRecipe.mInputs;
+ String aOutputName = ItemUtils.getItemName(aRecipe.mOutputs[0]);
+ boolean aDidChange = false;
+ Logger.INFO("Attempting to Modify Recipe for "+aOutputName);
+ for (int i=0;i<aRecipe.mInputs.length;i++) {
+ ItemStack aCurrentInputSlot = aRecipe.mInputs[i];
+ if (aCurrentInputSlot != null) {
+ if (GT_Utility.areStacksEqual(aCurrentInputSlot, aExisting, true)) {
+ aInputItemsCopy[i] = ItemUtils.getSimpleStack(aNewItem, aCurrentInputSlot.stackSize);
+ aDidChange = true;
+ }
+ }
+ }
+ if (aDidChange) {
+ aRecipe.mInputs = aInputItemsCopy;
+ Logger.INFO("Modifed Recipe for "+aOutputName);
+ return aRecipe;
+ }
+ else {
+ Logger.INFO("Failed to Modify Recipe for "+aOutputName);
+ return aRecipe;
+ }
}
+ private static void updateRecipeMap(GT_Recipe aOld, GT_Recipe aNew, GT_Recipe_Map aMap) {
+ RecipeUtils.removeGtRecipe(aOld, aMap);
+ RecipeUtils.addGtRecipe(aNew, aMap);
+ Logger.INFO("Updating recipe map: "+aMap.mNEIName);
+ Logger.INFO("Removed Recipe with hash: "+aOld.hashCode());
+ Logger.INFO("Added Recipe with hash: "+aNew.hashCode());
+
+ }
+
+ private static void removeOldHighTierCasingRecipes() {
+
+ Logger.INFO("Trying to appropriately retier GT Machine Hulls/Casings from LuV+");
+ final Object aHardCasingsTest = StaticFields59.getFieldFromGregtechProxy("mHardMachineCasings");
+
+ boolean aHardCasings = aHardCasingsTest != null ? (boolean) aHardCasingsTest : false;
+
+ Logger.INFO("Are Hard casings/hulls enabled within GT? "+(aHardCasingsTest == null ? "Version does not support config option" : aHardCasings));
+
+ // Static objects to save memory
+ ItemStack aCasing_LUV = CI.machineCasing_LuV;
+ ItemStack aCasing_ZPM = CI.machineCasing_ZPM;
+ ItemStack aCasing_UV = CI.machineCasing_UV;
+ ItemStack aCasing_MAX = CI.machineCasing_MAX;
+
+ ItemStack aHull_LUV = CI.machineHull_LuV;
+ ItemStack aHull_ZPM = CI.machineHull_ZPM;
+ ItemStack aHull_UV = CI.machineHull_UV;
+ ItemStack aHull_MAX = CI.machineHull_MAX;
+
+ int aTier_LUV = 5;
+ int aTier_ZPM = 6;
+ int aTier_UV = 7;
+ //int aTier_MAX = 8;
+
+
+ ItemStack[] aCasings = new ItemStack[] {aCasing_LUV, aCasing_ZPM, aCasing_UV, aCasing_MAX};
+ ItemStack[] aHulls = new ItemStack[] {aHull_LUV, aHull_ZPM, aHull_UV, aHull_MAX};
+
+ // Remove Hand Crafting Recipes
+
+ // Casings
+ Logger.INFO("Removing shaped crafting for Casings.");
+ RecipeUtils.removeRecipeByOutput(aCasing_LUV);
+ RecipeUtils.removeRecipeByOutput(aCasing_ZPM);
+ RecipeUtils.removeRecipeByOutput(aCasing_UV);
+ //RecipeUtils.removeRecipeByOutput(aCasing_MAX);
+
+ // Hulls
+ Logger.INFO("Removing shaped crafting for Hulls.");
+ RecipeUtils.removeRecipeByOutput(aHull_LUV);
+ RecipeUtils.removeRecipeByOutput(aHull_ZPM);
+ RecipeUtils.removeRecipeByOutput(aHull_UV);
+ //RecipeUtils.removeRecipeByOutput(aHull_MAX);
+
+ // Modify Assembler Recipes
+ Logger.INFO("Attempting to modify existing Assembly recipes for Casings & Hulls, this should provide best compatibility.");
+ int aUpdateCount = 0;
+
+ AutoMap<Pair<GT_Recipe, GT_Recipe>> aDataToModify = new AutoMap<Pair<GT_Recipe, GT_Recipe>>();
+
+
+ Outer :for (final GT_Recipe r : GT_Recipe.GT_Recipe_Map.sAssemblerRecipes.mRecipeList) {
+
+ if (r != null && r.mOutputs != null && r.mOutputs.length > 0) {
+
+ GT_Recipe aOldRecipeCopy = r;
+ GT_Recipe aNewRecipe = r.copy();
+
+ //Casings
+ Inner : for (ItemStack aCasingObject : aCasings) {
+ if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aCasingObject)) {
+ String aOutputName = ItemUtils.getItemName(aOldRecipeCopy.mOutputs[0]);
+ Logger.INFO("Attempting to Modify Assembly Recipe for "+aOutputName);
+ //Replace Chrome
+ if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aCasing_LUV)) {
+ aNewRecipe = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateChrome", 1), ELEMENT.getInstance().SELENIUM.getPlate(1));
+ aDataToModify.put(new Pair<GT_Recipe, GT_Recipe>(r, aNewRecipe));
+ aUpdateCount++;
+ continue Outer;
+ }
+ //Replace Iridium
+ else if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aCasing_ZPM)) {
+ aNewRecipe = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateIridium", 1), CI.getPlate(aTier_ZPM, 1));
+ aDataToModify.put(new Pair<GT_Recipe, GT_Recipe>(r, aNewRecipe));
+ aUpdateCount++;
+ continue Outer;
+ }
+ //Replace Osmium
+ else if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aCasing_UV)) {
+ aNewRecipe = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateOsmium", 1), CI.getPlate(aTier_UV, 1));
+ aDataToModify.put(new Pair<GT_Recipe, GT_Recipe>(r, aNewRecipe));
+ aUpdateCount++;
+ continue Outer;
+ }
+ //else if (aOldRecipeCopy.mOutputs[0] == aCasing_LUV) {
+ // aOldRecipeCopy = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateChrome", 8), CI.getPlate(aTier_MAX, 8));
+ // updateRecipeMap(aOldRecipeCopy, aNewRecipe, GT_Recipe.GT_Recipe_Map.sAssemblerRecipes);
+ //}
+ else {
+ continue Inner;
+ }
+ }
+ }
+
+ //Hulls
+ Inner : for (ItemStack aHullObject : aHulls) {
+ if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aHullObject)) {
+ String aOutputName = ItemUtils.getItemName(aOldRecipeCopy.mOutputs[0]);
+ Logger.INFO("Attempting to Modify Assembly Recipe for "+aOutputName);
+ //Replace Chrome
+ if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aHull_LUV)) {
+ aNewRecipe = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateChrome", 1), ELEMENT.getInstance().SELENIUM.getPlate(1));
+ aDataToModify.put(new Pair<GT_Recipe, GT_Recipe>(r, aNewRecipe));
+ aUpdateCount++;
+ continue Outer;
+ }
+ //Replace Iridium
+ else if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aHull_ZPM)) {
+ aNewRecipe = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateIridium", 1), CI.getPlate(aTier_ZPM, 1));
+ aDataToModify.put(new Pair<GT_Recipe, GT_Recipe>(r, aNewRecipe));
+ aUpdateCount++;
+ continue Outer;
+ }
+ //Replace Osmium
+ else if (GT_Utility.areStacksEqual(aOldRecipeCopy.mOutputs[0], aHull_UV)) {
+ aNewRecipe = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateOsmium", 1), CI.getPlate(aTier_UV, 1));
+ aDataToModify.put(new Pair<GT_Recipe, GT_Recipe>(r, aNewRecipe));
+ aUpdateCount++;
+ continue Outer;
+ }
+ //else if (aOldRecipeCopy.mOutputs[0] == aHull_LUV) {
+ // aOldRecipeCopy = replaceItemInRecipeWithAnother(aOldRecipeCopy, ItemUtils.getItemStackOfAmountFromOreDict("plateChrome", 8), CI.getPlate(aTier_MAX, 8));
+ // updateRecipeMap(aOldRecipeCopy, aNewRecipe, GT_Recipe.GT_Recipe_Map.sAssemblerRecipes);
+ //}
+ else {
+ continue Inner;
+ }
+ }
+ }
+ }
+ }
+
+ Logger.INFO("There is "+aUpdateCount+" recipes flagged for update.");
+
+ if (aUpdateCount > 0) {
+ for (Pair<GT_Recipe, GT_Recipe> g : aDataToModify) {
+ updateRecipeMap(g.getKey(), g.getValue(), GT_Recipe.GT_Recipe_Map.sAssemblerRecipes);
+ }
+ Logger.INFO("Modified "+aUpdateCount+" recipes.");
+ }
+
+
+
+ Logger.INFO("Adding new Shaped recipes for Casings.");
+ GT_ModHandler.addCraftingRecipe(ItemList.Casing_LuV.get(1), bits, new Object[]{"PPP", "PwP", "PPP", 'P', ELEMENT.getInstance().SELENIUM.getPlate(1)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Casing_ZPM.get(1), bits, new Object[]{"PPP", "PwP", "PPP", 'P', CI.getPlate(aTier_ZPM, 1)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Casing_UV.get(1), bits, new Object[]{"PPP", "PwP", "PPP", 'P', CI.getPlate(aTier_UV, 1)});
+ //GT_ModHandler.addCraftingRecipe(ItemList.Casing_MAX.get(1), bits, new Object[]{"PPP", "PwP", "PPP", 'P', OrePrefixes.plate.get(Materials.Neutronium)});
+
+ if (!aHardCasings) {
+ Logger.INFO("Adding new easy Shaped recipes for Hulls.");
+ GT_ModHandler.addCraftingRecipe(ItemList.Hull_LuV.get(1),
+ RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, new Object[]{"CMC", 'M', ItemList.Casing_LuV, 'C',
+ OrePrefixes.cableGt01.get(Materials.VanadiumGallium)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Hull_ZPM.get(1),
+ RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED,
+ new Object[]{"CMC", 'M', ItemList.Casing_ZPM, 'C', OrePrefixes.cableGt01.get(Materials.Naquadah)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Hull_UV.get(1),
+ RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, new Object[]{"CMC", 'M', ItemList.Casing_UV, 'C',
+ OrePrefixes.wireGt04.get(Materials.NaquadahAlloy)});
+ /*GT_ModHandler.addCraftingRecipe(ItemList.Hull_MAX.get(1),
+ RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED, new Object[]{"CMC", 'M', ItemList.Casing_MAX, 'C',
+ OrePrefixes.wireGt01.get(Materials.Superconductor)});*/
+ }
+ else {
+ Logger.INFO("Adding new hard Shaped recipes for Hulls.");
+ GT_ModHandler.addCraftingRecipe(ItemList.Hull_LuV.get(1),
+ RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED,
+ new Object[]{"PHP", "CMC", 'M', ItemList.Casing_LuV, 'C',
+ OrePrefixes.cableGt01.get(Materials.VanadiumGallium), 'H',
+ ELEMENT.getInstance().SELENIUM.getPlate(1), 'P', OrePrefixes.plate.get(Materials.Plastic)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Hull_ZPM.get(1),
+ RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED,
+ new Object[]{"PHP", "CMC", 'M', ItemList.Casing_ZPM, 'C',
+ OrePrefixes.cableGt01.get(Materials.Naquadah), 'H',
+ CI.getPlate(aTier_ZPM, 1), 'P',
+ OrePrefixes.plate.get(Materials.Polytetrafluoroethylene)});
+ GT_ModHandler.addCraftingRecipe(ItemList.Hull_UV.get(1),
+ RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED,
+ new Object[]{"PHP", "CMC", 'M', ItemList.Casing_UV, 'C',
+ OrePrefixes.wireGt04.get(Materials.NaquadahAlloy), 'H',
+ CI.getPlate(aTier_UV, 1), 'P',
+ OrePrefixes.plate.get(Materials.Polytetrafluoroethylene)});
+ /*GT_ModHandler.addCraftingRecipe(ItemList.Hull_MAX.get(1),
+ RecipeBits.NOT_REMOVABLE | RecipeBits.BUFFERED,
+ new Object[]{"PHP", "CMC", 'M', ItemList.Casing_MAX, 'C',
+ OrePrefixes.wireGt01.get(Materials.Superconductor), 'H',
+ OrePrefixes.plate.get(Materials.Neutronium), 'P',
+ OrePrefixes.plate.get(Materials.Polytetrafluoroethylene)});*/
+ }
+
+
+
+ //Casings
+
+ /*GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Chrome, 8L),
+ ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]),
+ ItemList.Casing_LuV.get(1), 50, 16);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Iridium, 8L),
+ ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]),
+ ItemList.Casing_ZPM.get(1), 50, 16);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Osmium, 8L),
+ ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]),
+ ItemList.Casing_UV.get(1), 50, 16);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Neutronium, 8L),
+ ItemList.Circuit_Integrated.getWithDamage(0L, 8L, new Object[0]),
+ ItemList.Casing_MAX.get(1), 50, 16); */
+
+
+
+ //Hulls
+
+ //Hard Hulls
+ /*GT_Values.RA.addAssemblerRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.VanadiumGallium, 2L),
+ ItemList.Casing_LuV.get(1), Materials.Plastic.getMolten(288L),
+ ItemList.Hull_LuV.get(1), 50, 16);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Naquadah, 2L),
+ ItemList.Casing_ZPM.get(1), Materials.Polytetrafluoroethylene.getMolten(288L),
+ ItemList.Hull_ZPM.get(1), 50, 16);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 2L),
+ ItemList.Casing_UV.get(1), Materials.Polytetrafluoroethylene.getMolten(288L),
+ ItemList.Hull_UV.get(1), 50, 16);
+ GT_Values.RA.addAssemblerRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 2L),
+ ItemList.Casing_MAX.get(1), Materials.Polytetrafluoroethylene.getMolten(288L),
+ ItemList.Hull_MAX.get(1), 50, 16);*/
+
+ //Easy Hulls
+ /*GT_Values.RA.addAssemblerRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.VanadiumGallium, 2L),
+ ItemList.Casing_LuV.get(1), ItemList.Hull_LuV.get(1), 50, 16);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.cableGt01, Materials.Naquadah, 2L),
+ ItemList.Casing_ZPM.get(1), ItemList.Hull_ZPM.get(1), 50, 16);
+ GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.wireGt04, Materials.NaquadahAlloy, 2L),
+ ItemList.Casing_UV.get(1), ItemList.Hull_UV.get(1), 50, 16);
+ GT_Values.RA.addAssemblerRecipe(
+ GT_OreDictUnificator.get(OrePrefixes.wireGt01, Materials.Superconductor, 2L),
+ ItemList.Casing_MAX.get(1), ItemList.Hull_MAX.get(1), 50, 16);*/
+ }
+
private static int removeCrudeTurbineRotors() {
int aRemoved = 0;
int CUT = CORE.turbineCutoffBase;
@@ -156,7 +460,7 @@ public class HANDLER_GT {
else {
break outputs;
}
-
+
}
else {
continue outputs;
@@ -172,12 +476,12 @@ public class HANDLER_GT {
}
}
}
-
+
Logger.INFO("Removed "+aRemoved+" useless Turbines.");
-
+
return aRemoved;
}
-
+
/**
* Should clean out any invalid Assembly Line recipes, if the map actually exists.
* Prevents NPE's being thrown by GT's AL handler. (Fucking Annoying)
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
index 68fe121081..933ec227ba 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/enums/GregtechItemList.java
@@ -313,6 +313,10 @@ public enum GregtechItemList implements GregtechItemContainer {
//Larger Turbines
Large_Steam_Turbine, Large_HPSteam_Turbine,
Casing_Turbine_Shaft, Casing_Turbine_LP, Casing_Turbine_HP,
+
+ //Large Vacuum Furnace
+ Casing_Vacuum_Furnace,
+ Controller_Vacuum_Furnace,
@@ -427,6 +431,7 @@ public enum GregtechItemList implements GregtechItemContainer {
//Debug machine
Pollution_Creator,
+ Garbage_Collector_Debug_Machine,
//Basically is an automatic Cauldron
@@ -582,9 +587,14 @@ public enum GregtechItemList implements GregtechItemContainer {
*/
//Fluid Void Covers
- Cover_Overflow_ULV, Cover_Overflow_LV, Cover_Overflow_MV, Cover_Overflow_HV, Cover_Overflow_EV, Cover_Overflow_IV,
-
+ Cover_Overflow_ULV, Cover_Overflow_LV, Cover_Overflow_MV, Cover_Overflow_HV, Cover_Overflow_EV, Cover_Overflow_IV,
+ //Fake Hull Covers
+ FakeMachineCasingPlate_ULV, FakeMachineCasingPlate_LV,
+ FakeMachineCasingPlate_MV, FakeMachineCasingPlate_HV,
+ FakeMachineCasingPlate_EV, FakeMachineCasingPlate_IV,
+ FakeMachineCasingPlate_LuV, FakeMachineCasingPlate_ZPM,
+ FakeMachineCasingPlate_UV, FakeMachineCasingPlate_MAX,
//----------------------------------------------------------------------------
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java
new file mode 100644
index 0000000000..721fe053ae
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_Hatch_Muffler_Advanced.java
@@ -0,0 +1,51 @@
+package gtPlusPlus.xmod.gregtech.api.gui;
+
+import gregtech.api.gui.GT_ContainerMetaTile_Machine;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gtPlusPlus.core.slots.SlotAirFilter;
+import net.minecraft.entity.player.InventoryPlayer;
+
+
+public class CONTAINER_Hatch_Muffler_Advanced extends GT_ContainerMetaTile_Machine {
+
+ public long maxEU = 0;
+ public long storedEU = 0;
+
+ public CONTAINER_Hatch_Muffler_Advanced(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity) {
+ super(aInventoryPlayer, aTileEntity);
+ }
+
+ public CONTAINER_Hatch_Muffler_Advanced(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final boolean bindInventory) {
+ super(aInventoryPlayer, aTileEntity, bindInventory);
+ }
+
+ @Override
+ public void addSlots(final InventoryPlayer aInventoryPlayer) {
+ this.addSlotToContainer(new SlotAirFilter(this.mTileEntity, 1, 80, 35));
+ }
+
+ @Override
+ public int getSlotCount() {
+ return 1;
+ }
+
+ @Override
+ public int getShiftClickSlotCount() {
+ return 1;
+ }
+
+ @Override
+ public void updateProgressBar(final int id, final int value) {
+ super.updateProgressBar(id, value);
+ switch (id) {
+ default:
+ break;
+ }
+ }
+
+ @Override
+ public void detectAndSendChanges() {
+ super.detectAndSendChanges();
+ }
+
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java
index 503b36e157..dcab57c380 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/CONTAINER_SuperChest.java
@@ -4,21 +4,16 @@ import java.util.Iterator;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
import gregtech.api.gui.GT_ContainerMetaTile_Machine;
import gregtech.api.gui.GT_Slot_Output;
import gregtech.api.gui.GT_Slot_Render;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-
import gtPlusPlus.core.slots.SlotLockedInput;
-import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.common.tileentities.storage.GT_MetaTileEntity_TieredChest;
import gtPlusPlus.xmod.gregtech.common.tileentities.storage.shelving.GT4Entity_Shelf_Large;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.ICrafting;
+import net.minecraft.item.ItemStack;
public class CONTAINER_SuperChest extends GT_ContainerMetaTile_Machine {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java
new file mode 100644
index 0000000000..4b998f6487
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/api/gui/GUI_Hatch_Muffler_Advanced.java
@@ -0,0 +1,46 @@
+package gtPlusPlus.xmod.gregtech.api.gui;
+
+
+import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import gtPlusPlus.core.lib.CORE;
+import net.minecraft.entity.player.InventoryPlayer;
+
+public class GUI_Hatch_Muffler_Advanced extends GT_GUIContainerMetaTile_Machine {
+
+ String mName = "";
+ long maxPower = 0;
+ long storedPower = 0;
+
+ public GUI_Hatch_Muffler_Advanced(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity, final String aName, final String aTextureFile) {
+ super(new CONTAINER_Hatch_Muffler_Advanced(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + (aTextureFile == null ? "MultiblockDisplay" : aTextureFile));
+ this.mName = aName;
+ }
+
+ @Override
+ protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
+ this.fontRendererObj.drawString(this.mName, 8, 8, 16448255);
+ /*
+ * ReflectionUtils.setField(this.fontRendererObj, "underlineStyle", true);
+ * ReflectionUtils.setField(this.fontRendererObj, "italicStyle", true);
+ * ReflectionUtils.setField(this.fontRendererObj, "boldStyle", true); boolean
+ * isBold = ReflectionUtils.getField(this.fontRendererObj, "boldStyle");
+ * this.fontRendererObj.drawString("Insert Air Filters - Bold: "+isBold, 8, 18,
+ * 16448255);
+ */
+ if (this.mContainer != null) {
+ //this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU;
+ //this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU;
+ }
+ }
+
+ @Override
+ protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
+ super.drawGuiContainerBackgroundLayer(par1, par2, par3);
+ //this.maxPower = ((CONTAINER_TreeFarmer)this.mContainer).maxEU;
+ //this.storedPower = ((CONTAINER_TreeFarmer)this.mContainer).storedEU;
+ final int x = (this.width - this.xSize) / 2;
+ final int y = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
+ }
+}
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 721facd8d0..e4a15d34ea 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
@@ -117,7 +117,7 @@ public interface IGregtech_RecipeAdder {
* @param aEUt = EU per tick needed for heating up (must be >= 0)
* @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);
+ public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt);
public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, int aChance, int aDuration, int aEUt, int aSpecialValue);
@@ -134,7 +134,7 @@ public interface IGregtech_RecipeAdder {
* @param aSpecialValue = Stores the Required Temp for the Recipe
* @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);
+ public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack, int[] aChance, int aDuration, int aEUt, int aSpecialValue);
public boolean addLFTRRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aOutput1, int aDuration, int aEUt);
@@ -252,4 +252,9 @@ public interface IGregtech_RecipeAdder {
* @param aSpecial = EU needed for heating the Reactor up (must be >= 0)
*/
public boolean addFusionReactorRecipe(ItemStack aInputStackA, ItemStack aInputStackB, FluidStack plasma, int aOutputChance, int aFusionDurationInTicks, int aEu, int aSpecial);
+
+
+ boolean addVacuumFurnaceRecipe(ItemStack aInput1, ItemStack aInput2,
+ FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1,
+ ItemStack aOutput2, int aDuration, int aEUt, int aLevel);
}
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 2832941bdd..5fa1fc8aba 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
@@ -1,11 +1,19 @@
package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations;
+import gregtech.api.enums.GT_Values;
+import gregtech.api.interfaces.ITexture;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Muffler;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_Config;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.item.general.ItemAirFilter;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.minecraft.gregtech.PollutionUtils;
+import gtPlusPlus.core.util.reflect.ReflectionUtils;
+import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_Hatch_Muffler_Advanced;
+import gtPlusPlus.xmod.gregtech.api.gui.GUI_Hatch_Muffler_Advanced;
import gtPlusPlus.xmod.gregtech.common.StaticFields59;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.entity.player.EntityPlayer;
@@ -13,11 +21,11 @@ import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
-import gregtech.api.interfaces.ITexture;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch_Muffler {
+ protected int SLOT_FILTER = 0;
+
@Override
public void onConfigLoad(GT_Config aConfig) {
super.onConfigLoad(aConfig);
@@ -38,27 +46,30 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch
public GT_MetaTileEntity_Hatch_Muffler_Adv(int aID, String aName, String aNameRegional, int aTier) {
super(aID, aName, aNameRegional, aTier);
+ ReflectionUtils.setField(this, "mInventory", new ItemStack[1]);
}
public GT_MetaTileEntity_Hatch_Muffler_Adv(String aName, int aTier, String aDescription, ITexture[][][] aTextures) {
super(aName, aTier, aDescription, aTextures);
+ ReflectionUtils.setField(this, "mInventory", new ItemStack[1]);
}
public GT_MetaTileEntity_Hatch_Muffler_Adv(String aName, int aTier, String[] aDescription, ITexture[][][] aTextures) {
super(aName, aTier, aDescription[0], aTextures);
+ ReflectionUtils.setField(this, "mInventory", new ItemStack[1]);
}
public String[] getDescription() {
- if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
-
- String[] mDescArray = StaticFields59.getDescriptionArray(this);
-
- String[] desc = new String[mDescArray.length + 4];
+ if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
+ String[] mDescArray = StaticFields59.getDescriptionArray(this);
+ String[] desc = new String[mDescArray.length + 6];
System.arraycopy(mDescArray, 0, desc, 0, mDescArray.length);
desc[mDescArray.length] = "DO NOT OBSTRUCT THE OUTPUT!";
- desc[mDescArray.length + 1] = "Requires extra Air on the exhaust face";
- desc[mDescArray.length + 2] = "Reduces Pollution to " + this.calculatePollutionReduction(100) + "%";
- desc[mDescArray.length + 3] = "Recovers " + (105 - this.calculatePollutionReduction(100))
+ 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";
return desc;
}
@@ -76,7 +87,7 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch
}
public boolean isValidSlot(int aIndex) {
- return false;
+ return aIndex == SLOT_FILTER;
}
public MetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
@@ -88,24 +99,33 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch
EntityPlayer aPlayer) {
if (aBaseMetaTileEntity.isClientSide())
return true;
- //aBaseMetaTileEntity.openGUI(aPlayer);
+ aBaseMetaTileEntity.openGUI(aPlayer);
return true;
}
- @Override
- public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory,
- IGregTechTileEntity aBaseMetaTileEntity) {
- return null;
+
+
+ public Object getServerGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ return new CONTAINER_Hatch_Muffler_Advanced(aPlayerInventory, aBaseMetaTileEntity);
}
- @Override
- public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory,
- IGregTechTileEntity aBaseMetaTileEntity) {
- return null;
+ public Object getClientGUI(int aID, InventoryPlayer aPlayerInventory, IGregTechTileEntity aBaseMetaTileEntity) {
+ return new GUI_Hatch_Muffler_Advanced(aPlayerInventory, aBaseMetaTileEntity, "Advanced Muffler", "machine_Charger.png");
+ }
+
+ private boolean airCheck() {
+ if (
+ this.getBaseMetaTileEntity().getAirAtSide(this.getBaseMetaTileEntity().getFrontFacing()) &&
+ this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getFrontFacing(), 1) &&
+ this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getFrontFacing(), 2)
+ ) {
+ return true;
+ }
+ return false;
}
public boolean polluteEnvironment() {
- if (this.getBaseMetaTileEntity().getAirAtSide(this.getBaseMetaTileEntity().getFrontFacing()) && this.getBaseMetaTileEntity().getAirAtSideAndDistance(this.getBaseMetaTileEntity().getFrontFacing(), 1)) {
+ if (airCheck() && damageAirFilter()) {
int aEmission = this.calculatePollutionReduction(10000);
PollutionUtils.addPollution(this.getBaseMetaTileEntity(), aEmission);
//Logger.INFO("Outputting "+aEmission+"gbl");
@@ -116,30 +136,134 @@ public class GT_MetaTileEntity_Hatch_Muffler_Adv extends GT_MetaTileEntity_Hatch
}
}
+
+ public int calculatePollutionReductionForTooltip(int aPollution) {
+ return (int) (aPollution * Math.pow(0.64D, (double) (this.mTier - 1)));
+ }
+
public int calculatePollutionReduction(int aPollution) {
- return (int) ((double) aPollution * Math.pow(0.64D, (double) (this.mTier - 1)));
+ double aVal1 = aPollution * Math.pow(0.64D, (double) (this.mTier - 1));
+ int aVal2 = (int) aVal1;
+ if (!hasValidFilter()) {
+ aVal2 = (int) ((double) aPollution * Math.pow(0.7D, (double) (this.mTier - 1)));;
+ }
+ return aVal2;
}
public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) {
- return true;
+ if (aIndex == this.SLOT_FILTER) {
+ if (isAirFilter(aStack)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private ItemStack getInventoryStack() {
+ if (this.mInventory != null && this.mInventory.length > 0) {
+ if (this.mInventory.length-1 >= this.SLOT_FILTER) {
+ return this.mInventory[this.SLOT_FILTER];
+ }
+ }
+ return null;
+ }
+
+ private void breakAirFilter() {
+ if (this.mInventory != null && this.mInventory.length > 0) {
+ if (this.mInventory.length-1 >= this.SLOT_FILTER) {
+ Logger.INFO("Breaking Filter");
+ this.mInventory[this.SLOT_FILTER] = null;
+ }
+ }
}
public boolean hasValidFilter() {
- return false;
+ return isAirFilter(getInventoryStack());
}
- public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+ public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
+
+ //Logger.INFO("A1");
+
super.onPostTick(aBaseMetaTileEntity, aTick);
- String aParticleName;
- if (hasValidFilter()) {
- aParticleName = "cloud";
- } else {
- aParticleName = "smoke";
+
+ //Logger.INFO("A2");
+
+ String aParticleName;
+ if ((aTick % 2) == 0){
+ aParticleName = "cloud";
}
- if (aBaseMetaTileEntity.isClientSide() && this.getBaseMetaTileEntity().isActive()) {
- this.pollutionParticles(this.getBaseMetaTileEntity().getWorld(), aParticleName);
+ else {
+ aParticleName = "smoke";
+ }
+
+ //Logger.INFO("A3");
+
+ if (aBaseMetaTileEntity.isClientSide()) {
+ //Logger.INFO("B1");
+ if (this.getBaseMetaTileEntity().isActive()) {
+ //Logger.INFO("C1");
+ this.pollutionParticles(this.getBaseMetaTileEntity().getWorld(), aParticleName);
+ }
+ //return;
+ }
+ else {
+ //Logger.INFO("B2");
+ if (this.getInventoryStack() == null) {
+ //Logger.INFO("D1");
+ //Logger.INFO("Empty - "+this.mInventory.length);
+ }
+ else {
+ //Logger.INFO("D2");
+ Logger.INFO("Has Item");
+ }
}
+ //Logger.INFO("A4");
+
+
+
+ }
+
+ public boolean isAirFilter(ItemStack filter){
+ if (filter == null) {
+ return false;
+ }
+ if (filter.getItem() instanceof ItemAirFilter){
+
+ if (this.mTier < 5) {
+ return true;
+ }
+ else {
+ if (filter.getItemDamage() == 1) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ public boolean damageAirFilter(){
+ ItemStack filter = getInventoryStack();
+ if (filter == null) {
+ return false;
+ }
+
+ if (isAirFilter(filter)){
+ long currentUse = ItemAirFilter.getFilterDamage(filter);
+ Logger.INFO("Filter Damage: "+currentUse);
+ //Remove broken Filter
+ if ((filter.getItemDamage() == 0 && currentUse >= 50-1) || (filter.getItemDamage() == 1 && currentUse >= 2500-1)){
+ breakAirFilter();
+ return false;
+ }
+ else {
+ //Do Damage
+ ItemAirFilter.setFilterDamage(filter, currentUse+1);
+ Logger.INFO("Filter Damage now: "+currentUse);
+ return true;
+ }
+ }
+ return false;
}
public void pollutionParticles(World aWorld, String name) {
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 bed80d8d13..b395bbbabe 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
@@ -8,7 +8,6 @@ import gregtech.api.enums.Textures.BlockIcons;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Input;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Output;
import gregtech.api.util.GT_Utility;
import gtPlusPlus.api.objects.data.AutoMap;
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 e352712138..0e1ef0e47e 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
@@ -1,10 +1,10 @@
package gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base;
-import static gtPlusPlus.core.lib.CORE.ConfigSwitches.requireControlCores;
import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
@@ -48,6 +48,7 @@ import gtPlusPlus.core.lib.CORE;
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.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.api.gui.CONTAINER_MultiMachine;
import gtPlusPlus.xmod.gregtech.api.gui.GUI_MultiMachine;
@@ -539,26 +540,149 @@ GT_MetaTileEntity_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.
+ *
+ *
+ * if (this.doesMachineBoostOutput()) { log("Boosting."); return
+ * checkRecipeBoostedOutputs(aItemInputs, aFluidInputs, aMaxParallelRecipes,
+ * aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, aRecipe); }
+ *
+ *
+ * //Control Core to control the Multiblocks behaviour. int aControlCoreTier =
+ * getControlCoreTier();
+ *
+ * //If no core, return false; if (aControlCoreTier > 0) {
+ * log("Control core found."); }
+ *
+ *
+ * // 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)); log("Running checkRecipeGeneric(0)");
+ *
+ * //Check to see if Voltage Tier > Control Core Tier if (tTier >
+ * aControlCoreTier) {
+ * log("Control core found is lower tier than power tier. OK"); tTier = (byte)
+ * aControlCoreTier; }
+ *
+ * tTier = (byte) MathUtils.getValueWithinRange(tTier, 0, 9);
+ *
+ * GT_Recipe tRecipe = aRecipe != null ? aRecipe : 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 (!this.canBufferOutputs(tRecipe, aMaxParallelRecipes)) {
+ * log("BAD RETURN - 2"); return false; }
+ *
+ * // EU discount float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f; float
+ * tTotalEUt = 0.0f;
+ *
+ * int parallelRecipes = 0;
+ *
+ * log("parallelRecipes: "+parallelRecipes);
+ * log("aMaxParallelRecipes: "+aMaxParallelRecipes);
+ * log("tTotalEUt: "+tTotalEUt); log("tVoltage: "+tVoltage);
+ * log("tRecipeEUt: "+tRecipeEUt); Logger.INFO("EU1: "+tRecipeEUt); // Count
+ * recipes to do in parallel, consuming input items and fluids and considering
+ * input voltage limits for (; parallelRecipes < aMaxParallelRecipes &&
+ * tTotalEUt < (tVoltage - tRecipeEUt); parallelRecipes++) { if
+ * (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) {
+ * log("Broke at "+parallelRecipes+"."); break; }
+ * log("Bumped EU from "+tTotalEUt+" to "+(tTotalEUt+tRecipeEUt)+"."); tTotalEUt
+ * += tRecipeEUt; Logger.INFO("EU2: "+tTotalEUt); }
+ *
+ * if (parallelRecipes == 0) { log("BAD RETURN - 3"); return false; }
+ *
+ * Logger.INFO("EU3: "+tTotalEUt);
+ *
+ * // -- 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 * 10000);
+ *
+ * int aTempEu = (int) Math.floor(tTotalEUt); Logger.INFO("EU4: "+aTempEu);
+ * this.mEUt = (int) aTempEu;
+ *
+ *
+ * this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ * this.mEfficiencyIncrease = 10000;
+ *
+ * // 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; } }
+ *
+ * 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; } }
+ *
+ * // 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;
+ * } }
+ *
+ * // 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; } } }
+ *
+ * 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 (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()]);
+ *
+ * // Commit outputs this.mOutputItems = tOutputItems; this.mOutputFluids =
+ * tOutputFluids; updateSlots();
+ *
+ * // Play sounds (GT++ addition - GT multiblocks play no sounds)
+ * startProcess();
+ *
+ * log("GOOD RETURN - 1"); return true; }
+ */
+
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.
-
-
- if (this.doesMachineBoostOutput()) {
- log("Boosting.");
- return checkRecipeBoostedOutputs(aItemInputs, aFluidInputs, aMaxParallelRecipes, aEUPercent, aSpeedBonusPercent, aOutputChanceRoll, aRecipe);
- }
-
-
- //Control Core to control the Multiblocks behaviour.
- int aControlCoreTier = getControlCoreTier();
-
- //If no core, return false;
- if (aControlCoreTier > 0) {
- log("Control core found.");
- }
+ // Based on the Processing Array. A bit overkill, but very flexible.
// Reset outputs and progress stats
@@ -571,15 +695,8 @@ GT_MetaTileEntity_MultiBlockBase {
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
log("Running checkRecipeGeneric(0)");
- //Check to see if Voltage Tier > Control Core Tier
- if (tTier > aControlCoreTier) {
- log("Control core found is lower tier than power tier. OK");
- tTier = (byte) aControlCoreTier;
- }
- tTier = (byte) MathUtils.getValueWithinRange(tTier, 0, 9);
-
- GT_Recipe tRecipe = aRecipe != null ? aRecipe : findRecipe(
+ GT_Recipe tRecipe = findRecipe(
getBaseMetaTileEntity(), mLastRecipe, false,
gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs);
@@ -635,7 +752,7 @@ GT_MetaTileEntity_MultiBlockBase {
this.mEUt = (int)Math.ceil(tTotalEUt);
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
- this.mEfficiencyIncrease = 10000;
+ this.mEfficiencyIncrease = 10000;
// Overclock
if (this.mEUt <= 16) {
@@ -718,8 +835,7 @@ GT_MetaTileEntity_MultiBlockBase {
log("GOOD RETURN - 1");
return true;
- }
-
+}
@@ -1136,6 +1252,47 @@ GT_MetaTileEntity_MultiBlockBase {
ItemStack guiSlot = this.mInventory[1];
return guiSlot;
}
+
+ protected boolean setGUIItemStack(ItemStack aNewGuiSlotContents) {
+ boolean result = false;
+ if (this.mInventory[1] == null) {
+ this.mInventory[1] = aNewGuiSlotContents != null ? aNewGuiSlotContents.copy() : null;
+ aNewGuiSlotContents = null;
+ this.updateSlots();
+ result = true;
+ }
+ return result;
+ }
+
+ protected boolean clearGUIItemSlot() {
+ return setGUIItemStack(null);
+ }
+
+
+ public ItemStack findItemInInventory(Item aSearchStack) {
+ return findItemInInventory(aSearchStack, 0);
+ }
+
+ public ItemStack findItemInInventory(Item aSearchStack, int aMeta) {
+ return findItemInInventory(ItemUtils.simpleMetaStack(aSearchStack, aMeta, 1));
+ }
+
+ public ItemStack findItemInInventory(ItemStack aSearchStack) {
+ if (aSearchStack != null && this.mInputBusses.size() > 0) {
+ for (GT_MetaTileEntity_Hatch_InputBus bus : this.mInputBusses) {
+ if (bus != null) {
+ for (ItemStack uStack : bus.mInventory) {
+ if (uStack != null) {
+ if (aSearchStack.getClass().isInstance(uStack.getItem())) {
+ return uStack;
+ }
+ }
+ }
+ }
+ }
+ }
+ return null;
+ }
@Override
public void updateSlots() {
@@ -1208,6 +1365,14 @@ GT_MetaTileEntity_MultiBlockBase {
if (aTileEntity == null) {
return false;
}
+
+ //Check type
+ /*
+ * Class <?> aHatchType = ReflectionUtils.getTypeOfGenericObject(aList); if
+ * (!aHatchType.isInstance(aTileEntity)) { return false; }
+ */
+
+
if (aList.isEmpty()) {
if (aTileEntity instanceof GT_MetaTileEntity_Hatch) {
if (GTplusplus.CURRENT_LOAD_PHASE == INIT_PHASE.STARTED) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java b/src/Java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java
index 99563b60ef..9c552db3ad 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/StaticFields59.java
@@ -219,6 +219,57 @@ public class StaticFields59 {
}
return null;
}
+
+ public static int getHeatingCapacityForCoil(Block aBlock, int aMeta) {
+ if (aBlock == GregTech_API.sBlockCasings1 && (aMeta >= 12 && aMeta <= 14)) {
+ return getHeatingCapacityForCoilTier(aMeta == 12 ? 1 : aMeta == 13 ? 2 : 3);
+ }
+ else if (aBlock == getBlockCasings5() && (aMeta >= 0 && aMeta <= 8)) {
+ return getHeatingCapacityForCoilTier(aMeta);
+ }
+ return 0;
+ }
+
+ public static int getHeatingCapacityForCoilTier(int aCoilTier) {
+ int mHeatingCapacity = 0;
+ switch (aCoilTier) {
+ case 0:
+ mHeatingCapacity = 1800;
+ break;
+ case 1:
+ mHeatingCapacity = 2700;
+ break;
+ case 2:
+ mHeatingCapacity = 3600;
+ break;
+ case 3:
+ mHeatingCapacity = 4500;
+ break;
+ case 4:
+ mHeatingCapacity = 5400;
+ break;
+ case 5:
+ mHeatingCapacity = 7200;
+ break;
+ case 6:
+ mHeatingCapacity = 9000;
+ break;
+ case 7:
+ mHeatingCapacity = 9900;
+ break;
+ case 8:
+ mHeatingCapacity = 10800;
+ break;
+ default:
+ Logger.INFO("Heating Coils are bad.");
+ mHeatingCapacity = 0;
+ }
+ if (CORE.GTNH && aCoilTier <= 6) {
+ mHeatingCapacity += 1;
+ }
+
+ return mHeatingCapacity;
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java
index 54323d8c2e..5116632cf1 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/GregtechMetaCasingBlocks4.java
@@ -34,7 +34,7 @@ extends GregtechMetaCasingBlocksAbstract {
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".7.name", "Turbine Shaft");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".8.name", "Low Pressure Turbine Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".9.name", "High Pressure Turbine Casing");
- GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "");
+ GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".10.name", "Vacuum Casing");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".11.name", "");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".12.name", "");
GT_LanguageManager.addStringLocalization(this.getUnlocalizedName() + ".13.name", "");
@@ -50,8 +50,8 @@ extends GregtechMetaCasingBlocksAbstract {
GregtechItemList.Casing_Turbine_Shaft.set(new ItemStack(this, 1, 7));
GregtechItemList.Casing_Turbine_LP.set(new ItemStack(this, 1, 8));
GregtechItemList.Casing_Turbine_HP.set(new ItemStack(this, 1, 9));
- /*GregtechItemList.Casing_Cyclotron_External.set(new ItemStack(this, 1, 10));
- GregtechItemList.Casing_ThermalContainment.set(new ItemStack(this, 1, 11));
+ GregtechItemList.Casing_Vacuum_Furnace.set(new ItemStack(this, 1, 10));
+ /*GregtechItemList.Casing_ThermalContainment.set(new ItemStack(this, 1, 11));
GregtechItemList.Casing_Autocrafter.set(new ItemStack(this, 1, 12));
GregtechItemList.Casing_CuttingFactoryFrame.set(new ItemStack(this, 1, 13));
GregtechItemList.Casing_TeslaTower.set(new ItemStack(this, 1, 14));
@@ -112,7 +112,14 @@ extends GregtechMetaCasingBlocksAbstract {
//Cyclotron External Casing
case 10:
- return Textures.BlockIcons.MACHINE_CASING_RADIATIONPROOF.getIcon();
+
+ if (aSide <2) {
+ return TexturesGtBlock.TEXTURE_STONE_RED_B.getIcon();
+ }
+ else {
+ return TexturesGtBlock.TEXTURE_STONE_RED_A.getIcon();
+ }
+
//Multitank Exterior Casing
case 11:
return TexturesGtBlock.Casing_Material_Tantalloy61.getIcon();
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 d983bd84a9..aaacbcd3a0 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/blocks/textures/TexturesGtBlock.java
@@ -416,6 +416,7 @@ public class TexturesGtBlock {
public static final CustomIcon TEXTURE_STONE_BIRD_A_LEFT = new CustomIcon("metro/TEXTURE_STONE_BIRD_A_LEFT");
public static final CustomIcon TEXTURE_STONE_BIRD_A_RIGHT = new CustomIcon("metro/TEXTURE_STONE_BIRD_A_RIGHT");
public static final CustomIcon TEXTURE_STONE_RED_A = new CustomIcon("metro/TEXTURE_STONE_RED_A");
+ public static final CustomIcon TEXTURE_STONE_RED_B = new CustomIcon("metro/TEXTURE_STONE_RED_B");
public static final CustomIcon TEXTURE_STONE_BLUE_A = new CustomIcon("metro/TEXTURE_STONE_BLUE_A");
public static final CustomIcon TEXTURE_STONE_GREEN_A = new CustomIcon("metro/TEXTURE_STONE_GREEN_A");
public static final CustomIcon TEXTURE_STONE_TABLET_A = new CustomIcon("metro/TEXTURE_STONE_TABLET_A");
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_VisualPlate.java b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_VisualPlate.java
new file mode 100644
index 0000000000..7d2ed2c21a
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/covers/GTPP_Cover_VisualPlate.java
@@ -0,0 +1,67 @@
+package gtPlusPlus.xmod.gregtech.common.covers;
+
+import gregtech.api.interfaces.tileentity.ICoverable;
+import gregtech.api.util.GT_CoverBehavior;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraftforge.fluids.Fluid;
+
+public class GTPP_Cover_VisualPlate extends GT_CoverBehavior {
+
+ public GTPP_Cover_VisualPlate() {
+ }
+
+ public int doCoverThings(byte aSide, byte aInputRedstone, int aCoverID, int aCoverVariable, ICoverable aTileEntity,
+ long aTimer) {
+ return aCoverVariable;
+ }
+
+ public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity,
+ EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ return aCoverVariable;
+ }
+
+ public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity,
+ EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ return true;
+ }
+
+ public boolean letsRedstoneGoIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
+ return false;
+ }
+
+ public boolean letsRedstoneGoOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
+ return false;
+ }
+
+ public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
+ return false;
+ }
+
+ public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
+ return false;
+ }
+
+ public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
+ return false;
+ }
+
+ public boolean letsFluidOut(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
+ return false;
+ }
+
+ public boolean letsItemsIn(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
+ return false;
+ }
+
+ public boolean letsItemsOut(byte aSide, int aCoverID, int aCoverVariable, int aSlot, ICoverable aTileEntity) {
+ return false;
+ }
+
+ public boolean alwaysLookConnected(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
+ return false;
+ }
+
+ public int getTickRate(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
index 1a400eaa20..c9f4dd9ae2 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/MetaGeneratedGregtechItems.java
@@ -29,6 +29,7 @@ import gtPlusPlus.xmod.gregtech.api.enums.GregtechOrePrefixes.GT_Materials;
import gtPlusPlus.xmod.gregtech.api.items.Gregtech_MetaItem_X32;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_Overflow;
+import gtPlusPlus.xmod.gregtech.common.covers.GTPP_Cover_VisualPlate;
public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
@@ -249,21 +250,7 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
this.setFluidContainerStats(32000 + tLastID, 16L, 64L);
GregtechItemList.Fluid_Cell_1L.set(this.addItem(tLastID = 64, "1L Wrought Iron Fluid Cell", "Holds exactly one litre worth of liquid.", new Object[]{new ItemData(Materials.WroughtIron, (OrePrefixes.plate.mMaterialAmount * 8L) + (4L * OrePrefixes.ring.mMaterialAmount), new MaterialStack[0]), getTcAspectStack(TC_Aspects.VACUOS, 2L), getTcAspectStack(TC_Aspects.AQUA, 1L)}));
- this.setFluidContainerStats(32000 + tLastID, 1L, 64L);
-
- if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
-
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.WroughtIron, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 2L), GregtechItemList.Fluid_Cell_1L.get(1L, new Object[0]), 50, 32);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Bronze, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Bronze, 2L), GregtechItemList.Fluid_Cell_16L.get(1L, new Object[0]), 50, 32);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Brass, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Brass, 2L), GregtechItemList.Fluid_Cell_36L.get(1L, new Object[0]), 75, 32);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plateDouble, Materials.Invar, 1L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Invar, 2L), GregtechItemList.Fluid_Cell_144L.get(1L, new Object[0]), 75, 32);
-
- } else {
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.WroughtIron, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.WroughtIron, 4L), GregtechItemList.Fluid_Cell_1L.get(1L, new Object[0]), 50, 32);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Bronze, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Bronze, 4L), GregtechItemList.Fluid_Cell_16L.get(1L, new Object[0]), 50, 32);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Brass, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Brass, 4L), GregtechItemList.Fluid_Cell_36L.get(1L, new Object[0]), 75, 32);
- GT_Values.RA.addAssemblerRecipe(GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Invar, 8L), GT_OreDictUnificator.get(OrePrefixes.ring, Materials.Invar, 4L), GregtechItemList.Fluid_Cell_144L.get(1L, new Object[0]), 75, 32);
- }
+ this.setFluidContainerStats(32000 + tLastID, 1L, 64L);
}
@@ -280,8 +267,7 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
GregTech_API.registerCover(GregtechItemList.Cover_Overflow_MV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(512));
GregTech_API.registerCover(GregtechItemList.Cover_Overflow_HV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[5][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(4096));
GregTech_API.registerCover(GregtechItemList.Cover_Overflow_EV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(32768));
- GregTech_API.registerCover(GregtechItemList.Cover_Overflow_IV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(262144));
-
+ GregTech_API.registerCover(GregtechItemList.Cover_Overflow_IV.get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[8][0], new GT_RenderedTexture(TexturesGtBlock.Overlay_Overflow_Valve)}), new GTPP_Cover_Overflow(262144));
//Fusion Reactor MK4 Singularity
GregtechItemList.Compressed_Fusion_Reactor.set(this.addItem(100, "Hypervisor Matrix (Fusion)", "A memory unit containing an RI (Restricted Intelligence)", new Object[0]));
@@ -327,7 +313,30 @@ public class MetaGeneratedGregtechItems extends Gregtech_MetaItem_X32 {
GregtechItemList.Farm_Processor_UV.set(this.addItem(tLastID = 128, "Farm Processor [UV]", "Reusable", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 8L), getTcAspectStack(TC_Aspects.METALLUM, 8L), getTcAspectStack(TC_Aspects.POTENTIA, 8L)}));
this.setElectricStats(32000 + tLastID, GT_Values.V[9]* 10 * 60 * 20, GT_Values.V[8], 8L, -3L, false);
-
+ String aTierName;
+ int aFirstMachineCasingID = 130;
+ GregtechItemList[] mMachineCasingCovers = new GregtechItemList[] {
+ GregtechItemList.FakeMachineCasingPlate_ULV,
+ GregtechItemList.FakeMachineCasingPlate_LV,
+ GregtechItemList.FakeMachineCasingPlate_MV,
+ GregtechItemList.FakeMachineCasingPlate_HV,
+ GregtechItemList.FakeMachineCasingPlate_EV,
+ GregtechItemList.FakeMachineCasingPlate_IV,
+ GregtechItemList.FakeMachineCasingPlate_LuV,
+ GregtechItemList.FakeMachineCasingPlate_ZPM,
+ GregtechItemList.FakeMachineCasingPlate_UV,
+ GregtechItemList.FakeMachineCasingPlate_MAX,
+ };
+ for (int i=0;i<10;i++) {
+ if (i==10) {
+ break;
+ }
+ else {
+ aTierName = GT_Values.VN[i];
+ mMachineCasingCovers[i].set(this.addItem(aFirstMachineCasingID++, aTierName+" Machine Plate Cover", "Looks visually like an "+aTierName+" machine casing, apply to pipe/cable as cover", new Object[]{getTcAspectStack(TC_Aspects.ELECTRUM, 1L), getTcAspectStack(TC_Aspects.MACHINA, 1L)}));
+ GregTech_API.registerCover(mMachineCasingCovers[i].get(1L, new Object[0]), new GT_MultiTexture(new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[i][0]}), new GTPP_Cover_VisualPlate());
+ }
+ }
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java
index 64676fa907..a063d334bf 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/items/behaviours/Behaviour_Electric_Lighter.java
@@ -1,5 +1,6 @@
package gtPlusPlus.xmod.gregtech.common.items.behaviours;
+import java.util.ArrayList;
import java.util.List;
import codechicken.lib.math.MathHelper;
@@ -10,12 +11,10 @@ import gregtech.api.util.GT_Utility;
import gregtech.common.items.behaviors.Behaviour_None;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.entity.projectile.EntityLightningAttack;
-import gtPlusPlus.core.entity.projectile.EntityThrowableBomb;
import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.NBTUtils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
-import gtPlusPlus.core.util.sys.KeyboardUtils;
import gtPlusPlus.xmod.gregtech.common.helpers.ChargingHelper;
import gtPlusPlus.xmod.gregtech.common.items.MetaGeneratedGregtechTools;
import ic2.api.item.IElectricItemManager;
@@ -24,7 +23,6 @@ import net.minecraft.entity.monster.EntityCreeper;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
-import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
@@ -42,8 +40,8 @@ public class Behaviour_Electric_Lighter extends Behaviour_None {
}
- public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) {
- if (!aPlayer.worldObj.isRemote && aStack.stackSize == 1) {
+ public boolean onLeftClickEntity(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, Entity aEntity) {
+ if (!aPlayer.worldObj.isRemote && aStack != null && aStack.stackSize == 1) {
boolean rOutput = false;
if (aEntity instanceof EntityCreeper) {
if (this.prepare(aStack) || aPlayer.capabilities.isCreativeMode) {
@@ -62,7 +60,7 @@ public class Behaviour_Electric_Lighter extends Behaviour_None {
public boolean onItemUse(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX,
int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- if (!aWorld.isRemote && aStack.stackSize == 1) {
+ if (!aWorld.isRemote && aStack != null && aStack.stackSize == 1) {
if (aPlayer.isSneaking()) {
Logger.INFO("Changing Mode");
boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMod");
@@ -111,7 +109,7 @@ public class Behaviour_Electric_Lighter extends Behaviour_None {
public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX,
int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) {
- if (!aWorld.isRemote && aStack.stackSize == 1) {
+ if (!aWorld.isRemote && aStack != null && aStack.stackSize == 1) {
if (aPlayer.isSneaking()) {
Logger.INFO("Changing Mode");
boolean aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMod");
@@ -189,9 +187,8 @@ public class Behaviour_Electric_Lighter extends Behaviour_None {
public List<String> getAdditionalToolTips(GT_MetaBase_Item aItem, List<String> aList, ItemStack aStack) {
aList.add(this.mTooltip);
- int aUses = 0;
-
- if (aStack != null) {
+ int aUses = 0;
+ if (aStack != null) {
if (aStack.getItem() instanceof MetaGeneratedGregtechTools) {
if (ChargingHelper.isItemValid(aStack)) {
if (aStack.getItem() instanceof IElectricItemManager) {
@@ -200,24 +197,22 @@ public class Behaviour_Electric_Lighter extends Behaviour_None {
long aEuCost = 4096 * 2;
aUses = (int) (aCharge / aEuCost);
}
+ }
+ boolean aCurrentMode;
+ if (NBTUtils.hasKey(aStack, "aFireballMode")) {
+ aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMod");
}
+ else {
+ aStack.getTagCompound().setBoolean("aFireballMod", false);
+ aCurrentMode = false;
+ }
+ aList.add("Current Mode: "+EnumChatFormatting.RED+(aCurrentMode ? "Projectile" : "Fire Starter"));
}
+
}
- NBTTagCompound tNBT = aStack.getTagCompound();
aList.add(this.mTooltipUses + " " + aUses);
- aList.add(this.mTooltipUnstackable);
-
-
- boolean aCurrentMode;
- if (NBTUtils.hasKey(aStack, "aFireballMode")) {
- aCurrentMode = NBTUtils.getBoolean(aStack, "aFireballMod");
- }
- else {
- aStack.getTagCompound().setBoolean("aFireballMod", false);
- aCurrentMode = false;
- }
- aList.add("Current Mode: "+EnumChatFormatting.RED+(aCurrentMode ? "Projectile" : "Fire Starter"));
+ aList.add(this.mTooltipUnstackable);
return aList;
}
} \ No newline at end of file
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java b/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java
index 7dd376759a..763a4a129d 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/render/GTPP_CapeRenderer.java
@@ -49,6 +49,7 @@ import net.minecraft.server.MinecraftServer;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.client.event.RenderPlayerEvent;
+import net.minecraftforge.common.UsernameCache;
public class GTPP_CapeRenderer extends RenderPlayer {
@@ -91,7 +92,7 @@ public class GTPP_CapeRenderer extends RenderPlayer {
aEvent.setCanceled(true);
Logger.WARNING("A2");
return;
- }
+ }
}
// Make sure we don't keep checking on clients who dont have capes.
@@ -100,14 +101,35 @@ public class GTPP_CapeRenderer extends RenderPlayer {
// Time to Spliterate some data
Map<String, ResourceLocation> aPlayerData = new HashMap<String, ResourceLocation>();
Map<String, String> aNameMap = new HashMap<String, String>();
- int i = 0;
- for (String s : mData) {
- String[] aSplit = s.split("@");
- int a[] = new int[] { 0, mCapes.length - 1 };
- int aID = Integer.parseInt(aSplit[1]);
- String aPlayerName = this.getPlayerName("iteration-" + (i++), aSplit[0]);
- aNameMap.put(aSplit[0], aPlayerName);
- aPlayerData.put(aPlayerName, this.mCapes[Math.max(a[0], Math.min(aID, a[1]))]);
+ int i = 0;
+ if (!CORE.DEVENV) {
+ for (String s : mData) {
+ String[] aSplit = s.split("@");
+ int a[] = new int[] { 0, mCapes.length - 1 };
+ int aID = Integer.parseInt(aSplit[1]);
+ // Quick Check to prevent lag
+ Logger.WARNING("Trying to create UUID from - " + aSplit[0]);
+ UUID aPlayerID = UUID.fromString(aSplit[0]);
+ Logger.WARNING("Result: " + aPlayerID.toString());
+ if (aPlayerID != null) {
+ if (UsernameCache.containsUUID(aPlayerID)) {
+ Logger.WARNING("UsernameCache contains a last known username for current players UUID.");
+ if (!UsernameCache.getLastKnownUsername(aPlayerID).toLowerCase()
+ .equals(ClientProxy.playerName)) {
+ Logger.WARNING("Last known name does not match current name. Checking next UUID.");
+ continue;
+ } else {
+ Logger.WARNING("Last known name does match current name.");
+ }
+ } else {
+ Logger.WARNING("UsernameCache did not hold results for current player, oops.");
+ continue;
+ }
+ }
+ String aPlayerName = this.getPlayerName("iteration-" + (i++), aSplit[0]);
+ aNameMap.put(aSplit[0], aPlayerName);
+ aPlayerData.put(aPlayerName, this.mCapes[Math.max(a[0], Math.min(aID, a[1]))]);
+ }
}
// Set flag to only render this event if player has a cape.
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 ef3e06086e..9f50cf6d91 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
@@ -1,9 +1,6 @@
package gtPlusPlus.xmod.gregtech.common.tileentities.generators;
import cpw.mods.fml.common.registry.GameRegistry;
-
-import net.minecraft.item.ItemStack;
-
import gregtech.api.GregTech_API;
import gregtech.api.enums.ConfigCategories;
import gregtech.api.enums.ItemList;
@@ -11,7 +8,6 @@ import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
-import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicGenerator;
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_ModHandler;
@@ -19,8 +15,8 @@ import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.Recipe_GT.Gregtech_Recipe_Map;
import gtPlusPlus.api.objects.Logger;
-import gtPlusPlus.core.lib.CORE;
import gtPlusPlus.xmod.gregtech.api.metatileentity.custom.power.GTPP_MTE_BasicLosslessGenerator;
+import net.minecraft.item.ItemStack;
public class GT_MetaTileEntity_SemiFluidGenerator extends GTPP_MTE_BasicLosslessGenerator{
@@ -65,7 +61,7 @@ public class GT_MetaTileEntity_SemiFluidGenerator extends GTPP_MTE_BasicLossless
@Override
public GT_Recipe.GT_Recipe_Map getRecipes() {
- //Logger.INFO("Fuel Count: "+Gregtech_Recipe_Map.sSemiFluidLiquidFuels.mRecipeList.size());
+ //Logger.WARNING("Fuel Count: "+Gregtech_Recipe_Map.sSemiFluidLiquidFuels.mRecipeList.size());
return Gregtech_Recipe_Map.sSemiFluidLiquidFuels;
}
@@ -95,14 +91,14 @@ public class GT_MetaTileEntity_SemiFluidGenerator extends GTPP_MTE_BasicLossless
@Override
public int getFuelValue(ItemStack aStack) {
if ((GT_Utility.isStackInvalid(aStack)) || (getRecipes() == null)) {
- Logger.INFO("Bad Fuel?");
+ Logger.WARNING("Bad Fuel?");
return 0;
}
int rValue = Math.max(GT_ModHandler.getFuelCanValue(aStack) * 6 / 5, super.getFuelValue(aStack));
if (ItemList.Fuel_Can_Plastic_Filled.isStackEqual(aStack, false, true)) {
rValue = Math.max(rValue, GameRegistry.getFuelValue(aStack) * 3);
}
- Logger.INFO("Good Fuel: "+rValue);
+ Logger.WARNING("Good Fuel: "+rValue);
return rValue;
}
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 f3fd95f0c1..6f18b89c53 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
@@ -338,22 +338,22 @@ public class GregtechMetaTileEntity_RTG extends GT_MetaTileEntity_BasicGenerator
this.mNewTier = mTier2;
//ReflectionUtils.setFinalStatic(mTier2, GT_Values.V[0]);
} catch (Exception e) {
- Logger.INFO("Failed setting mTier.");
+ Logger.WARNING("Failed setting mTier.");
e.printStackTrace();
}
this.mTicksToBurnFor = getTotalEUGenerated(convertDaysToTicks(tFuel.mSpecialValue), voltage);
if (mTicksToBurnFor >= Integer.MAX_VALUE){
mTicksToBurnFor = Integer.MAX_VALUE;
- Logger.INFO("Fuel went over Int limit, setting to MAX_VALUE.");
+ Logger.WARNING("Fuel went over Int limit, setting to MAX_VALUE.");
}
this.mDaysRemaining = MathUtils.roundToClosestInt(mTicksToBurnFor/20/60/3);
- Logger.INFO("step | "+(int) (mTicksToBurnFor * getEfficiency() / 100L));
+ Logger.WARNING("step | "+(int) (mTicksToBurnFor * getEfficiency() / 100L));
return (int) (mTicksToBurnFor * getEfficiency() / 100L);
//return (int) (tFuel.mSpecialValue * 365L * getEfficiency() / 100L);
//return tFuel.mEUt;
}
- Logger.INFO("Not sure");
+ Logger.WARNING("Not sure");
return 0;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java
index c364fe5e9e..e277b671c6 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaAtmosphericReconditioner.java
@@ -127,13 +127,6 @@ public class GregtechMetaAtmosphericReconditioner extends GT_MetaTileEntity_Basi
}
@Override
- public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {
- if (getBaseMetaTileEntity().isServerSide()) {
-
- }
- }
-
- @Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
super.onPostTick(aBaseMetaTileEntity, aTick);
if (aBaseMetaTileEntity.isServerSide()) {
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
new file mode 100644
index 0000000000..0a65db7be4
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaGarbageCollector.java
@@ -0,0 +1,318 @@
+package gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic;
+
+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.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_Utility;
+import gtPlusPlus.core.lib.CORE;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.minecraft.PlayerUtils;
+import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMetaTileEntity;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.world.World;
+
+public class GregtechMetaGarbageCollector extends GregtechMetaTileEntity {
+
+ long mLastCleanup = 0;
+ long mLocalTickVar = 0;
+ int mFrequency = 5;
+
+ public GregtechMetaGarbageCollector(final String aName, final String aNameRegional, final String aDescription) {
+ super(991, aName, aNameRegional, 5, 0, aDescription);
+ }
+
+ public GregtechMetaGarbageCollector(final String aName, final String aDescription, final ITexture[][][] aTextures) {
+ super(aName, 5, 0, aDescription, aTextures);
+ }
+
+ @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"};
+ }
+
+ @Override
+ public ITexture[][][] getTextureSet(final ITexture[] aTextures) {
+ final ITexture[][][] rTextures = new ITexture[10][17][];
+ for (byte i = -1; i < 16; i++) {
+ rTextures[0][i + 1] = this.getFront(i);
+ rTextures[1][i + 1] = this.getBack(i);
+ rTextures[2][i + 1] = this.getBottom(i);
+ rTextures[3][i + 1] = this.getTop(i);
+ rTextures[4][i + 1] = this.getSides(i);
+ rTextures[5][i + 1] = this.getFrontActive(i);
+ rTextures[6][i + 1] = this.getBackActive(i);
+ rTextures[7][i + 1] = this.getBottomActive(i);
+ rTextures[8][i + 1] = this.getTopActive(i);
+ rTextures[9][i + 1] = this.getSidesActive(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 this.mTextures[(aActive ? 5 : 0) + (aSide == aFacing ? 0 : aSide == GT_Utility.getOppositeSide(aFacing) ? 1 : aSide == 0 ? 2 : aSide == 1 ? 3 : 4)][aColorIndex + 1];
+ }
+
+
+ public ITexture[] getFront(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)};
+ }
+
+
+ public ITexture[] getBack(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)};
+ }
+
+
+ public ITexture[] getBottom(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)};
+ }
+
+
+ public ITexture[] getTop(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)};
+ }
+
+
+ public ITexture[] getSides(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redox_3)};
+ }
+
+
+ public ITexture[] getFrontActive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)};
+ }
+
+
+ public ITexture[] getBackActive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_RedSteel)};
+ }
+
+
+ public ITexture[] getBottomActive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)};
+ }
+
+
+ public ITexture[] getTopActive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Material_Grisium)};
+ }
+
+
+ public ITexture[] getSidesActive(final byte aColor) {
+ return new ITexture[]{Textures.BlockIcons.MACHINE_CASINGS[this.mTier+3][aColor + 1], new GT_RenderedTexture(TexturesGtBlock.Casing_Redox_3)};
+ }
+
+ @Override
+ public void onScrewdriverRightClick(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ if (mFrequency < 180){
+ mFrequency += 5;
+ }
+ else {
+ mFrequency = 5;
+ }
+ PlayerUtils.messagePlayer(aPlayer, "Running every "+mFrequency+" minutes.");
+ super.onScrewdriverRightClick(aSide, aPlayer, aX, aY, aZ);
+ }
+
+ @Override
+ public IMetaTileEntity newMetaEntity(final IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaGarbageCollector(this.mName, this.mDescription, this.mTextures);
+ }
+
+ @Override public boolean isSimpleMachine() {return true;}
+ @Override public boolean isElectric() {return false;}
+ @Override public boolean isValidSlot(final int aIndex) {return false;}
+ @Override public boolean isFacingValid(final byte aFacing) {return true;}
+ @Override public boolean isEnetInput() {return false;}
+ @Override public boolean isEnetOutput() {return false;}
+ @Override public boolean isInputFacing(final byte aSide) {return aSide!=this.getBaseMetaTileEntity().getFrontFacing();}
+ @Override public boolean isOutputFacing(final byte aSide) {return aSide==this.getBaseMetaTileEntity().getFrontFacing();}
+ @Override public boolean isTeleporterCompatible() {return false;}
+ @Override public long getMinimumStoredEU() {return 0;}
+ @Override public long maxEUStore() {return 0;}
+
+ @Override
+ public int getCapacity() {
+ return 0;
+ }
+
+ @Override
+ public long maxEUInput() {
+ return 0;
+ }
+
+ @Override
+ public long maxEUOutput() {
+ return 0;
+ }
+
+ @Override
+ public long maxAmperesIn() {
+ return 0;
+ }
+
+ @Override
+ public long maxAmperesOut() {
+ return 0;
+ }
+ @Override public int rechargerSlotStartIndex() {return 0;}
+ @Override public int dechargerSlotStartIndex() {return 0;}
+ @Override public int rechargerSlotCount() {return 0;}
+ @Override public int dechargerSlotCount() {return 0;}
+ @Override public int getProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyStored();}
+ @Override public int maxProgresstime() {return (int)this.getBaseMetaTileEntity().getUniversalEnergyCapacity();}
+ @Override public boolean isAccessAllowed(final EntityPlayer aPlayer) {return true;}
+
+ @Override
+ public boolean onRightclick(final IGregTechTileEntity aBaseMetaTileEntity, final EntityPlayer aPlayer) {
+ if (aBaseMetaTileEntity.isClientSide())
+ {
+ return true;
+ }
+ this.showPollution(aPlayer.getEntityWorld(), aPlayer);
+ return true;
+ }
+
+ private void showPollution(final World worldIn, final EntityPlayer playerIn){
+ PlayerUtils.messagePlayer(playerIn, "Running every "+mFrequency+" minutes. Owner: "+this.getBaseMetaTileEntity().getOwnerName());
+ long aDiff = mLocalTickVar - this.mLastCleanup;
+ PlayerUtils.messagePlayer(playerIn, "Last run: "+Utils.getSecondsFromMillis(aDiff)+" seconds ago.");
+
+
+ }
+
+ @Override
+ public boolean allowPullStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ return false;
+ }
+
+ @Override
+ public boolean allowPutStack(final IGregTechTileEntity aBaseMetaTileEntity, final int aIndex, final byte aSide, final ItemStack aStack) {
+ return false;
+ }
+
+
+ @Override
+ public String[] getInfoData() {
+ return new String[] {
+ this.getLocalName()
+ };
+ }
+
+ @Override
+ public boolean isGivingInformation() {
+ return true;
+ }
+
+ @Override
+ public int[] getAccessibleSlotsFromSide(final int p_94128_1_) {
+ return new int[] {};
+ }
+
+ @Override
+ public boolean canInsertItem(final int p_102007_1_, final ItemStack p_102007_2_, final int p_102007_3_) {
+ return false;
+ }
+
+ @Override
+ public boolean canExtractItem(final int p_102008_1_, final ItemStack p_102008_2_, final int p_102008_3_) {
+ return false;
+ }
+
+ @Override
+ public int getSizeInventory() {
+ return 0;
+ }
+
+ @Override
+ public ItemStack getStackInSlot(final int p_70301_1_) {
+ return null;
+ }
+
+ @Override
+ public ItemStack decrStackSize(final int p_70298_1_, final int p_70298_2_) {
+ return null;
+ }
+
+ @Override
+ public ItemStack getStackInSlotOnClosing(final int p_70304_1_) {
+ return null;
+ }
+
+ @Override
+ public void setInventorySlotContents(final int p_70299_1_, final ItemStack p_70299_2_) {
+ }
+
+ @Override
+ public String getInventoryName() {
+ return null;
+ }
+
+ @Override
+ public boolean hasCustomInventoryName() {
+ return false;
+ }
+
+ @Override
+ public int getInventoryStackLimit() {
+ return 0;
+ }
+
+ @Override
+ public boolean isUseableByPlayer(final EntityPlayer p_70300_1_) {
+ return true;
+ }
+
+ @Override
+ public void openInventory() {
+ }
+
+ @Override
+ public void closeInventory() {
+ }
+
+ @Override
+ public boolean isItemValidForSlot(final int p_94041_1_, final ItemStack p_94041_2_) {
+ return false;
+ }
+
+ @Override
+ public boolean isOverclockerUpgradable() {
+ return false;
+ }
+
+ @Override
+ public boolean isTransformerUpgradable() {
+ return false;
+ }
+
+ @Override
+ public void saveNBTData(final NBTTagCompound aNBT) {
+
+ }
+
+ @Override
+ public void loadNBTData(final NBTTagCompound aNBT) {
+
+ }
+
+ @Override
+ public void onPostTick(final IGregTechTileEntity aBaseMetaTileEntity, final long aTick) {
+ super.onPostTick(aBaseMetaTileEntity, aTick);
+ if (this.getBaseMetaTileEntity().isServerSide()) {
+ mLocalTickVar = System.currentTimeMillis();
+ long aDiff = mLocalTickVar - this.mLastCleanup;
+ if (Utils.getSecondsFromMillis(aDiff) >= (this.mFrequency * 60)) {
+ CORE.gc();
+ this.mLastCleanup = mLocalTickVar;
+ }
+ }
+ }
+
+} \ No newline at end of file
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 c7f63e3bc2..4e5c296629 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
@@ -379,7 +379,7 @@ public class GregtechMetaPollutionCreator extends GregtechMetaTileEntity {
else {
returnValue = getCurrentChunkPollution();
}
- Logger.INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |");
+ //Logger.INFO("| DEBUG: "+returnValue +" | ArrayPos:"+this.mArrayPos+" | Counter:"+counter+" | Total:"+total+" |");
return returnValue;
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java
index b4e819a459..477848a90f 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/basic/GregtechMetaTileEntity_CompactFusionReactor.java
@@ -131,15 +131,15 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti
@Override
public int checkRecipe() {
- Logger.INFO("Recipe Tick 1.");
+ Logger.MACHINE_INFO("Recipe Tick 1.");
if (!this.mCanProcessRecipe) {
- Logger.INFO("Recipe Tick 1.1 - Cannot Process Recipe.");
+ Logger.MACHINE_INFO("Recipe Tick 1.1 - Cannot Process Recipe.");
if (this.mChargeConsumed < mFusionPoint) {
- Logger.INFO("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low.");
+ Logger.MACHINE_INFO("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low.");
this.mCharging = true;
this.mCanProcessRecipe = false;
if (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits((mFusionPoint / 100), false)) {
- Logger.INFO("Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100) + "/"
+ Logger.MACHINE_INFO("Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100) + "/"
+ mFusionPoint);
mChargeConsumed += (mFusionPoint / 100);
}
@@ -152,13 +152,13 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti
}
}
else {
- Logger.INFO("Recipe Tick 1.1 - Try to Process Recipe.");
+ Logger.MACHINE_INFO("Recipe Tick 1.1 - Try to Process Recipe.");
if (checkRecipeMulti()) {
- Logger.INFO("Recipe Tick 1.2 - Process Recipe was Successful.");
+ Logger.MACHINE_INFO("Recipe Tick 1.2 - Process Recipe was Successful.");
return 2;
}
}
- Logger.INFO("Recipe Tick 2. - Process Recipe failed.");
+ Logger.MACHINE_INFO("Recipe Tick 2. - Process Recipe failed.");
return 0;
}
@@ -196,7 +196,7 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti
}
if ((tRecipe == null && !mRunningOnLoad) || (tRecipe != null && maxEUStore() < tRecipe.mSpecialValue)) {
this.mLastRecipe = null;
- Logger.INFO("Just plain bad.");
+ Logger.MACHINE_INFO("Just plain bad.");
return false;
}
if (mRunningOnLoad || tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[] {})) {
@@ -397,38 +397,38 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
// super.onPostTick(aBaseMetaTileEntity, aTick);
if (aBaseMetaTileEntity.isServerSide()) {
- // Logger.INFO("1");
+ // Logger.MACHINE_INFO("1");
if (mEfficiency < 0)
mEfficiency = 0;
if (mRunningOnLoad) {
- Logger.INFO("2");
+ Logger.MACHINE_INFO("2");
this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU();
checkRecipeMulti();
}
if (--mUpdate == 0 || --mStartUpCheck == 0) {
- Logger.INFO("3");
+ Logger.MACHINE_INFO("3");
mMachine = true;
}
if (mStartUpCheck < 0) {
- //Logger.INFO("4");
+ //Logger.MACHINE_INFO("4");
if (mMachine) {
- //Logger.INFO("5");
+ //Logger.MACHINE_INFO("5");
if (aBaseMetaTileEntity.getStoredEU() + (2048 * tierOverclock()) < maxEUStore()) {
if (aBaseMetaTileEntity.increaseStoredEnergyUnits(2048 * tierOverclock(), true)) {
- //Logger.INFO("5.5 A");
+ //Logger.MACHINE_INFO("5.5 A");
}
else {
- //Logger.INFO("5.5 B");
+ //Logger.MACHINE_INFO("5.5 B");
}
}
if (this.mEUStore <= 0 && mMaxProgresstime > 0) {
- Logger.INFO("6");
+ Logger.MACHINE_INFO("6");
stopMachine();
this.mLastRecipe = null;
}
if (mMaxProgresstime > 0) {
- Logger.INFO("7");
+ Logger.MACHINE_INFO("7");
this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mEUt, true);
if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) {
if (mOutputFluids != null)
@@ -448,18 +448,18 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti
}
}
else {
- //Logger.INFO("8");
+ //Logger.MACHINE_INFO("8");
this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU();
if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()
|| aBaseMetaTileEntity.hasInventoryBeenModified()) {
- Logger.INFO("9");
+ Logger.MACHINE_INFO("9");
// turnCasingActive(mMaxProgresstime > 0);
if (aBaseMetaTileEntity.isAllowedToWork()) {
- Logger.INFO("10");
+ Logger.MACHINE_INFO("10");
if (checkRecipeMulti()) {
- Logger.INFO("11");
+ Logger.MACHINE_INFO("11");
if (this.mEUStore < this.mLastRecipe.mSpecialValue) {
- Logger.INFO("12");
+ Logger.MACHINE_INFO("12");
mMaxProgresstime = 0;
// turnCasingActive(false);
}
@@ -473,12 +473,12 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti
}
else {
// turnCasingActive(false);
- Logger.INFO("Bad");
+ Logger.MACHINE_INFO("Bad");
this.mLastRecipe = null;
stopMachine();
}
}
- Logger.INFO("Good | "+mMaxProgresstime);
+ Logger.MACHINE_INFO("Good | "+mMaxProgresstime);
aBaseMetaTileEntity.setActive(mMaxProgresstime > 0);
}
}
@@ -489,14 +489,14 @@ public class GregtechMetaTileEntity_CompactFusionReactor extends GT_MetaTileEnti
if (!drainEnergyInput(((long) -mEUt * 10000) / Math.max(1000, mEfficiency))) {
this.mLastRecipe = null;
stopMachine();
- Logger.INFO("a1");
+ Logger.MACHINE_INFO("a1");
return false;
}
}
if (this.mEUStore <= 0) {
this.mLastRecipe = null;
stopMachine();
- Logger.INFO("a2");
+ Logger.MACHINE_INFO("a2");
return false;
}
}
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 5a0f888ddb..8b3ada610d 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
@@ -131,15 +131,15 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux
@Override
public int checkRecipe() {
- Logger.INFO("Recipe Tick 1.");
+ Logger.MACHINE_INFO("Recipe Tick 1.");
if (!this.mCanProcessRecipe) {
- Logger.INFO("Recipe Tick 1.1 - Cannot Process Recipe.");
+ Logger.MACHINE_INFO("Recipe Tick 1.1 - Cannot Process Recipe.");
if (this.mChargeConsumed < mFusionPoint) {
- Logger.INFO("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low.");
+ Logger.MACHINE_INFO("Recipe Tick 1.2 - Cannot Ignite Fusion, Charge too low.");
this.mCharging = true;
this.mCanProcessRecipe = false;
if (this.getBaseMetaTileEntity().decreaseStoredEnergyUnits((mFusionPoint / 100), false)) {
- Logger.INFO("Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100) + "/"
+ Logger.MACHINE_INFO("Recipe Tick 1.3 - Charging Internal storage. " + (mFusionPoint / 100) + "/"
+ mFusionPoint);
mChargeConsumed += (mFusionPoint / 100);
}
@@ -152,13 +152,13 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux
}
}
else {
- Logger.INFO("Recipe Tick 1.1 - Try to Process Recipe.");
+ Logger.MACHINE_INFO("Recipe Tick 1.1 - Try to Process Recipe.");
if (checkRecipeMulti()) {
- Logger.INFO("Recipe Tick 1.2 - Process Recipe was Successful.");
+ Logger.MACHINE_INFO("Recipe Tick 1.2 - Process Recipe was Successful.");
return 2;
}
}
- Logger.INFO("Recipe Tick 2. - Process Recipe failed.");
+ Logger.MACHINE_INFO("Recipe Tick 2. - Process Recipe failed.");
return 0;
}
@@ -198,7 +198,7 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux
if ((tRecipe == null && !mRunningOnLoad) || (tRecipe != null && maxEUStore() < tRecipe.mSpecialValue)) {
this.mLastRecipe = null;
- Logger.INFO("Just plain bad.");
+ Logger.MACHINE_INFO("Just plain bad.");
return false;
}
if (mRunningOnLoad || tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[] {})) {
@@ -399,38 +399,38 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
// super.onPostTick(aBaseMetaTileEntity, aTick);
if (aBaseMetaTileEntity.isServerSide()) {
- // Logger.INFO("1");
+ // Logger.MACHINE_INFO("1");
if (mEfficiency < 0)
mEfficiency = 0;
if (mRunningOnLoad) {
- Logger.INFO("2");
+ Logger.MACHINE_INFO("2");
this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU();
checkRecipeMulti();
}
if (--mUpdate == 0 || --mStartUpCheck == 0) {
- Logger.INFO("3");
+ Logger.MACHINE_INFO("3");
mMachine = true;
}
if (mStartUpCheck < 0) {
- //Logger.INFO("4");
+ //Logger.MACHINE_INFO("4");
if (mMachine) {
- //Logger.INFO("5");
+ //Logger.MACHINE_INFO("5");
if (aBaseMetaTileEntity.getStoredEU() + (2048 * tierOverclock()) < maxEUStore()) {
if (aBaseMetaTileEntity.increaseStoredEnergyUnits(2048 * tierOverclock(), true)) {
- //Logger.INFO("5.5 A");
+ //Logger.MACHINE_INFO("5.5 A");
}
else {
- //Logger.INFO("5.5 B");
+ //Logger.MACHINE_INFO("5.5 B");
}
}
if (this.mEUStore <= 0 && mMaxProgresstime > 0) {
- Logger.INFO("6");
+ Logger.MACHINE_INFO("6");
stopMachine();
this.mLastRecipe = null;
}
if (mMaxProgresstime > 0) {
- Logger.INFO("7");
+ Logger.MACHINE_INFO("7");
this.getBaseMetaTileEntity().decreaseStoredEnergyUnits(mEUt, true);
if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) {
if (mOutputFluids != null)
@@ -450,18 +450,18 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux
}
}
else {
- //Logger.INFO("8");
+ //Logger.MACHINE_INFO("8");
this.mEUStore = (int) aBaseMetaTileEntity.getStoredEU();
if (aTick % 100 == 0 || aBaseMetaTileEntity.hasWorkJustBeenEnabled()
|| aBaseMetaTileEntity.hasInventoryBeenModified()) {
- Logger.INFO("9");
+ Logger.MACHINE_INFO("9");
// turnCasingActive(mMaxProgresstime > 0);
if (aBaseMetaTileEntity.isAllowedToWork()) {
- Logger.INFO("10");
+ Logger.MACHINE_INFO("10");
if (checkRecipeMulti()) {
- Logger.INFO("11");
+ Logger.MACHINE_INFO("11");
if (this.mEUStore < this.mLastRecipe.mSpecialValue) {
- Logger.INFO("12");
+ Logger.MACHINE_INFO("12");
mMaxProgresstime = 0;
// turnCasingActive(false);
}
@@ -475,12 +475,12 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux
}
else {
// turnCasingActive(false);
- Logger.INFO("Bad");
+ Logger.MACHINE_INFO("Bad");
this.mLastRecipe = null;
stopMachine();
}
}
- Logger.INFO("Good | "+mMaxProgresstime);
+ Logger.MACHINE_INFO("Good | "+mMaxProgresstime);
aBaseMetaTileEntity.setActive(mMaxProgresstime > 0);
}
}
@@ -491,14 +491,14 @@ public class GregtechMetaTileEntity_PocketFusion extends GT_MetaTileEntity_Delux
if (!drainEnergyInput(((long) -mEUt * 10000) / Math.max(1000, mEfficiency))) {
this.mLastRecipe = null;
stopMachine();
- Logger.INFO("a1");
+ Logger.MACHINE_INFO("a1");
return false;
}
}
if (this.mEUStore <= 0) {
this.mLastRecipe = null;
stopMachine();
- Logger.INFO("a2");
+ Logger.MACHINE_INFO("a2");
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 3f3a276f0c..9490fc678b 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
@@ -11,7 +11,6 @@ import gregtech.api.util.GT_Utility;
import gregtech.api.util.Recipe_GT;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.block.ModBlocks;
-import gtPlusPlus.core.util.Utils;
import gtPlusPlus.core.util.minecraft.PlayerUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock.CustomIcon;
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
new file mode 100644
index 0000000000..4cead1c2a8
--- /dev/null
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/processing/GregtechMetaTileEntity_IndustrialDehydrator.java
@@ -0,0 +1,379 @@
+package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing;
+
+import static gtPlusPlus.core.util.data.ArrayUtils.removeNulls;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.lang3.ArrayUtils;
+
+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.objects.GT_RenderedTexture;
+import gregtech.api.util.GT_Recipe;
+import gregtech.api.util.GT_Utility;
+import gregtech.api.util.Recipe_GT;
+import gtPlusPlus.api.objects.Logger;
+import gtPlusPlus.core.block.ModBlocks;
+import gtPlusPlus.core.util.Utils;
+import gtPlusPlus.core.util.minecraft.ItemUtils;
+import gtPlusPlus.core.util.minecraft.PlayerUtils;
+import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
+import gtPlusPlus.xmod.gregtech.common.StaticFields59;
+import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
+import net.minecraft.block.Block;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.ItemStack;
+import net.minecraft.nbt.NBTTagCompound;
+import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
+
+public class GregtechMetaTileEntity_IndustrialDehydrator extends GregtechMeta_MultiBlockBase {
+
+ private static int CASING_TEXTURE_ID;
+ private static String mCasingName = "Vacuum Casing";
+ private int mHeatingCapacity = 0;
+ private boolean mDehydratorMode = false;
+
+ public GregtechMetaTileEntity_IndustrialDehydrator(int aID, String aName, String aNameRegional) {
+ super(aID, aName, aNameRegional);
+ CASING_TEXTURE_ID = TAE.getIndexFromPage(3, 10);
+ mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 10);
+ }
+
+ public GregtechMetaTileEntity_IndustrialDehydrator(String aName) {
+ super(aName);
+ CASING_TEXTURE_ID = TAE.getIndexFromPage(3, 10);
+ mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 10);
+ }
+
+ public IMetaTileEntity newMetaEntity(IGregTechTileEntity aTileEntity) {
+ return new GregtechMetaTileEntity_IndustrialDehydrator(mName);
+ }
+
+ public String[] getTooltip() {
+ if (mCasingName.toLowerCase().contains(".name")) {
+ mCasingName = ItemUtils.getLocalizedNameOfBlock(ModBlocks.blockCasings4Misc, 10);
+ }
+ return new String[] {
+ "Factory Grade Vacuum Furnace",
+ "Can toggle the operation temperature with a Screwdriver",
+ "All Dehydrator recipes are Low Temp recipes",
+ "Speed: 120% | Eu Usage: 50% | Parallel: 4",
+ "Constructed exactly the same as a normal EBF",
+ "Has three layers of coils instead (24)",
+ "Use "+mCasingName+"s (10 at least!)",
+ "Each 900K over the min. Heat Capacity grants 5% speedup (multiplicatively)",
+ "Each 1800K over the min. Heat Capacity allows for one upgraded overclock",
+ "Upgraded overclocks reduce recipe time to 25% and increase EU/t to 400%",
+ };
+ }
+
+ public ITexture[] getTexture(IGregTechTileEntity aBaseMetaTileEntity, byte aSide, byte aFacing, byte aColorIndex,
+ boolean aActive, boolean aRedstone) {
+ if (aSide == aFacing) {
+ return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[CASING_TEXTURE_ID],
+ new GT_RenderedTexture(aActive ? TexturesGtBlock.Overlay_Machine_Controller_Advanced_Active
+ : TexturesGtBlock.Overlay_Machine_Controller_Advanced) };
+ }
+ return new ITexture[] { Textures.BlockIcons.CASING_BLOCKS[CASING_TEXTURE_ID] };
+ }
+
+ public GT_Recipe.GT_Recipe_Map getRecipeMap() {
+ return mDehydratorMode ? Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes : Recipe_GT.Gregtech_Recipe_Map.sVacuumFurnaceRecipes;
+ }
+
+ public boolean isCorrectMachinePart(ItemStack aStack) {
+ return true;
+ }
+
+ public boolean isFacingValid(byte aFacing) {
+ return aFacing > 1;
+ }
+
+
+ public boolean checkMultiblock(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
+ int xDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetX;
+ int zDir = ForgeDirection.getOrientation(aBaseMetaTileEntity.getBackFacing()).offsetZ;
+
+ this.mHeatingCapacity = 0;
+ if (!aBaseMetaTileEntity.getAirOffset(xDir, 1, zDir)) {
+ return false;
+ }
+ if (!aBaseMetaTileEntity.getAirOffset(xDir, 2, zDir)) {
+ return false;
+ }
+ if (!aBaseMetaTileEntity.getAirOffset(xDir, 3, zDir)) {
+ return false;
+ }
+ Block tUsedBlock = aBaseMetaTileEntity.getBlockOffset(xDir + 1, 2, zDir);
+ byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 2, zDir);
+ this.mHeatingCapacity = StaticFields59.getHeatingCapacityForCoil(tUsedBlock, tUsedMeta);
+
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 2; j++) {
+ if ((i != 0) || (j != 0)) {
+ //Coils 1
+ if (!isValidBlockForStructure(null, CASING_TEXTURE_ID, false, aBaseMetaTileEntity.getBlockOffset(xDir + i, 1, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 1, zDir + j), StaticFields59.getBlockCasings5(), tUsedMeta)) {
+ Logger.INFO("Heating Coils missing.");
+ return false;
+ }
+
+ //Coils 2
+ if (!isValidBlockForStructure(null, CASING_TEXTURE_ID, false, aBaseMetaTileEntity.getBlockOffset(xDir + i, 2, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j), StaticFields59.getBlockCasings5(), tUsedMeta)) {
+ Logger.INFO("Heating Coils missing.");
+ return false;
+ }
+
+ //Coils 3
+ if (!isValidBlockForStructure(null, CASING_TEXTURE_ID, false, aBaseMetaTileEntity.getBlockOffset(xDir + i, 3, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 2, zDir + j), StaticFields59.getBlockCasings5(), tUsedMeta)) {
+ Logger.INFO("Heating Coils missing.");
+ return false;
+ }
+ }
+
+ //Top Layer
+ final IGregTechTileEntity tTileEntity2 = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 4, zDir + j);
+ if (!isValidBlockForStructure(tTileEntity2, CASING_TEXTURE_ID, true, aBaseMetaTileEntity.getBlockOffset(xDir + i, 4, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 4, zDir + j), ModBlocks.blockCasings4Misc, 10)) {
+ Logger.INFO("Top Layer missing.");
+ return false;
+ }
+ }
+ }
+ for (int i = -1; i < 2; i++) {
+ for (int j = -1; j < 2; j++) {
+ if ((xDir + i != 0) || (zDir + j != 0)) {
+ IGregTechTileEntity tTileEntity = aBaseMetaTileEntity.getIGregTechTileEntityOffset(xDir + i, 0,zDir + j);
+ if (!isValidBlockForStructure(tTileEntity, CASING_TEXTURE_ID, true, aBaseMetaTileEntity.getBlockOffset(xDir + i, 0, zDir + j), (int) aBaseMetaTileEntity.getMetaIDOffset(xDir + i, 0, zDir + j), ModBlocks.blockCasings4Misc, 10)) {
+ Logger.INFO("Bottom Layer missing.");
+ return false;
+ }
+ }
+ }
+ }
+ return true;
+ }
+
+ public int getMaxEfficiency(ItemStack aStack) {
+ return 10000;
+ }
+
+ public int getPollutionPerTick(ItemStack aStack) {
+ return 25;
+ }
+
+ @Override
+ public boolean hasSlotInGUI() {
+ return true;
+ }
+
+ @Override
+ public String getMachineType() {
+ return "Vacuum Furnace / Dehydrator";
+ }
+
+ @Override
+ public int getMaxParallelRecipes() {
+ return 4;
+ }
+
+ @Override
+ public int getEuDiscountForParallelism() {
+ return 50;
+ }
+
+ @Override
+ public boolean requiresVanillaGtGUI() {
+ return true;
+ }
+
+ @Override
+ public String getCustomGUIResourceName() {
+ return "ElectricBlastFurnace";
+ }
+
+ public boolean checkRecipe(ItemStack aStack) {
+ return checkRecipeGeneric(getMaxParallelRecipes(), getEuDiscountForParallelism(), 120);
+ }
+
+ @Override
+ public boolean checkRecipeGeneric(ItemStack[] aItemInputs, FluidStack[] aFluidInputs, int aMaxParallelRecipes,
+ int aEUPercent, int aSpeedBonusPercent, int aOutputChanceRoll) {
+ // 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));
+ Logger.WARNING("Running checkRecipeGeneric(0)");
+
+ GT_Recipe tRecipe = this.getRecipeMap().findRecipe(getBaseMetaTileEntity(), mLastRecipe, false,
+ gregtech.api.enums.GT_Values.V[tTier], aFluidInputs, aItemInputs);
+
+ Logger.WARNING("Running checkRecipeGeneric(1)");
+ // Remember last recipe - an optimization for findRecipe()
+ this.mLastRecipe = tRecipe;
+
+ if (tRecipe == null || this.mHeatingCapacity < tRecipe.mSpecialValue) {
+ Logger.WARNING("BAD RETURN - 1");
+ return false;
+ }
+
+ if (!this.canBufferOutputs(tRecipe, aMaxParallelRecipes)) {
+ Logger.WARNING("BAD RETURN - 2");
+ return false;
+ }
+
+ // EU discount
+ float tRecipeEUt = (tRecipe.mEUt * aEUPercent) / 100.0f;
+ int tHeatCapacityDivTiers = (mHeatingCapacity - tRecipe.mSpecialValue) / 900;
+ float tTotalEUt = 0.0f;
+
+ int parallelRecipes = 0;
+ // Count recipes to do in parallel, consuming input items and fluids and
+ // considering input voltage limits
+ for (; parallelRecipes < aMaxParallelRecipes && tTotalEUt < (tVoltage - tRecipeEUt); parallelRecipes++) {
+ if (!tRecipe.isRecipeInputEqual(true, aFluidInputs, aItemInputs)) {
+ Logger.WARNING("Broke at " + parallelRecipes + ".");
+ break;
+ }
+ Logger.WARNING("Bumped EU from " + tTotalEUt + " to " + (tTotalEUt + tRecipeEUt) + ".");
+ tTotalEUt += tRecipeEUt;
+ }
+
+ if (parallelRecipes == 0) {
+ Logger.WARNING("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);
+ int rInt = 2;
+
+ this.mEUt = (int) Math.ceil(tTotalEUt);
+
+ this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
+ this.mEfficiencyIncrease = 10000;
+
+ // 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 /= (tHeatCapacityDivTiers >= rInt ? 4 : 2);
+ }
+ }
+
+ if (tHeatCapacityDivTiers > 0) {
+ this.mEUt = (int) (this.mEUt * (Math.pow(0.95, tHeatCapacityDivTiers)));
+ }
+ 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;
+ }
+ }
+
+ // 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;
+ }
+ }
+
+ // 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;
+ }
+ }
+ }
+
+ 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 (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()]);
+
+ // Commit outputs
+ this.mOutputItems = tOutputItems;
+ this.mOutputFluids = tOutputFluids;
+ updateSlots();
+
+ // Play sounds (GT++ addition - GT multiblocks play no sounds)
+ startProcess();
+
+ Logger.WARNING("GOOD RETURN - 1");
+ return true;
+
+ }
+
+ @Override
+ public void onModeChangeByScrewdriver(byte aSide, EntityPlayer aPlayer, float aX, float aY, float aZ) {
+ mDehydratorMode = Utils.invertBoolean(mDehydratorMode);
+ String aMode = mDehydratorMode ? "Dehydrator" : "Vacuum Furnace";
+ PlayerUtils.messagePlayer(aPlayer, "Mode: "+aMode);
+ }
+
+ @Override
+ public void saveNBTData(NBTTagCompound aNBT) {
+ super.saveNBTData(aNBT);
+ aNBT.setBoolean("mDehydratorMode", mDehydratorMode);
+ }
+
+ @Override
+ public void loadNBTData(NBTTagCompound aNBT) {
+ super.loadNBTData(aNBT);
+ mDehydratorMode = aNBT.getBoolean("mDehydratorMode");
+ }
+
+}
+
+
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 7c57f799d7..38306d914d 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
@@ -120,7 +120,7 @@ extends GregtechMeta_MultiBlockBase {
@Override
protected boolean doesMachineBoostOutput() {
- return true;
+ return false;
}
@Override
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 ac362e2c40..dd00c9731d 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
@@ -28,6 +28,7 @@ import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.StaticFields59;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
+import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
@@ -171,68 +172,9 @@ public class GregtechMetaTileEntity_Adv_EBF extends GregtechMeta_MultiBlockBase
CASING_TEXTURE_ID)) {
return false;
}*/
+ Block tUsedBlock = aBaseMetaTileEntity.getBlockOffset(xDir + 1, 2, zDir);
byte tUsedMeta = aBaseMetaTileEntity.getMetaIDOffset(xDir + 1, 2, zDir);
-
- if (!CORE.GTNH) {
- switch (tUsedMeta) {
- case 0:
- this.mHeatingCapacity = 1800;
- break;
- case 1:
- this.mHeatingCapacity = 2700;
- break;
- case 2:
- this.mHeatingCapacity = 3600;
- break;
- case 3:
- this.mHeatingCapacity = 4500;
- break;
- case 4:
- this.mHeatingCapacity = 5400;
- break;
- case 5:
- this.mHeatingCapacity = 7200;
- break;
- case 6:
- this.mHeatingCapacity = 9001;
- break;
- default:Logger.INFO("Heating Coils are bad.");
- return false;
- }
- } else {
- switch (tUsedMeta) {
- case 0:
- this.mHeatingCapacity = 1801;
- break;
- case 1:
- this.mHeatingCapacity = 2701;
- break;
- case 2:
- this.mHeatingCapacity = 3601;
- break;
- case 3:
- this.mHeatingCapacity = 4501;
- break;
- case 4:
- this.mHeatingCapacity = 5401;
- break;
- case 5:
- this.mHeatingCapacity = 7201;
- break;
- case 6:
- this.mHeatingCapacity = 9001;
- break;
- case 7:
- this.mHeatingCapacity = 9901;
- break;
- case 8:
- this.mHeatingCapacity = 10801;
- break;
- default:
- Logger.INFO("Heating Coils are bad.");
- return false;
- }
- }
+ this.mHeatingCapacity = StaticFields59.getHeatingCapacityForCoil(tUsedBlock, tUsedMeta);
for (int i = -1; i < 2; i++) {
for (int j = -1; j < 2; j++) {
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 5ab9cd9795..c55fe10829 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
@@ -7,6 +7,7 @@ import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.MetaTileEntity;
+import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_InputBus;
import gregtech.api.objects.GT_RenderedTexture;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_Recipe;
@@ -19,6 +20,7 @@ import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.Gregtech
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;
@@ -68,13 +70,29 @@ extends GregtechMeta_MultiBlockBase
@Override
public int getDamageToComponent(ItemStack aStack){
- Logger.INFO("Trying to damage component.");
+ //log("Trying to damage component.");
return ItemList.Component_LavaFilter.get(1L).getClass().isInstance(aStack) ? 1 : 0;
}
+
+ private static Item mLavaFilter;
@Override
- public boolean checkRecipe(final ItemStack aStack) {
+ public boolean checkRecipe(ItemStack aStack) {
this.mSuperEfficencyIncrease=0;
+
+ if (mLavaFilter == null) {
+ mLavaFilter = ItemList.Component_LavaFilter.getItem();
+ }
+
+ //Try reload new Lava Filter
+ if (aStack == null) {
+ ItemStack uStack = this.findItemInInventory(mLavaFilter);
+ if (uStack != null) {
+ this.setGUIItemStack(uStack);
+ aStack = this.getGUIItemStack();
+ }
+ }
+
for (GT_Recipe tRecipe : Recipe_GT.Gregtech_Recipe_Map.sThermalFuels.mRecipeList) {
FluidStack tFluid = tRecipe.mFluidInputs[0];
@@ -85,7 +103,7 @@ extends GregtechMeta_MultiBlockBase
this.mEfficiencyIncrease = (this.mMaxProgresstime * getEfficiencyIncrease());
int loot_MAXCHANCE = 100000;
- if (ItemList.Component_LavaFilter.get(1L).getClass().isInstance(aStack)) {
+ if (mLavaFilter.getClass().isInstance(aStack.getItem())) {
if ((tRecipe.getOutput(0) != null) && (getBaseMetaTileEntity().getRandomNumber(loot_MAXCHANCE) < tRecipe.getOutputChance(0))) {
this.mOutputItems = new ItemStack[] { GT_Utility.copy(new Object[] { tRecipe.getOutput(0) }) };
@@ -199,8 +217,9 @@ extends GregtechMeta_MultiBlockBase
"Size: 3x3x3 (Hollow)",
"Thermal Containment Casings (10 at least!)",
"Controller (front middle)",
- "2x Input Hatch",
+ "2x Input Hatch (Water/Thermal Fluid)",
"1x Output Hatch (Steam)",
+ "1x Input Bus (Supplies controller with Lava Filters, optional)",
"1x Output Bus (Filter results, optional)",
};
}
@@ -234,7 +253,7 @@ extends GregtechMeta_MultiBlockBase
if (!isValidBlockForStructure(tTileEntity, 1, true, aBlock, aMeta,
ModBlocks.blockCasings2Misc, 11)) {
- Logger.INFO("Bad Thermal Boiler casing");
+ log("Bad Thermal Boiler casing");
return false;
}
++tAmount;
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 5791cfbf73..33555c8f51 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
@@ -2,7 +2,6 @@ package gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production;
import java.util.concurrent.ScheduledExecutorService;
-import gregtech.api.GregTech_API;
import gregtech.api.enums.Materials;
import gregtech.api.enums.TAE;
import gregtech.api.enums.Textures;
@@ -19,9 +18,7 @@ import gtPlusPlus.api.objects.data.AutoMap;
import gtPlusPlus.api.objects.minecraft.ThreadFakeWorldGenerator;
import gtPlusPlus.core.block.ModBlocks;
import gtPlusPlus.core.util.math.MathUtils;
-import gtPlusPlus.core.util.minecraft.EnergyUtils;
import gtPlusPlus.core.util.minecraft.EnergyUtils.EU;
-import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.xmod.gregtech.api.metatileentity.implementations.base.GregtechMeta_MultiBlockBase;
import gtPlusPlus.xmod.gregtech.common.blocks.textures.TexturesGtBlock;
@@ -31,7 +28,6 @@ import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.ForgeDirection;
-import net.minecraftforge.fluids.FluidStack;
public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase {
@@ -105,6 +101,7 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase
}
return new String[]{
+ "[WIP] Disabled",
"Converts EU to Oak Logs",
"Speed: Very Fast | Eu Usage: 100% | Parallel: 1",
"Requires a Saw, Buzz Saw or Chainsaw in GUI slot",
@@ -152,6 +149,12 @@ public class GregtechMetaTileEntityTreeFarm extends GregtechMeta_MultiBlockBase
}
public boolean checkRecipe(final ItemStack aStack) {
+
+ if (true) {
+ return false;
+ }
+
+
//Logger.WARNING("Trying to process virtual tree farming");
if (mTreeData != null) {
//Logger.WARNING("Tree Data is valid");
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java
index d264a759ec..736d0bc389 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tileentities/machines/multi/production/bedrock/GregtechMetaTileEntity_BedrockMiningPlatformBase.java
@@ -106,6 +106,11 @@ public abstract class GregtechMetaTileEntity_BedrockMiningPlatformBase extends G
public boolean checkRecipe(final ItemStack aStack) {
//this.setElectricityStats();
+
+ if (true) {
+ return false;
+ }
+
boolean[] didWork = new boolean[5];
if (!this.tryConsumeDrillingFluid()) {
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java
index 36e1161e83..395a7c42cb 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/common/tools/TOOL_Gregtech_ElectricLighter.java
@@ -150,7 +150,7 @@ extends GT_Tool {
@Override
public IChatComponent getDeathMessage(final EntityLivingBase aPlayer, final EntityLivingBase aEntity) {
- return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been prodded out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
+ return new ChatComponentText(EnumChatFormatting.RED + aEntity.getCommandSenderName() + EnumChatFormatting.WHITE + " has been burnt out of existence by " + EnumChatFormatting.GREEN + aPlayer.getCommandSenderName() + EnumChatFormatting.WHITE);
}
@Override
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
index 461ac256f4..d8a5617b2e 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_DustGeneration.java
@@ -20,7 +20,6 @@ import gtPlusPlus.core.material.state.MaterialState;
import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.math.MathUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
-import gtPlusPlus.core.util.minecraft.MaterialUtils;
import gtPlusPlus.core.util.minecraft.RecipeUtils;
import net.minecraftforge.fluids.FluidStack;
@@ -193,16 +192,18 @@ public class RecipeGen_DustGeneration extends RecipeGen_Base {
if (x != null){
if (x.getStackMaterial() != null){
if (x.getStackMaterial().getDust(1) == null){
- if (x.getStackMaterial().getState() == MaterialState.GAS || x.getStackMaterial().getState() == MaterialState.LIQUID || x.getStackMaterial().getState() == MaterialState.PURE_LIQUID){
+ if (x.getStackMaterial().getState() != MaterialState.SOLID && x.getStackMaterial().getState() != MaterialState.ORE && x.getStackMaterial().getState() != MaterialState.PLASMA){
oxygen = x.getStackMaterial().getFluid(1000);
+ break;
}
}
}
}
}
}
-
}
+
+ input = ItemUtils.cleanItemStackArray(input);
//Add mixer Recipe
if (GT_Values.RA.addMixerRecipe(
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java
index f705ac9673..007f390112 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/loaders/RecipeGen_Plates.java
@@ -41,7 +41,9 @@ public class RecipeGen_Plates extends RecipeGen_Base {
final ItemStack shape_Mold = ItemList.Shape_Mold_Plate.get(0);
final ItemStack plate_Single = material.getPlate(1);
final ItemStack plate_SingleTwo = material.getPlate(2);
+ final ItemStack plate_SingleNine = material.getPlate(9);
final ItemStack plate_Double = material.getPlateDouble(1);
+ final ItemStack block = material.getBlock(1);
Logger.WARNING("Generating Plate recipes for "+material.getLocalizedName());
@@ -82,6 +84,19 @@ public class RecipeGen_Plates extends RecipeGen_Base {
else {
Logger.WARNING("Alloy Smelter Recipe: "+material.getLocalizedName()+" - Failed");
}
+ //Cutting Machine
+ if (ItemUtils.checkForInvalidItems(block) && ItemUtils.checkForInvalidItems(plate_Single))
+ if (GT_Values.RA.addCutterRecipe(
+ block,
+ null,
+ plate_SingleNine,
+ (int) Math.max(material.getMass() * 10L, 1L),
+ material.vVoltageMultiplier)){
+ Logger.WARNING("Cutting Machine Recipe: "+material.getLocalizedName()+" - Success");
+ }
+ else {
+ Logger.WARNING("ACutting Machine Recipe: "+material.getLocalizedName()+" - Failed");
+ }
//Making Double Plates
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
index d16bffef86..7ef3b0b6dd 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/recipes/GregtechRecipeAdder.java
@@ -12,7 +12,6 @@ import gregtech.api.enums.Materials;
import gregtech.api.interfaces.internal.IGT_RecipeAdder;
import gregtech.api.util.CustomRecipeMap;
import gregtech.api.util.GT_Recipe;
-import gregtech.api.util.GT_Recipe.GT_Recipe_AssemblyLine;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.Recipe_GT;
import gregtech.api.util.SemiFluidFuelHandler;
@@ -23,7 +22,6 @@ import gtPlusPlus.core.lib.LoadedMods;
import gtPlusPlus.core.material.MaterialGenerator;
import gtPlusPlus.core.recipe.common.CI;
import gtPlusPlus.core.util.data.ArrayUtils;
-import gtPlusPlus.core.util.minecraft.FluidUtils;
import gtPlusPlus.core.util.minecraft.ItemUtils;
import gtPlusPlus.core.util.reflect.ReflectionUtils;
import gtPlusPlus.xmod.gregtech.api.interfaces.internal.IGregtech_RecipeAdder;
@@ -35,951 +33,953 @@ import net.minecraftforge.oredict.OreDictionary;
public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
- @Override
- public boolean addCokeOvenRecipe(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput,
- final FluidStack aFluidOutput, final ItemStack aOutput, int aDuration, final int aEUt) {
- try {
- try {
- // RECIPEHANDLER_CokeOven.debug1();
- if (((aInput1 == null) /* && (aFluidInput == null) */)
- || ((aOutput == null) || (aFluidOutput == null))) {
- // Utils.LOG_WARNING("aInput1:"+aInput1.toString()+"
- // aInput2:"+aInput2.toString()+"
- // aFluidInput:"+aFluidInput.toString()+"
- // aFluidOutput:"+aFluidOutput.toString()+"
- // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+"
- // aEU/t:"+aEUt);
- Logger.WARNING("Something was null, returning false");
- return false;
- }
-
- }
- catch (final NullPointerException e) {
- e.getStackTrace();
- }
- try {
- // RECIPEHANDLER_CokeOven.debug2(aInput1, aInput2, aFluidInput,
- // aFluidOutput, aOutput, aDuration, aEUt);
- if ((aOutput != null)
- && ((aDuration = GregTech_API.sRecipeFile.get("cokeoven", aOutput, aDuration)) <= 0)) {
- // Utils.LOG_WARNING("aInput1:"+aInput1.toString()+"
- // aInput2:"+aInput2.toString()+"
- // aFluidInput:"+aFluidInput.toString()+"
- // aFluidOutput:"+aFluidOutput.toString()+"
- // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+"
- // aEU/t:"+aEUt);
- Logger.WARNING("Something was null, returning false");
- return false;
- }
-
- }
- catch (final NullPointerException e) {
- e.getStackTrace();
- }
- try {
- // RECIPEHANDLER_CokeOven.debug3(aInput1, aInput2, aFluidInput,
- // aFluidOutput, aOutput, aDuration, aEUt);
- if ((aFluidOutput == null) || ((aDuration = GregTech_API.sRecipeFile.get("cokeoven",
- aFluidOutput.getFluid().getName(), aDuration)) <= 0)) {
- // Utils.LOG_WARNING("aInput1:"+aInput1.toString()+"
- // aInput2:"+aInput2.toString()+"
- // aFluidInput:"+aFluidInput.toString()+"
- // aFluidOutput:"+aFluidOutput.toString()+"
- // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+"
- // aEU/t:"+aEUt);
- Logger.WARNING("Something was null, returning false");
- return false;
- }
-
- }
- catch (final NullPointerException e) {
- e.getStackTrace();
- }
- try {
- // RECIPEHANDLER_CokeOven.debug4(aInput1, aInput2, aFluidInput,
- // aFluidOutput, aOutput, aDuration, aEUt);
- if (aFluidInput == null && aInput2 != null) {
- Recipe_GT.Gregtech_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[] { aInput1, aInput2 },
- new ItemStack[] { aOutput }, null, null, null, new FluidStack[] { aFluidOutput }, aDuration,
- aEUt, 0);
- }
- else if (aFluidInput == null && aInput2 == null) {
- Recipe_GT.Gregtech_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[] { aInput1 },
- new ItemStack[] { aOutput }, null, null, null, new FluidStack[] { aFluidOutput }, aDuration,
- aEUt, 0);
- }
- else {
- Recipe_GT.Gregtech_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[] { aInput1, aInput2 },
- new ItemStack[] { aOutput }, null, null, new FluidStack[] { aFluidInput },
- new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0);
- }
- // RECIPEHANDLER_CokeOven.debug5(aInput1, aInput2, aFluidInput,
- // aFluidOutput, aOutput, aDuration, aEUt);
-
- return true;
-
- }
- catch (final NullPointerException e) {
- Logger.WARNING("Something was null, returning false");
- return false;
- }
- }
- catch (final Throwable e) {
- // Logger.WARNING("aInput1:"+aInput1.toString()+"
- // aInput2:"+aInput2.toString()+"
- // aFluidInput:"+aFluidInput.toString()+"
- // aFluidOutput:"+aFluidOutput.toString()+"
- // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+"
- // aEU/t:"+aEUt);
- Logger.WARNING("Failed.");
- e.getStackTrace();
- return false;
- }
- }
-
- @Override
- public boolean addMatterFabricatorRecipe(final FluidStack aFluidInput, final FluidStack aFluidOutput,
- final int aDuration, final int aEUt) {
- try {
- try {
- // RECIPEHANDLER_MatterFabricator.debug1();
- if (aFluidOutput == null) {
- // Utils.LOG_WARNING("aFluidInput:"+aFluidInput.toString()+"
- // aFluidOutput:"+aFluidOutput.toString()+"
- // aDuration:"+aDuration+" aEU/t:"+aEUt);
- Logger.WARNING("Something was null, returning false");
- return false;
- }
-
- }
- catch (final NullPointerException e) {
- e.getStackTrace();
- }
- try {
-
- // RECIPEHANDLER_MatterFabricator.debug4(aFluidInput,
- // aFluidOutput, aDuration, aEUt);
- if (aFluidInput == null) {
- // Recipe_GT.Gregtech_Recipe_Map.sMatterFabRecipes.addRecipe(true,
- // null, new FluidStack[]{aFluidOutput}, aDuration, aEUt,
- // 0);
- Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.addRecipe(true, null, null, null, null,
- new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0);
- }
- else {
- // Recipe_GT.Gregtech_Recipe_Map.sMatterFabRecipes.addRecipe(true,
- // new FluidStack[]{aFluidInput}, new
- // FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
- Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.addRecipe(true, null, null, null,
- new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0);
- }
- RECIPEHANDLER_MatterFabricator.debug5(aFluidInput, aFluidOutput, aDuration, aEUt);
-
- return true;
-
- }
- catch (final NullPointerException e) {
- return false;
- }
- }
- catch (final Throwable e) {
- // Utils.LOG_WARNING("aFluidInput:"+aFluidInput.toString()+"
- // aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+"
- // aEU/t:"+aEUt);
- Logger.WARNING("Failed.");
- e.getStackTrace();
- return false;
- }
- }
-
- @Override
- public boolean addMatterFabricatorRecipe(final ItemStack aInputStack, final FluidStack aFluidInput,
- final FluidStack aFluidOutput, final int aDuration, final int aEUt) {
- try {
- try {
- if ((aFluidOutput == null) || (aInputStack == null)) {
- return false;
- }
- }
- catch (final NullPointerException e) {
- }
- try {
- if (aFluidInput == null) {
- Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.addRecipe(true, new ItemStack[] { aInputStack },
- null, null, null, new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0);
- }
- else {
- Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.addRecipe(true, new ItemStack[] { aInputStack },
- null, null, new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput }, aDuration,
- aEUt, 0);
- }
- RECIPEHANDLER_MatterFabricator.debug5(aFluidInput, aFluidOutput, aDuration, aEUt);
- return true;
- }
- catch (final NullPointerException e) {
- return false;
- }
- }
- catch (final Throwable e) {
- return false;
- }
- }
-
- @Override
- public boolean addFuel(final ItemStack aInput1, final ItemStack aOutput1, final int aEU, final int aType) {
- if (aInput1 == null) {
- Logger.WARNING("Fuel Input is Invalid.");
- return false;
- }
- // new GregtechRecipe(aInput1, aOutput1,
- // GregTech_API.sRecipeFile.get("fuel_" + aType, aInput1, aEU), aType);
- return true;
- }
-
- /*
- * @Override public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack
- * aItemB, FluidStack aFluid, ItemStack[] aOutputItems, FluidStack
- * aOutputFluid, int aDuration, int aEUt) { if ((aItemA == null) || (aItemB
- * == null) || (aOutputItems == null)) { return false; } for (ItemStack
- * tStack : aOutputItems) { if (tStack != null) { if ((aDuration =
- * GregTech_API.sRecipeFile.get("dehydrator", aItemA, aDuration)) <= 0) {
- * return false; }
- * Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true,
- * new ItemStack[]{aItemA, aItemB}, aOutputItems, null, null, null,
- * aDuration, aEUt, 0); RECIPEHANDLER_Dehydrator.debug5(aItemA, aItemB,
- * aFluid, aOutputFluid, aOutputItems, aDuration, aEUt); return true; } }
- * return false; }
- * @Override public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack
- * aItemB, ItemStack[] aOutputItems, int aDuration, int aEUt) { if ((aItemA
- * == null) || (aItemB == null) || (aOutputItems == null)) { return false; }
- * if ((aDuration = GregTech_API.sRecipeFile.get("dehydrator", aItemA,
- * aDuration)) <= 0) { return false; }
- * Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true,
- * new ItemStack[]{aItemA, aItemB}, aOutputItems, null, null, null,
- * aDuration, aEUt, 0); RECIPEHANDLER_Dehydrator.debug5(aItemA, aItemB,
- * null, null, aOutputItems, aDuration, aEUt); return true; }
- * @Override public boolean addDehydratorRecipe(FluidStack aFluid,
- * FluidStack aOutputFluid, ItemStack[] aOutputItems, int aDuration, int
- * aEUt){ if ((aFluid == null) || (aOutputFluid == null || aOutputItems ==
- * null)) { return false; } if ((aDuration =
- * GregTech_API.sRecipeFile.get("dehydrator", aFluid.getUnlocalizedName(),
- * aDuration)) <= 0) { return false; }
- * Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true,
- * null, aOutputItems, null, new FluidStack[]{aFluid}, new
- * FluidStack[]{aOutputFluid}, aDuration, aEUt, 0);
- * RECIPEHANDLER_Dehydrator.debug5(null, null, aFluid, aOutputFluid,
- * aOutputItems, aDuration, aEUt); return true; }
- */
-
- @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.");
- try {
- if ((aInput == null) || (aFluid == null) || (aOutput == null)) {
- return false;
- }
- if ((aDuration = GregTech_API.sRecipeFile.get("dehydrator", aInput, aDuration)) <= 0) {
- return false;
- }
- Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, new ItemStack[] { aInput },
- aOutput, null, new FluidStack[] { aFluid }, null, aDuration, aEUt, 0);
- // RECIPEHANDLER_Dehydrator.debug5(aInput, null, aFluid, null,
- // aOutput, aDuration, aEUt);
- return true;
- }
- catch (final NullPointerException e) {
- Logger.WARNING("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");
- return false;
- }
- }
-
- @Override
- public boolean addDehydratorRecipe(final ItemStack[] aInput, final FluidStack aFluidInput,
- final FluidStack aFluidOutput, final ItemStack[] aOutputItems, final int[] aChances, int aDuration,
- 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 (aFluidInput != null) {
- Logger.WARNING("Recipe requires input: " + aFluidInput.getFluid().getName() + " " + aFluidInput.amount
- + "mbst");
- }
- 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)) {
- 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());
- }
-
- if (aInput.length == 1) {
- Logger.WARNING("Dehydrator recipe only has a single input item.");
- Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, aInput, aOutputItems, null,
- aChances, new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput }, aDuration, aEUt,
- 0);
-
- }
- else {
- Logger.WARNING("Dehydrator recipe has two input items.");
- Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, aInput, aOutputItems, null,
- aChances, new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput }, aDuration, aEUt,
- 0);
-
- }
-
- return true;
- }
- catch (final NullPointerException e) {
- Logger.WARNING("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");
- return false;
- }
- }
-
- @Override
- public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aOutput, final int aChance, int aDuration,
- final int aEUt) {
- return addBlastSmelterRecipe(aInput, null, aOutput, new ItemStack[] {}, aChance, aDuration, aEUt, 3700);
- }
-
- @Override
- public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput,
- final int aChance, int aDuration, final int aEUt) {
- return addBlastSmelterRecipe(aInput, aInputFluid, aOutput, new ItemStack[] {}, aChance, aDuration, aEUt, 3700);
- }
-
- @Override
- public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack,
- final int aChance, int aDuration, final int aEUt) {
- return addBlastSmelterRecipe(aInput, aInputFluid, aOutput, aOutputStack, aChance, aDuration, aEUt, 3700);
- }
-
- @Override
- public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, int aChance,
- int aDuration, int aEUt, int aSpecialValue) {
- return addBlastSmelterRecipe(aInput, aInputFluid, aOutput, new ItemStack[] {}, aChance, aDuration, aEUt, aSpecialValue);
- }
-
- @Override
- public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack, int aChance,
- int aDuration, int aEUt, int aSpecialValue) {
- if ((aInput == null) || (aOutput == null)) {
- Logger.WARNING("Fail - Input or Output was null.");
- return false;
- }
-
- if (aOutput.isFluidEqual(Materials.PhasedGold.getMolten(1))) {
- aOutput = Materials.VibrantAlloy.getMolten(aOutput.amount);
- }
- if (aOutput.isFluidEqual(Materials.PhasedIron.getMolten(1))) {
- aOutput = Materials.PulsatingIron.getMolten(aOutput.amount);
- }
- if ((aDuration = GregTech_API.sRecipeFile.get("blastsmelter", aOutput.getFluid().getName(), aDuration)) <= 0) {
- Logger.WARNING("Recipe did not register.");
- return false;
- }
-
- for (int das = 0; das < aInput.length; das++) {
- if (aInput[das] != null) {
- Logger.WARNING("tMaterial[" + das + "]: " + aInput[das].getDisplayName() + ", Amount: "
- + aInput[das].stackSize);
- }
- }
-
- ArrayUtils.removeNulls(aInput);
- if (aInput.length <= 1) {
- return false;
- }
-
- Recipe_GT.Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes.addRecipe(true, aInput, aOutputStack, null,
- new int[] {}, new FluidStack[] { aInputFluid }, new FluidStack[] { aOutput }, aDuration, aEUt,
- aSpecialValue);
- return true;
- }
-
- @Override
- public boolean addLFTRRecipe(final ItemStack aInput1, final FluidStack aInput2, final ItemStack aOutput1,
- final FluidStack aOutput2, final int aDuration, final int aEUt) {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
- public boolean addLFTRRecipe(final ItemStack aInput1, final ItemStack aInput2, final ItemStack aOutput1,
- final int aDuration, final int aEUt) {
- return false;
- }
-
- @Override
- public boolean addLFTRRecipe(final FluidStack aInput1, final FluidStack aInput2, final FluidStack aOutput1,
- final int aDuration, final int aEUt) {
- if ((aInput1 == null) || (aInput2 == null) || (aOutput1 == null) || (aDuration < 1) || (aEUt < 1)) {
- return false;
- }
- Recipe_GT.Gregtech_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.addRecipe(null,
- 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) {
-
- if ((aInput1 == null) || (aInput2 == 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 };
- // Recipe_GT.Gregtech_Recipe_Map.sFissionFuelProcessing.addRecipe(null,
- // inputs, outputs, aDuration, aEUt, 0);
- CustomRecipeMap.sFissionFuelProcessing.addRecipe(null, inputs, outputs, aDuration, aEUt, 0);
- return true;
- }
-
- @Override
- public boolean addCyclotronRecipe(ItemStack aInputs, FluidStack aFluidInput, ItemStack[] aOutputs,
- FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue) {
- return addCyclotronRecipe(new ItemStack[] {aInputs}, aFluidInput, aOutputs, aFluidOutput, aChances, aDuration, aEUt, aSpecialValue);
- }
-
- @Override
- public boolean addCyclotronRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack[] aOutput,
- FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue) {
- if (aOutput == null || aOutput.length < 1 || !ItemUtils.checkForInvalidItems(aOutput)) {
- return false;
- }
- if (Recipe_GT.Gregtech_Recipe_Map.sCyclotronRecipes.addRecipe(true, aInputs, aOutput,
- null, aChances, new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput },
- Math.max(1, aDuration), Math.max(1, aEUt), aSpecialValue) != null) {
- return true;
- }
-
- return false;
- }
-
- @Override
- public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4,
- FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3,
- ItemStack aOutput4, int aDuration, int aEUt) {
- if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) {
- return false;
- }
- if ((aOutput1 != null)
- && ((aDuration = GregTech_API.sRecipeFile.get("advancedmixer", aOutput1, aDuration)) <= 0)) {
- return false;
- }
- if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("advancedmixer",
- aFluidOutput.getFluid().getName(), aDuration)) <= 0)) {
- return false;
- }
- Recipe_GT.Gregtech_Recipe_Map.sAdvancedMixerRecipes.addRecipe(true,
- new ItemStack[] { aInput1, aInput2, aInput3, aInput4 },
- new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4 }, null, null,
- new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0);
- return true;
- }
-
- // Machine Component Assembler
- @Override
- public boolean addComponentMakerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1,
- int aDuration, int aEUt) {
- if (areItemsAndFluidsBothNull(aInputs, new FluidStack[] { aFluidInput })) {
- return false;
- }
- if (aOutput1 == null) {
- return false;
- }
- if ((aDuration = GregTech_API.sRecipeFile.get("machinecomponents", aOutput1, aDuration)) <= 0) {
- return false;
- }
- if (GTNH) {
- return false;
- }
- Recipe_GT.Gregtech_Recipe_Map.sComponentAssemblerRecipes.addRecipe(true, aInputs, new ItemStack[] { aOutput1 },
- null, new FluidStack[] { aFluidInput }, null, aDuration, aEUt, 0);
- return true;
- }
-
-
- public boolean addMultiblockCentrifugeRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial){
- if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) {
- return false;
- }
-
- if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) {
- Logger.INFO("[Recipe] Error generating Large Centrifuge recipe.");
- Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs));
- Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aFluidInputs));
- Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs));
- Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs));
- return false;
- }
- Recipe_GT.Gregtech_Recipe_Map.sMultiblockCentrifugeRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial);
- return true;
- }
-
- public boolean addMultiblockElectrolyzerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial){
- if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) {
- return false;
- }
- if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) {
- Logger.INFO("[Recipe] Error generating Large Electrolyzer recipe.");
- Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs));
- Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aFluidInputs));
- Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs));
- Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs));
- return false;
- }
- Recipe_GT.Gregtech_Recipe_Map.sMultiblockElectrolyzerRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial);
- return true;
- }
-
-
- public boolean addAdvancedFreezerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial) {
- if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) {
- return false;
- }
-
- if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) {
- Logger.INFO("[Recipe] Error generating Adv. Vac Freezer recipe.");
- Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs));
- Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aFluidInputs));
- Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs));
- Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs));
- return false;
- }
- if (Recipe_GT.Gregtech_Recipe_Map.sAdvFreezerRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial) != null) {
- return true;
- }
- return false;
-
- }
-
- public boolean addAssemblerRecipeWithOreDict(Object aInput1, int aAmount1, Object aInput2, int aAmount2, ItemStack aOutput, int a1, int a2) {
- if (aInput1 instanceof String || aInput2 instanceof String) {
- int mCompleted = 0;
- if (aInput1 instanceof String && aInput2 instanceof String) {
- List<ItemStack> x = OreDictionary.getOres((String) aInput1, false);
- List<ItemStack> x1 = OreDictionary.getOres((String) aInput2, false);
- if (x != null && x.size() > 0 && x1 != null && x1.size() > 0) {
- for (ItemStack r : x) {
- r.stackSize = aAmount1;
- for (ItemStack r1 : x1) {
- r1.stackSize = aAmount2;
- if (GT_Values.RA.addAssemblerRecipe(r, r1, aOutput, a1, a2)) {
- mCompleted++;
- }
- }
- }
- }
- }
- else if (aInput1 instanceof String) {
- List<ItemStack> x = OreDictionary.getOres((String) aInput1, false);
- if (x != null && x.size() > 0) {
- for (ItemStack r : x) {
- r.stackSize = aAmount1;
- if (GT_Values.RA.addAssemblerRecipe(r, (ItemStack) aInput2, aOutput, a1, a2)) {
- mCompleted++;
- }
- }
- }
-
- }
- else {
- List<ItemStack> x = OreDictionary.getOres((String) aInput2, false);
- if (x != null && x.size() > 0) {
- for (ItemStack r : x) {
- r.stackSize = aAmount1;
- if (GT_Values.RA.addAssemblerRecipe((ItemStack) aInput1, r, aOutput, a1, a2)) {
- mCompleted++;
- }
- }
- }
- }
- return mCompleted > 0;
- }
- else {
- return GT_Values.RA.addAssemblerRecipe((ItemStack) aInput1, (ItemStack) aInput2, aOutput, a1, a2);
- }
- }
-
- public boolean addAssemblerRecipeWithOreDict(Object aInput1, int aAmount1, Object aInput2, int aAmount2, FluidStack aInputFluid, ItemStack aOutput, int a1, int a2) {
- if (aInput1 instanceof String || aInput2 instanceof String) {
- int mCompleted = 0;
- if (aInput1 instanceof String && aInput2 instanceof String) {
- List<ItemStack> x = OreDictionary.getOres((String) aInput1, false);
- List<ItemStack> x1 = OreDictionary.getOres((String) aInput2, false);
- if (x != null && x.size() > 0 && x1 != null && x1.size() > 0) {
- for (ItemStack r : x) {
- r.stackSize = aAmount1;
- for (ItemStack r1 : x1) {
- r1.stackSize = aAmount2;
- if (GT_Values.RA.addAssemblerRecipe(r, r1, aInputFluid, aOutput, a1, a2)) {
- mCompleted++;
- }
- }
- }
- }
- }
- else if (aInput1 instanceof String) {
- List<ItemStack> x = OreDictionary.getOres((String) aInput1, false);
- if (x != null && x.size() > 0) {
- for (ItemStack r : x) {
- r.stackSize = aAmount1;
- if (GT_Values.RA.addAssemblerRecipe(r, (ItemStack) aInput2, aInputFluid, aOutput, a1, a2)) {
- mCompleted++;
- }
- }
- }
-
- }
- else {
- List<ItemStack> x = OreDictionary.getOres((String) aInput2, false);
- if (x != null && x.size() > 0) {
- for (ItemStack r : x) {
- r.stackSize = aAmount1;
- if (GT_Values.RA.addAssemblerRecipe((ItemStack) aInput1, r, aInputFluid, aOutput, a1, a2)) {
- mCompleted++;
- }
- }
- }
- }
- return mCompleted > 0;
- }
- else {
- return GT_Values.RA.addAssemblerRecipe((ItemStack) aInput1, (ItemStack) aInput2, aInputFluid, aOutput, a1, a2);
- }
- }
-
- /*
- * Reflection Based Recipe Additions with Fallbacks
- */
-
- private static final Method mSixSlotAssembly;
- private static final Method mAssemblyLine;
- private static final Method mScannerTT;
- private static final Method[] mChemicalRecipe = new Method[3];
- private static final Method mLargeChemReactor;
-
- static {
-
- //Get GT's RA class;
- Class<? extends IGT_RecipeAdder> clazz = GT_Values.RA.getClass();
-
- mChemicalRecipe[0] = ReflectionUtils.getMethod(clazz, "addChemicalRecipe", ItemStack.class, ItemStack.class, FluidStack.class, FluidStack.class, ItemStack.class, int.class);
-
-
- if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH) {
- //6 Slot Assembler
- mSixSlotAssembly = ReflectionUtils.getMethod(clazz, "addAssemblerRecipe", ItemStack[].class, FluidStack.class, ItemStack.class, int.class, int.class);
- //Assembly Line
- mAssemblyLine = ReflectionUtils.getMethod(clazz, "addAssemblylineRecipe", ItemStack.class, int.class, ItemStack[].class, FluidStack[].class, ItemStack.class, int.class, int.class);
-
-
- Method T = null;
- if (LoadedMods.TecTech) {
- Class TTRecipeAdder = ReflectionUtils.getClass("com.github.technus.tectech.recipe.TT_recipeAdder");
- if (TTRecipeAdder != null) {
- Method ttTest = ReflectionUtils.getMethod(TTRecipeAdder, "addResearchableAssemblylineRecipe",
- ItemStack.class, int.class, int.class, int.class, int.class, Object[].class,
- FluidStack[].class, ItemStack.class, int.class, int.class);
- if (ttTest != null) {
- T = ttTest;
- }
- }
- }
- else {
- T = null;
- }
- mScannerTT = T;
-
- mChemicalRecipe[1] = ReflectionUtils.getMethod(clazz, "addChemicalRecipe", ItemStack.class, ItemStack.class, FluidStack.class, FluidStack.class, ItemStack.class, int.class, int.class);
- mChemicalRecipe[2] = ReflectionUtils.getMethod(clazz, "addChemicalRecipe", ItemStack.class, ItemStack.class, FluidStack.class, FluidStack.class, ItemStack.class, ItemStack.class, int.class);
-
- mLargeChemReactor = ReflectionUtils.getMethod(clazz, "addMultiblockChemicalRecipe", ItemStack[].class, FluidStack[].class, FluidStack[].class, ItemStack[].class, int.class, int.class);
-
-
-
- }
- else {
- mSixSlotAssembly = null;
- mAssemblyLine = null;
- mLargeChemReactor = null;
- mScannerTT = null;
- }
-
-
- }
-
-
-
-
-
-
- public boolean addSixSlotAssemblingRecipe(ItemStack[] aInputs, FluidStack aInputFluid, ItemStack aOutput1, int aDuration, int aEUt) {
- if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH) {
- if (mSixSlotAssembly != null) {
- try {
- return (boolean) mSixSlotAssembly.invoke(GT_Values.RA, aInputs, aInputFluid, aOutput1, aDuration, aEUt);
- } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
- if (CORE.GTNH) {
- return false;
- }
- }
- }
- }
- 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) {
-
- }
- }
- 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;
- }
- }
- }
- }
-
- private boolean tryAddTecTechScannerRecipe(ItemStack aResearchItem, Object[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int assDuration, int assEUt) {
- if (!LoadedMods.TecTech) {
- return true;
- }
- else {
-
- int compSec = (GT_Utility.getTier(assEUt)+1) * 16;
- int compMax = (GT_Utility.getTier(assEUt)+1) * 10000;
-
- if (mScannerTT != null) {
- try {
- boolean aResult = (boolean) mScannerTT.invoke(null, aResearchItem, compMax, compSec,
- (assEUt/2), 16, aInputs, aFluidInputs, aOutput, assDuration, assEUt);
- Logger.INFO("Added TecTech Scanner Recipe for "+ItemUtils.getItemName(aResearchItem)+"? "+aResult);
- return aResult;
-
- } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
- Logger.INFO("Failed to generate TecTech recipe for "+ItemUtils.getItemName(aResearchItem)+", please report this to Alkalus. [Severe]");
- e.printStackTrace();
- }
- }
- }
- return false;
- }
-
-
- public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, int time, int eu){
- return addChemicalRecipe(input1, input2, inputFluid, outputFluid, output, null, time, eu);
- }
-
- @Override
- public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, Object object, int time, int eu) {
- try {
- if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
- return (boolean) mChemicalRecipe[0].invoke(GT_Values.RA, input1, input2, inputFluid, outputFluid, output, time);
- }
- else {
- return (boolean) mChemicalRecipe[1].invoke(GT_Values.RA, input1, input2, inputFluid, outputFluid, output, time, eu);
- }
- }
- catch (Throwable t) {
- return false;
- }
- }
-
- @Override
- public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, ItemStack output2, int time) {
- try {
- if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
- return (boolean) mChemicalRecipe[0].invoke(GT_Values.RA, input1, input2, inputFluid, outputFluid, output, time);
- }
- else {
- return (boolean) mChemicalRecipe[2].invoke(GT_Values.RA, input1, input2, inputFluid, outputFluid, output, output2, time);
- }
- }
- catch (Throwable t) {
- return false;
- }
- }
-
- @Override
- public boolean addMultiblockChemicalRecipe(ItemStack[] itemStacks, FluidStack[] fluidStacks, FluidStack[] fluidStacks2, ItemStack[] outputs, int time, int eu) {
- if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || mLargeChemReactor == null) {
- return false;
- }
- try {
- return (boolean) mLargeChemReactor.invoke(GT_Values.RA, itemStacks, fluidStacks, fluidStacks2, outputs, time, eu);
- } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
- return false;
- }
- }
-
-
-
-
-
-
-
-
- private boolean areItemsAndFluidsBothNull(final ItemStack[] items, final FluidStack[] fluids) {
- boolean itemsNull = true;
- if (items != null) {
- for (final ItemStack itemStack : items) {
- if (itemStack != null) {
- itemsNull = false;
- break;
- }
- }
- }
- boolean fluidsNull = true;
- if (fluids != null) {
- for (final FluidStack fluidStack : fluids) {
- if (fluidStack != null) {
- fluidsNull = false;
- break;
- }
- }
- }
- return itemsNull && fluidsNull;
- }
-
- @Override
- public boolean addCompressorRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt) {
- if ((aInput1 == null) || (aOutput1 == null)) {
- return false;
- }
- if ((aInput1 != null) && ((aDuration = GregTech_API.sRecipeFile.get("compressor", aInput1, aDuration)) <= 0)) {
- return false;
- }
- GT_Recipe.GT_Recipe_Map.sCompressorRecipes.addRecipe(true, new ItemStack[]{aInput1}, new ItemStack[]{aOutput1}, null, null, null, aDuration, aEUt, 0);
- return true;
- }
-
- @Override
- public boolean addBrewingRecipe(int aCircuit, FluidStack aInput, FluidStack aOutput, int aTime, int aEu, boolean aHidden) {
- return addBrewingRecipe(CI.getNumberedCircuit(aCircuit), aInput, aOutput, aTime, aEu, aHidden);
- }
-
- @Override
- public boolean addBrewingRecipe(ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aTime, int aEu, boolean aHidden) {
- if ((aIngredient == null) || (aInput == null) || (aOutput == null)) {
- return false;
- }
- if (!GregTech_API.sRecipeFile.get("brewing", aOutput.getUnlocalizedName(), true)) {
- return false;
- }
- GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBrewingRecipes.addRecipe(false, new ItemStack[]{aIngredient}, null, null, new FluidStack[]{aInput}, new FluidStack[]{aOutput}, aTime, aEu, 0);
- if ((aHidden) && (tRecipe != null)) {
- tRecipe.mHidden = true;
- }
- return true;
- }
-
-
- /**
- * Lets me add recipes for GT 5.08 & 5.09, since someone broke the method headers.
- */
- @Override
- public boolean addSmeltingAndAlloySmeltingRecipe(ItemStack aDust, ItemStack aOutput) {
- Method m = StaticFields59.mAddFurnaceRecipe;
- if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
- try {
- return (boolean) m.invoke(null, aDust, aOutput);
- } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
- return false;
- }
- }
- else {
- try {
- return (boolean) m.invoke(null, aDust, aOutput, true);
- } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
- return false;
- }
- }
- }
-
- @Override
- public void addFluidExtractionRecipe(ItemStack input, Object input2, FluidStack output, int aTime, int aEu, int aSpecial) {
- MaterialGenerator.addFluidExtractionRecipe(input, input2, output, aSpecial, aTime, aEu);
-
- }
-
-
-
-
-
- /**
+ @Override
+ public boolean addCokeOvenRecipe(final ItemStack aInput1, final ItemStack aInput2, final FluidStack aFluidInput,
+ final FluidStack aFluidOutput, final ItemStack aOutput, int aDuration, final int aEUt) {
+ try {
+ try {
+ // RECIPEHANDLER_CokeOven.debug1();
+ if (((aInput1 == null) /* && (aFluidInput == null) */)
+ || ((aOutput == null) || (aFluidOutput == null))) {
+ // Utils.LOG_WARNING("aInput1:"+aInput1.toString()+"
+ // aInput2:"+aInput2.toString()+"
+ // aFluidInput:"+aFluidInput.toString()+"
+ // aFluidOutput:"+aFluidOutput.toString()+"
+ // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+"
+ // aEU/t:"+aEUt);
+ Logger.WARNING("Something was null, returning false");
+ return false;
+ }
+
+ }
+ catch (final NullPointerException e) {
+ e.getStackTrace();
+ }
+ try {
+ // RECIPEHANDLER_CokeOven.debug2(aInput1, aInput2, aFluidInput,
+ // aFluidOutput, aOutput, aDuration, aEUt);
+ if ((aOutput != null)
+ && ((aDuration = GregTech_API.sRecipeFile.get("cokeoven", aOutput, aDuration)) <= 0)) {
+ // Utils.LOG_WARNING("aInput1:"+aInput1.toString()+"
+ // aInput2:"+aInput2.toString()+"
+ // aFluidInput:"+aFluidInput.toString()+"
+ // aFluidOutput:"+aFluidOutput.toString()+"
+ // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+"
+ // aEU/t:"+aEUt);
+ Logger.WARNING("Something was null, returning false");
+ return false;
+ }
+
+ }
+ catch (final NullPointerException e) {
+ e.getStackTrace();
+ }
+ try {
+ // RECIPEHANDLER_CokeOven.debug3(aInput1, aInput2, aFluidInput,
+ // aFluidOutput, aOutput, aDuration, aEUt);
+ if ((aFluidOutput == null) || ((aDuration = GregTech_API.sRecipeFile.get("cokeoven",
+ aFluidOutput.getFluid().getName(), aDuration)) <= 0)) {
+ // Utils.LOG_WARNING("aInput1:"+aInput1.toString()+"
+ // aInput2:"+aInput2.toString()+"
+ // aFluidInput:"+aFluidInput.toString()+"
+ // aFluidOutput:"+aFluidOutput.toString()+"
+ // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+"
+ // aEU/t:"+aEUt);
+ Logger.WARNING("Something was null, returning false");
+ return false;
+ }
+
+ }
+ catch (final NullPointerException e) {
+ e.getStackTrace();
+ }
+ try {
+ // RECIPEHANDLER_CokeOven.debug4(aInput1, aInput2, aFluidInput,
+ // aFluidOutput, aOutput, aDuration, aEUt);
+ if (aFluidInput == null && aInput2 != null) {
+ Recipe_GT.Gregtech_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[] { aInput1, aInput2 },
+ new ItemStack[] { aOutput }, null, null, null, new FluidStack[] { aFluidOutput }, aDuration,
+ aEUt, 0);
+ }
+ else if (aFluidInput == null && aInput2 == null) {
+ Recipe_GT.Gregtech_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[] { aInput1 },
+ new ItemStack[] { aOutput }, null, null, null, new FluidStack[] { aFluidOutput }, aDuration,
+ aEUt, 0);
+ }
+ else {
+ Recipe_GT.Gregtech_Recipe_Map.sCokeOvenRecipes.addRecipe(true, new ItemStack[] { aInput1, aInput2 },
+ new ItemStack[] { aOutput }, null, null, new FluidStack[] { aFluidInput },
+ new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0);
+ }
+ // RECIPEHANDLER_CokeOven.debug5(aInput1, aInput2, aFluidInput,
+ // aFluidOutput, aOutput, aDuration, aEUt);
+
+ return true;
+
+ }
+ catch (final NullPointerException e) {
+ Logger.WARNING("Something was null, returning false");
+ return false;
+ }
+ }
+ catch (final Throwable e) {
+ // Logger.WARNING("aInput1:"+aInput1.toString()+"
+ // aInput2:"+aInput2.toString()+"
+ // aFluidInput:"+aFluidInput.toString()+"
+ // aFluidOutput:"+aFluidOutput.toString()+"
+ // aOutput:"+aOutput.toString()+" aDuration:"+aDuration+"
+ // aEU/t:"+aEUt);
+ Logger.WARNING("Failed.");
+ e.getStackTrace();
+ return false;
+ }
+ }
+
+ @Override
+ public boolean addMatterFabricatorRecipe(final FluidStack aFluidInput, final FluidStack aFluidOutput,
+ final int aDuration, final int aEUt) {
+ try {
+ try {
+ // RECIPEHANDLER_MatterFabricator.debug1();
+ if (aFluidOutput == null) {
+ // Utils.LOG_WARNING("aFluidInput:"+aFluidInput.toString()+"
+ // aFluidOutput:"+aFluidOutput.toString()+"
+ // aDuration:"+aDuration+" aEU/t:"+aEUt);
+ Logger.WARNING("Something was null, returning false");
+ return false;
+ }
+
+ }
+ catch (final NullPointerException e) {
+ e.getStackTrace();
+ }
+ try {
+
+ // RECIPEHANDLER_MatterFabricator.debug4(aFluidInput,
+ // aFluidOutput, aDuration, aEUt);
+ if (aFluidInput == null) {
+ // Recipe_GT.Gregtech_Recipe_Map.sMatterFabRecipes.addRecipe(true,
+ // null, new FluidStack[]{aFluidOutput}, aDuration, aEUt,
+ // 0);
+ Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.addRecipe(true, null, null, null, null,
+ new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0);
+ }
+ else {
+ // Recipe_GT.Gregtech_Recipe_Map.sMatterFabRecipes.addRecipe(true,
+ // new FluidStack[]{aFluidInput}, new
+ // FluidStack[]{aFluidOutput}, aDuration, aEUt, 0);
+ Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.addRecipe(true, null, null, null,
+ new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0);
+ }
+ RECIPEHANDLER_MatterFabricator.debug5(aFluidInput, aFluidOutput, aDuration, aEUt);
+
+ return true;
+
+ }
+ catch (final NullPointerException e) {
+ return false;
+ }
+ }
+ catch (final Throwable e) {
+ // Utils.LOG_WARNING("aFluidInput:"+aFluidInput.toString()+"
+ // aFluidOutput:"+aFluidOutput.toString()+" aDuration:"+aDuration+"
+ // aEU/t:"+aEUt);
+ Logger.WARNING("Failed.");
+ e.getStackTrace();
+ return false;
+ }
+ }
+
+ @Override
+ public boolean addMatterFabricatorRecipe(final ItemStack aInputStack, final FluidStack aFluidInput,
+ final FluidStack aFluidOutput, final int aDuration, final int aEUt) {
+ try {
+ try {
+ if ((aFluidOutput == null) || (aInputStack == null)) {
+ return false;
+ }
+ }
+ catch (final NullPointerException e) {
+ }
+ try {
+ if (aFluidInput == null) {
+ Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.addRecipe(true, new ItemStack[] { aInputStack },
+ null, null, null, new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0);
+ }
+ else {
+ Recipe_GT.Gregtech_Recipe_Map.sMatterFab2Recipes.addRecipe(true, new ItemStack[] { aInputStack },
+ null, null, new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput }, aDuration,
+ aEUt, 0);
+ }
+ RECIPEHANDLER_MatterFabricator.debug5(aFluidInput, aFluidOutput, aDuration, aEUt);
+ return true;
+ }
+ catch (final NullPointerException e) {
+ return false;
+ }
+ }
+ catch (final Throwable e) {
+ return false;
+ }
+ }
+
+ @Override
+ public boolean addFuel(final ItemStack aInput1, final ItemStack aOutput1, final int aEU, final int aType) {
+ if (aInput1 == null) {
+ Logger.WARNING("Fuel Input is Invalid.");
+ return false;
+ }
+ // new GregtechRecipe(aInput1, aOutput1,
+ // GregTech_API.sRecipeFile.get("fuel_" + aType, aInput1, aEU), aType);
+ return true;
+ }
+
+ /*
+ * @Override public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack
+ * aItemB, FluidStack aFluid, ItemStack[] aOutputItems, FluidStack
+ * aOutputFluid, int aDuration, int aEUt) { if ((aItemA == null) || (aItemB
+ * == null) || (aOutputItems == null)) { return false; } for (ItemStack
+ * tStack : aOutputItems) { if (tStack != null) { if ((aDuration =
+ * GregTech_API.sRecipeFile.get("dehydrator", aItemA, aDuration)) <= 0) {
+ * return false; }
+ * Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true,
+ * new ItemStack[]{aItemA, aItemB}, aOutputItems, null, null, null,
+ * aDuration, aEUt, 0); RECIPEHANDLER_Dehydrator.debug5(aItemA, aItemB,
+ * aFluid, aOutputFluid, aOutputItems, aDuration, aEUt); return true; } }
+ * return false; }
+ * @Override public boolean addDehydratorRecipe(ItemStack aItemA, ItemStack
+ * aItemB, ItemStack[] aOutputItems, int aDuration, int aEUt) { if ((aItemA
+ * == null) || (aItemB == null) || (aOutputItems == null)) { return false; }
+ * if ((aDuration = GregTech_API.sRecipeFile.get("dehydrator", aItemA,
+ * aDuration)) <= 0) { return false; }
+ * Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true,
+ * new ItemStack[]{aItemA, aItemB}, aOutputItems, null, null, null,
+ * aDuration, aEUt, 0); RECIPEHANDLER_Dehydrator.debug5(aItemA, aItemB,
+ * null, null, aOutputItems, aDuration, aEUt); return true; }
+ * @Override public boolean addDehydratorRecipe(FluidStack aFluid,
+ * FluidStack aOutputFluid, ItemStack[] aOutputItems, int aDuration, int
+ * aEUt){ if ((aFluid == null) || (aOutputFluid == null || aOutputItems ==
+ * null)) { return false; } if ((aDuration =
+ * GregTech_API.sRecipeFile.get("dehydrator", aFluid.getUnlocalizedName(),
+ * aDuration)) <= 0) { return false; }
+ * Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true,
+ * null, aOutputItems, null, new FluidStack[]{aFluid}, new
+ * FluidStack[]{aOutputFluid}, aDuration, aEUt, 0);
+ * RECIPEHANDLER_Dehydrator.debug5(null, null, aFluid, aOutputFluid,
+ * aOutputItems, aDuration, aEUt); return true; }
+ */
+
+ @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.");
+ try {
+ if ((aInput == null) || (aFluid == null) || (aOutput == null)) {
+ return false;
+ }
+ if ((aDuration = GregTech_API.sRecipeFile.get("dehydrator", aInput, aDuration)) <= 0) {
+ return false;
+ }
+ Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, new ItemStack[] { aInput },
+ aOutput, null, new FluidStack[] { aFluid }, null, aDuration, aEUt, 0);
+ // RECIPEHANDLER_Dehydrator.debug5(aInput, null, aFluid, null,
+ // aOutput, aDuration, aEUt);
+ return true;
+ }
+ catch (final NullPointerException e) {
+ Logger.WARNING("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");
+ return false;
+ }
+ }
+
+ @Override
+ public boolean addDehydratorRecipe(final ItemStack[] aInput, final FluidStack aFluidInput,
+ final FluidStack aFluidOutput, final ItemStack[] aOutputItems, final int[] aChances, int aDuration,
+ 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 (aFluidInput != null) {
+ Logger.WARNING("Recipe requires input: " + aFluidInput.getFluid().getName() + " " + aFluidInput.amount
+ + "mbst");
+ }
+ 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)) {
+ 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());
+ }
+
+ if (aInput.length == 1) {
+ Logger.WARNING("Dehydrator recipe only has a single input item.");
+ Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, aInput, aOutputItems, null,
+ aChances, new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput }, aDuration, aEUt,
+ 0);
+
+ }
+ else {
+ Logger.WARNING("Dehydrator recipe has two input items.");
+ Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes.addRecipe(true, aInput, aOutputItems, null,
+ aChances, new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput }, aDuration, aEUt,
+ 0);
+
+ }
+
+ return true;
+ }
+ catch (final NullPointerException e) {
+ Logger.WARNING("FAILED TO LOAD RECIPES - NULL POINTER SOMEWHERE");
+ return false;
+ }
+ }
+
+ @Override
+ public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aOutput, final int aChance, int aDuration,
+ final int aEUt) {
+ return addBlastSmelterRecipe(aInput, null, aOutput, new ItemStack[] {}, new int[] {aChance}, aDuration, aEUt, 3700);
+ }
+
+ @Override
+ public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput,
+ final int aChance, int aDuration, final int aEUt) {
+ return addBlastSmelterRecipe(aInput, aInputFluid, aOutput, new ItemStack[] {}, new int[] {aChance}, aDuration, aEUt, 3700);
+ }
+
+ @Override
+ public boolean addBlastSmelterRecipe(final ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack,
+ final int aChance[], int aDuration, final int aEUt) {
+ return addBlastSmelterRecipe(aInput, aInputFluid, aOutput, aOutputStack, aChance, aDuration, aEUt, 3700);
+ }
+
+ @Override
+ public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, int aChance,
+ int aDuration, int aEUt, int aSpecialValue) {
+ return addBlastSmelterRecipe(aInput, aInputFluid, aOutput, new ItemStack[] {}, new int[] {aChance}, aDuration, aEUt, aSpecialValue);
+ }
+
+ @Override
+ public boolean addBlastSmelterRecipe(ItemStack[] aInput, FluidStack aInputFluid, FluidStack aOutput, ItemStack[] aOutputStack, int[] aChance,
+ int aDuration, int aEUt, int aSpecialValue) {
+ if ((aInput == null) || (aOutput == null)) {
+ Logger.WARNING("Fail - Input or Output was null.");
+ return false;
+ }
+
+ if (aOutput.isFluidEqual(Materials.PhasedGold.getMolten(1))) {
+ aOutput = Materials.VibrantAlloy.getMolten(aOutput.amount);
+ }
+ if (aOutput.isFluidEqual(Materials.PhasedIron.getMolten(1))) {
+ aOutput = Materials.PulsatingIron.getMolten(aOutput.amount);
+ }
+ if ((aDuration = GregTech_API.sRecipeFile.get("blastsmelter", aOutput.getFluid().getName(), aDuration)) <= 0) {
+ Logger.WARNING("Recipe did not register.");
+ return false;
+ }
+
+ for (int das = 0; das < aInput.length; das++) {
+ if (aInput[das] != null) {
+ Logger.WARNING("tMaterial[" + das + "]: " + aInput[das].getDisplayName() + ", Amount: "
+ + aInput[das].stackSize);
+ }
+ }
+
+ ArrayUtils.removeNulls(aInput);
+ if (aInput.length <= 1) {
+ return false;
+ }
+
+
+
+ Recipe_GT.Gregtech_Recipe_Map.sAlloyBlastSmelterRecipes.addRecipe(true, aInput, aOutputStack, null,
+ aChance, new FluidStack[] { aInputFluid }, new FluidStack[] { aOutput }, aDuration, aEUt,
+ aSpecialValue);
+ return true;
+ }
+
+ @Override
+ public boolean addLFTRRecipe(final ItemStack aInput1, final FluidStack aInput2, final ItemStack aOutput1,
+ final FluidStack aOutput2, final int aDuration, final int aEUt) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ @Override
+ public boolean addLFTRRecipe(final ItemStack aInput1, final ItemStack aInput2, final ItemStack aOutput1,
+ final int aDuration, final int aEUt) {
+ return false;
+ }
+
+ @Override
+ public boolean addLFTRRecipe(final FluidStack aInput1, final FluidStack aInput2, final FluidStack aOutput1,
+ final int aDuration, final int aEUt) {
+ if ((aInput1 == null) || (aInput2 == null) || (aOutput1 == null) || (aDuration < 1) || (aEUt < 1)) {
+ return false;
+ }
+ Recipe_GT.Gregtech_Recipe_Map.sLiquidFluorineThoriumReactorRecipes.addRecipe(null,
+ 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) {
+
+ if ((aInput1 == null) || (aInput2 == 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 };
+ // Recipe_GT.Gregtech_Recipe_Map.sFissionFuelProcessing.addRecipe(null,
+ // inputs, outputs, aDuration, aEUt, 0);
+ CustomRecipeMap.sFissionFuelProcessing.addRecipe(null, inputs, outputs, aDuration, aEUt, 0);
+ return true;
+ }
+
+ @Override
+ public boolean addCyclotronRecipe(ItemStack aInputs, FluidStack aFluidInput, ItemStack[] aOutputs,
+ FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue) {
+ return addCyclotronRecipe(new ItemStack[] {aInputs}, aFluidInput, aOutputs, aFluidOutput, aChances, aDuration, aEUt, aSpecialValue);
+ }
+
+ @Override
+ public boolean addCyclotronRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack[] aOutput,
+ FluidStack aFluidOutput, int[] aChances, int aDuration, int aEUt, int aSpecialValue) {
+ if (aOutput == null || aOutput.length < 1 || !ItemUtils.checkForInvalidItems(aOutput)) {
+ return false;
+ }
+ if (Recipe_GT.Gregtech_Recipe_Map.sCyclotronRecipes.addRecipe(true, aInputs, aOutput,
+ null, aChances, new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput },
+ Math.max(1, aDuration), Math.max(1, aEUt), aSpecialValue) != null) {
+ return true;
+ }
+
+ return false;
+ }
+
+ @Override
+ public boolean addMixerRecipe(ItemStack aInput1, ItemStack aInput2, ItemStack aInput3, ItemStack aInput4,
+ FluidStack aFluidInput, FluidStack aFluidOutput, ItemStack aOutput1, ItemStack aOutput2, ItemStack aOutput3,
+ ItemStack aOutput4, int aDuration, int aEUt) {
+ if (((aInput1 == null) && (aFluidInput == null)) || ((aOutput1 == null) && (aFluidOutput == null))) {
+ return false;
+ }
+ if ((aOutput1 != null)
+ && ((aDuration = GregTech_API.sRecipeFile.get("advancedmixer", aOutput1, aDuration)) <= 0)) {
+ return false;
+ }
+ if ((aFluidOutput != null) && ((aDuration = GregTech_API.sRecipeFile.get("advancedmixer",
+ aFluidOutput.getFluid().getName(), aDuration)) <= 0)) {
+ return false;
+ }
+ Recipe_GT.Gregtech_Recipe_Map.sAdvancedMixerRecipes.addRecipe(true,
+ new ItemStack[] { aInput1, aInput2, aInput3, aInput4 },
+ new ItemStack[] { aOutput1, aOutput2, aOutput3, aOutput4 }, null, null,
+ new FluidStack[] { aFluidInput }, new FluidStack[] { aFluidOutput }, aDuration, aEUt, 0);
+ return true;
+ }
+
+ // Machine Component Assembler
+ @Override
+ public boolean addComponentMakerRecipe(ItemStack[] aInputs, FluidStack aFluidInput, ItemStack aOutput1,
+ int aDuration, int aEUt) {
+ if (areItemsAndFluidsBothNull(aInputs, new FluidStack[] { aFluidInput })) {
+ return false;
+ }
+ if (aOutput1 == null) {
+ return false;
+ }
+ if ((aDuration = GregTech_API.sRecipeFile.get("machinecomponents", aOutput1, aDuration)) <= 0) {
+ return false;
+ }
+ if (GTNH) {
+ return false;
+ }
+ Recipe_GT.Gregtech_Recipe_Map.sComponentAssemblerRecipes.addRecipe(true, aInputs, new ItemStack[] { aOutput1 },
+ null, new FluidStack[] { aFluidInput }, null, aDuration, aEUt, 0);
+ return true;
+ }
+
+
+ public boolean addMultiblockCentrifugeRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial){
+ if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) {
+ return false;
+ }
+
+ if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) {
+ Logger.INFO("[Recipe] Error generating Large Centrifuge recipe.");
+ Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs));
+ Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aFluidInputs));
+ Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs));
+ Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs));
+ return false;
+ }
+ Recipe_GT.Gregtech_Recipe_Map.sMultiblockCentrifugeRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial);
+ return true;
+ }
+
+ public boolean addMultiblockElectrolyzerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial){
+ if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) {
+ return false;
+ }
+ if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) {
+ Logger.INFO("[Recipe] Error generating Large Electrolyzer recipe.");
+ Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs));
+ Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aFluidInputs));
+ Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs));
+ Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs));
+ return false;
+ }
+ Recipe_GT.Gregtech_Recipe_Map.sMultiblockElectrolyzerRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial);
+ return true;
+ }
+
+
+ public boolean addAdvancedFreezerRecipe(ItemStack[] aInputs, FluidStack[] aFluidInputs, FluidStack[] aFluidOutputs, ItemStack[] aOutputs, int[] aChances, int aDuration, int aEUtick, int aSpecial) {
+ if (areItemsAndFluidsBothNull(aInputs, aFluidInputs) || areItemsAndFluidsBothNull(aOutputs, aFluidOutputs) || aEUtick <= 0) {
+ return false;
+ }
+
+ if (!ItemUtils.checkForInvalidItems(aInputs, aOutputs)) {
+ Logger.INFO("[Recipe] Error generating Adv. Vac Freezer recipe.");
+ Logger.INFO("Inputs: "+ItemUtils.getArrayStackNames(aInputs));
+ Logger.INFO("Fluid Inputs: "+ItemUtils.getArrayStackNames(aFluidInputs));
+ Logger.INFO("Outputs: "+ItemUtils.getArrayStackNames(aOutputs));
+ Logger.INFO("Fluid Outputs: "+ItemUtils.getArrayStackNames(aFluidOutputs));
+ return false;
+ }
+ if (Recipe_GT.Gregtech_Recipe_Map.sAdvFreezerRecipes.addRecipe(true, aInputs, aOutputs, null, aChances, aFluidInputs, aFluidOutputs, aDuration, aEUtick, aSpecial) != null) {
+ return true;
+ }
+ return false;
+
+ }
+
+ public boolean addAssemblerRecipeWithOreDict(Object aInput1, int aAmount1, Object aInput2, int aAmount2, ItemStack aOutput, int a1, int a2) {
+ if (aInput1 instanceof String || aInput2 instanceof String) {
+ int mCompleted = 0;
+ if (aInput1 instanceof String && aInput2 instanceof String) {
+ List<ItemStack> x = OreDictionary.getOres((String) aInput1, false);
+ List<ItemStack> x1 = OreDictionary.getOres((String) aInput2, false);
+ if (x != null && x.size() > 0 && x1 != null && x1.size() > 0) {
+ for (ItemStack r : x) {
+ r.stackSize = aAmount1;
+ for (ItemStack r1 : x1) {
+ r1.stackSize = aAmount2;
+ if (GT_Values.RA.addAssemblerRecipe(r, r1, aOutput, a1, a2)) {
+ mCompleted++;
+ }
+ }
+ }
+ }
+ }
+ else if (aInput1 instanceof String) {
+ List<ItemStack> x = OreDictionary.getOres((String) aInput1, false);
+ if (x != null && x.size() > 0) {
+ for (ItemStack r : x) {
+ r.stackSize = aAmount1;
+ if (GT_Values.RA.addAssemblerRecipe(r, (ItemStack) aInput2, aOutput, a1, a2)) {
+ mCompleted++;
+ }
+ }
+ }
+
+ }
+ else {
+ List<ItemStack> x = OreDictionary.getOres((String) aInput2, false);
+ if (x != null && x.size() > 0) {
+ for (ItemStack r : x) {
+ r.stackSize = aAmount1;
+ if (GT_Values.RA.addAssemblerRecipe((ItemStack) aInput1, r, aOutput, a1, a2)) {
+ mCompleted++;
+ }
+ }
+ }
+ }
+ return mCompleted > 0;
+ }
+ else {
+ return GT_Values.RA.addAssemblerRecipe((ItemStack) aInput1, (ItemStack) aInput2, aOutput, a1, a2);
+ }
+ }
+
+ public boolean addAssemblerRecipeWithOreDict(Object aInput1, int aAmount1, Object aInput2, int aAmount2, FluidStack aInputFluid, ItemStack aOutput, int a1, int a2) {
+ if (aInput1 instanceof String || aInput2 instanceof String) {
+ int mCompleted = 0;
+ if (aInput1 instanceof String && aInput2 instanceof String) {
+ List<ItemStack> x = OreDictionary.getOres((String) aInput1, false);
+ List<ItemStack> x1 = OreDictionary.getOres((String) aInput2, false);
+ if (x != null && x.size() > 0 && x1 != null && x1.size() > 0) {
+ for (ItemStack r : x) {
+ r.stackSize = aAmount1;
+ for (ItemStack r1 : x1) {
+ r1.stackSize = aAmount2;
+ if (GT_Values.RA.addAssemblerRecipe(r, r1, aInputFluid, aOutput, a1, a2)) {
+ mCompleted++;
+ }
+ }
+ }
+ }
+ }
+ else if (aInput1 instanceof String) {
+ List<ItemStack> x = OreDictionary.getOres((String) aInput1, false);
+ if (x != null && x.size() > 0) {
+ for (ItemStack r : x) {
+ r.stackSize = aAmount1;
+ if (GT_Values.RA.addAssemblerRecipe(r, (ItemStack) aInput2, aInputFluid, aOutput, a1, a2)) {
+ mCompleted++;
+ }
+ }
+ }
+
+ }
+ else {
+ List<ItemStack> x = OreDictionary.getOres((String) aInput2, false);
+ if (x != null && x.size() > 0) {
+ for (ItemStack r : x) {
+ r.stackSize = aAmount1;
+ if (GT_Values.RA.addAssemblerRecipe((ItemStack) aInput1, r, aInputFluid, aOutput, a1, a2)) {
+ mCompleted++;
+ }
+ }
+ }
+ }
+ return mCompleted > 0;
+ }
+ else {
+ return GT_Values.RA.addAssemblerRecipe((ItemStack) aInput1, (ItemStack) aInput2, aInputFluid, aOutput, a1, a2);
+ }
+ }
+
+ /*
+ * Reflection Based Recipe Additions with Fallbacks
+ */
+
+ private static final Method mSixSlotAssembly;
+ private static final Method mAssemblyLine;
+ private static final Method mScannerTT;
+ private static final Method[] mChemicalRecipe = new Method[3];
+ private static final Method mLargeChemReactor;
+
+ static {
+
+ //Get GT's RA class;
+ Class<? extends IGT_RecipeAdder> clazz = GT_Values.RA.getClass();
+
+ mChemicalRecipe[0] = ReflectionUtils.getMethod(clazz, "addChemicalRecipe", ItemStack.class, ItemStack.class, FluidStack.class, FluidStack.class, ItemStack.class, int.class);
+
+
+ if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH) {
+ //6 Slot Assembler
+ mSixSlotAssembly = ReflectionUtils.getMethod(clazz, "addAssemblerRecipe", ItemStack[].class, FluidStack.class, ItemStack.class, int.class, int.class);
+ //Assembly Line
+ mAssemblyLine = ReflectionUtils.getMethod(clazz, "addAssemblylineRecipe", ItemStack.class, int.class, ItemStack[].class, FluidStack[].class, ItemStack.class, int.class, int.class);
+
+
+ Method T = null;
+ if (LoadedMods.TecTech) {
+ Class TTRecipeAdder = ReflectionUtils.getClass("com.github.technus.tectech.recipe.TT_recipeAdder");
+ if (TTRecipeAdder != null) {
+ Method ttTest = ReflectionUtils.getMethod(TTRecipeAdder, "addResearchableAssemblylineRecipe",
+ ItemStack.class, int.class, int.class, int.class, int.class, Object[].class,
+ FluidStack[].class, ItemStack.class, int.class, int.class);
+ if (ttTest != null) {
+ T = ttTest;
+ }
+ }
+ }
+ else {
+ T = null;
+ }
+ mScannerTT = T;
+
+ mChemicalRecipe[1] = ReflectionUtils.getMethod(clazz, "addChemicalRecipe", ItemStack.class, ItemStack.class, FluidStack.class, FluidStack.class, ItemStack.class, int.class, int.class);
+ mChemicalRecipe[2] = ReflectionUtils.getMethod(clazz, "addChemicalRecipe", ItemStack.class, ItemStack.class, FluidStack.class, FluidStack.class, ItemStack.class, ItemStack.class, int.class);
+
+ mLargeChemReactor = ReflectionUtils.getMethod(clazz, "addMultiblockChemicalRecipe", ItemStack[].class, FluidStack[].class, FluidStack[].class, ItemStack[].class, int.class, int.class);
+
+
+
+ }
+ else {
+ mSixSlotAssembly = null;
+ mAssemblyLine = null;
+ mLargeChemReactor = null;
+ mScannerTT = null;
+ }
+
+
+ }
+
+
+
+
+
+
+ public boolean addSixSlotAssemblingRecipe(ItemStack[] aInputs, FluidStack aInputFluid, ItemStack aOutput1, int aDuration, int aEUt) {
+ if (CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || CORE.GTNH) {
+ if (mSixSlotAssembly != null) {
+ try {
+ return (boolean) mSixSlotAssembly.invoke(GT_Values.RA, aInputs, aInputFluid, aOutput1, aDuration, aEUt);
+ } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+ if (CORE.GTNH) {
+ return false;
+ }
+ }
+ }
+ }
+ 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) {
+
+ }
+ }
+ 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;
+ }
+ }
+ }
+ }
+
+ private boolean tryAddTecTechScannerRecipe(ItemStack aResearchItem, Object[] aInputs, FluidStack[] aFluidInputs, ItemStack aOutput, int assDuration, int assEUt) {
+ if (!LoadedMods.TecTech) {
+ return true;
+ }
+ else {
+
+ int compSec = (GT_Utility.getTier(assEUt)+1) * 16;
+ int compMax = (GT_Utility.getTier(assEUt)+1) * 10000;
+
+ if (mScannerTT != null) {
+ try {
+ boolean aResult = (boolean) mScannerTT.invoke(null, aResearchItem, compMax, compSec,
+ (assEUt/2), 16, aInputs, aFluidInputs, aOutput, assDuration, assEUt);
+ Logger.INFO("Added TecTech Scanner Recipe for "+ItemUtils.getItemName(aResearchItem)+"? "+aResult);
+ return aResult;
+
+ } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+ Logger.INFO("Failed to generate TecTech recipe for "+ItemUtils.getItemName(aResearchItem)+", please report this to Alkalus. [Severe]");
+ e.printStackTrace();
+ }
+ }
+ }
+ return false;
+ }
+
+
+ public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, int time, int eu){
+ return addChemicalRecipe(input1, input2, inputFluid, outputFluid, output, null, time, eu);
+ }
+
+ @Override
+ public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, Object object, int time, int eu) {
+ try {
+ if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
+ return (boolean) mChemicalRecipe[0].invoke(GT_Values.RA, input1, input2, inputFluid, outputFluid, output, time);
+ }
+ else {
+ return (boolean) mChemicalRecipe[1].invoke(GT_Values.RA, input1, input2, inputFluid, outputFluid, output, time, eu);
+ }
+ }
+ catch (Throwable t) {
+ return false;
+ }
+ }
+
+ @Override
+ public boolean addChemicalRecipe(ItemStack input1, ItemStack input2, FluidStack inputFluid, FluidStack outputFluid, ItemStack output, ItemStack output2, int time) {
+ try {
+ if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
+ return (boolean) mChemicalRecipe[0].invoke(GT_Values.RA, input1, input2, inputFluid, outputFluid, output, time);
+ }
+ else {
+ return (boolean) mChemicalRecipe[2].invoke(GT_Values.RA, input1, input2, inputFluid, outputFluid, output, output2, time);
+ }
+ }
+ catch (Throwable t) {
+ return false;
+ }
+ }
+
+ @Override
+ public boolean addMultiblockChemicalRecipe(ItemStack[] itemStacks, FluidStack[] fluidStacks, FluidStack[] fluidStacks2, ItemStack[] outputs, int time, int eu) {
+ if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK || mLargeChemReactor == null) {
+ return false;
+ }
+ try {
+ return (boolean) mLargeChemReactor.invoke(GT_Values.RA, itemStacks, fluidStacks, fluidStacks2, outputs, time, eu);
+ } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+ return false;
+ }
+ }
+
+
+
+
+
+
+
+
+ private boolean areItemsAndFluidsBothNull(final ItemStack[] items, final FluidStack[] fluids) {
+ boolean itemsNull = true;
+ if (items != null) {
+ for (final ItemStack itemStack : items) {
+ if (itemStack != null) {
+ itemsNull = false;
+ break;
+ }
+ }
+ }
+ boolean fluidsNull = true;
+ if (fluids != null) {
+ for (final FluidStack fluidStack : fluids) {
+ if (fluidStack != null) {
+ fluidsNull = false;
+ break;
+ }
+ }
+ }
+ return itemsNull && fluidsNull;
+ }
+
+ @Override
+ public boolean addCompressorRecipe(ItemStack aInput1, ItemStack aOutput1, int aDuration, int aEUt) {
+ if ((aInput1 == null) || (aOutput1 == null)) {
+ return false;
+ }
+ if ((aInput1 != null) && ((aDuration = GregTech_API.sRecipeFile.get("compressor", aInput1, aDuration)) <= 0)) {
+ return false;
+ }
+ GT_Recipe.GT_Recipe_Map.sCompressorRecipes.addRecipe(true, new ItemStack[]{aInput1}, new ItemStack[]{aOutput1}, null, null, null, aDuration, aEUt, 0);
+ return true;
+ }
+
+ @Override
+ public boolean addBrewingRecipe(int aCircuit, FluidStack aInput, FluidStack aOutput, int aTime, int aEu, boolean aHidden) {
+ return addBrewingRecipe(CI.getNumberedCircuit(aCircuit), aInput, aOutput, aTime, aEu, aHidden);
+ }
+
+ @Override
+ public boolean addBrewingRecipe(ItemStack aIngredient, FluidStack aInput, FluidStack aOutput, int aTime, int aEu, boolean aHidden) {
+ if ((aIngredient == null) || (aInput == null) || (aOutput == null)) {
+ return false;
+ }
+ if (!GregTech_API.sRecipeFile.get("brewing", aOutput.getUnlocalizedName(), true)) {
+ return false;
+ }
+ GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sBrewingRecipes.addRecipe(false, new ItemStack[]{aIngredient}, null, null, new FluidStack[]{aInput}, new FluidStack[]{aOutput}, aTime, aEu, 0);
+ if ((aHidden) && (tRecipe != null)) {
+ tRecipe.mHidden = true;
+ }
+ return true;
+ }
+
+
+ /**
+ * Lets me add recipes for GT 5.08 & 5.09, since someone broke the method headers.
+ */
+ @Override
+ public boolean addSmeltingAndAlloySmeltingRecipe(ItemStack aDust, ItemStack aOutput) {
+ Method m = StaticFields59.mAddFurnaceRecipe;
+ if (!CORE.MAIN_GREGTECH_5U_EXPERIMENTAL_FORK) {
+ try {
+ return (boolean) m.invoke(null, aDust, aOutput);
+ } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+ return false;
+ }
+ }
+ else {
+ try {
+ return (boolean) m.invoke(null, aDust, aOutput, true);
+ } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+ return false;
+ }
+ }
+ }
+
+ @Override
+ public void addFluidExtractionRecipe(ItemStack input, Object input2, FluidStack output, int aTime, int aEu, int aSpecial) {
+ MaterialGenerator.addFluidExtractionRecipe(input, input2, output, aSpecial, aTime, aEu);
+
+ }
+
+
+
+
+
+ /**
* Adds a Fusion reactor Recipe
*
* @param aInputStackA = first Input (not null, and respects StackSize)
@@ -990,105 +990,122 @@ public class GregtechRecipeAdder implements IGregtech_RecipeAdder {
* @param aEu = The EU generated per Tick (can even be negative!)
* @param aSpecial = EU needed for heating the Reactor up (must be >= 0)
*/
- @Override
- public boolean addFusionReactorRecipe(FluidStack aInputStackA, FluidStack aInputStackB, FluidStack plasma,
- int aOutputChance, int aFusionDurationInTicks, int aEu, int aSpecial) {
- if (aInputStackA == null || aInputStackB == null || plasma == null || aFusionDurationInTicks < 1 || aEu < 1 || aSpecial < 1) {
- return false;
- }
- Recipe_GT aFusionCustom = new Recipe_GT(
- true,
- null,
- null,
- null,
- new int[] {aOutputChance},
- new FluidStack[]{aInputStackA, aInputStackB},
- new FluidStack[]{plasma},
- aFusionDurationInTicks,
- aEu,
- aSpecial);
- GT_Recipe.GT_Recipe_Map.sFusionRecipes.addRecipe(aFusionCustom);
- return true;
- }
-
-
-
-
-
-
- /**
- * Adds a Fusion reactor Recipe
- *
- * @param aInputStackA = first Input (not null, and respects StackSize)
- * @param aInputStackB = second Input (not null, and respects StackSize)
- * @param plasma = Output of the Fusion (can be null, and respects StackSize)
- * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0)
- * @param aEu = The EU generated per Tick (can even be negative!)
- * @param aSpecial = EU needed for heating the Reactor up (must be >= 0)
- */
- @Override
- public boolean addFusionReactorRecipe(ItemStack aInputStackA, ItemStack aInputStackB, FluidStack plasma,
- int aFusionDurationInTicks, int aEu, int aSpecial) {
- return addFusionReactorRecipe(aInputStackA, aInputStackB, plasma, 10000, aFusionDurationInTicks, aEu, aSpecial);
- }
-
-
- /**
- * Adds a Fusion reactor Recipe
- *
- * @param aInputStackA = first Input (not null, and respects StackSize)
- * @param aInputStackB = second Input (not null, and respects StackSize)
- * @param plasma = Output of the Fusion (can be null, and respects StackSize)
+ @Override
+ public boolean addFusionReactorRecipe(FluidStack aInputStackA, FluidStack aInputStackB, FluidStack plasma,
+ int aOutputChance, int aFusionDurationInTicks, int aEu, int aSpecial) {
+ if (aInputStackA == null || aInputStackB == null || plasma == null || aFusionDurationInTicks < 1 || aEu < 1 || aSpecial < 1) {
+ return false;
+ }
+ Recipe_GT aFusionCustom = new Recipe_GT(
+ true,
+ null,
+ null,
+ null,
+ new int[] {aOutputChance},
+ new FluidStack[]{aInputStackA, aInputStackB},
+ new FluidStack[]{plasma},
+ aFusionDurationInTicks,
+ aEu,
+ aSpecial);
+ GT_Recipe.GT_Recipe_Map.sFusionRecipes.addRecipe(aFusionCustom);
+ return true;
+ }
+
+
+
+
+
+
+ /**
+ * Adds a Fusion reactor Recipe
+ *
+ * @param aInputStackA = first Input (not null, and respects StackSize)
+ * @param aInputStackB = second Input (not null, and respects StackSize)
+ * @param plasma = Output of the Fusion (can be null, and respects StackSize)
+ * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0)
+ * @param aEu = The EU generated per Tick (can even be negative!)
+ * @param aSpecial = EU needed for heating the Reactor up (must be >= 0)
+ */
+ @Override
+ public boolean addFusionReactorRecipe(ItemStack aInputStackA, ItemStack aInputStackB, FluidStack plasma,
+ int aFusionDurationInTicks, int aEu, int aSpecial) {
+ return addFusionReactorRecipe(aInputStackA, aInputStackB, plasma, 10000, aFusionDurationInTicks, aEu, aSpecial);
+ }
+
+
+ /**
+ * Adds a Fusion reactor Recipe
+ *
+ * @param aInputStackA = first Input (not null, and respects StackSize)
+ * @param aInputStackB = second Input (not null, and respects StackSize)
+ * @param plasma = Output of the Fusion (can be null, and respects StackSize)
* @param aOutputChance = chance to output plasma (can be 0)
- * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0)
- * @param aEu = The EU generated per Tick (can even be negative!)
- * @param aSpecial = EU needed for heating the Reactor up (must be >= 0)
- */
- @Override
- public boolean addFusionReactorRecipe(ItemStack aInputStackA, ItemStack aInputStackB, FluidStack plasma,
- int aOutputChance, int aFusionDurationInTicks, int aEu, int aSpecial) {
- if (aInputStackA == null || aInputStackB == null || plasma == null || aFusionDurationInTicks < 1 || aEu < 1 || aSpecial < 1) {
- return false;
- }
- Recipe_GT aFusionCustom = new Recipe_GT(
- true,
- new ItemStack[]{aInputStackA, aInputStackB},
- null,
- null,
- new int[] {aOutputChance},
- null,
- new FluidStack[]{plasma},
- aFusionDurationInTicks,
- aEu,
- aSpecial);
- GT_Recipe.GT_Recipe_Map.sFusionRecipes.addRecipe(aFusionCustom);
- return true;
-
- }
-
- @Override
- public boolean addSemifluidFuel(ItemStack aFuelItem, int aFuelValue) {
- return SemiFluidFuelHandler.addSemiFluidFuel(aFuelItem, aFuelValue);
- }
-
- @Override
- public boolean addSemifluidFuel(FluidStack aFuelItem, int aFuelValue) {
- return SemiFluidFuelHandler.addSemiFluidFuel(aFuelItem, aFuelValue);
- }
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ * @param aFusionDurationInTicks = How many ticks the Fusion lasts (must be > 0)
+ * @param aEu = The EU generated per Tick (can even be negative!)
+ * @param aSpecial = EU needed for heating the Reactor up (must be >= 0)
+ */
+ @Override
+ public boolean addFusionReactorRecipe(ItemStack aInputStackA, ItemStack aInputStackB, FluidStack plasma,
+ int aOutputChance, int aFusionDurationInTicks, int aEu, int aSpecial) {
+ if (aInputStackA == null || aInputStackB == null || plasma == null || aFusionDurationInTicks < 1 || aEu < 1 || aSpecial < 1) {
+ return false;
+ }
+ Recipe_GT aFusionCustom = new Recipe_GT(
+ true,
+ new ItemStack[]{aInputStackA, aInputStackB},
+ null,
+ null,
+ new int[] {aOutputChance},
+ null,
+ new FluidStack[]{plasma},
+ aFusionDurationInTicks,
+ aEu,
+ aSpecial);
+ GT_Recipe.GT_Recipe_Map.sFusionRecipes.addRecipe(aFusionCustom);
+ return true;
+
+ }
+
+ @Override
+ public boolean addSemifluidFuel(ItemStack aFuelItem, int aFuelValue) {
+ return SemiFluidFuelHandler.addSemiFluidFuel(aFuelItem, aFuelValue);
+ }
+
+ @Override
+ public boolean addSemifluidFuel(FluidStack aFuelItem, int aFuelValue) {
+ return SemiFluidFuelHandler.addSemiFluidFuel(aFuelItem, aFuelValue);
+ }
+
+
+
+
+ @Override
+ public boolean addVacuumFurnaceRecipe(ItemStack aInput1, ItemStack aInput2, FluidStack aFluidInput, FluidStack aFluidOutput,
+ ItemStack aOutput1, ItemStack aOutput2, int aDuration, int aEUt, int aLevel) {
+ if (aInput1 != null && aOutput1 != null) {
+ if ((aDuration = GregTech_API.sRecipeFile.get("vacuumfurnace", aInput1, aDuration)) <= 0) {
+ return false;
+ } else {
+ Recipe_GT.Gregtech_Recipe_Map.sVacuumFurnaceRecipes.addRecipe(true, new ItemStack[]{aInput1, aInput2},
+ new ItemStack[]{aOutput1, aOutput2}, (Object) null, (int[]) null, new FluidStack[]{aFluidInput},
+ new FluidStack[]{aFluidOutput}, aDuration, aEUt, aLevel);
+ return true;
+ }
+ } else {
+ return false;
+ }
+ }
+
+
+
+
+
+
+
+
+
+
+
}
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java
index 54ab6d45bb..a3aa7e5e78 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechDehydrator.java
@@ -14,6 +14,8 @@ 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.common.tileentities.machines.multi.processing.GregtechMetaTileEntity_IndustrialDehydrator;
+import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.GregtechMetaTileEntity_Adv_EBF;
public class GregtechDehydrator {
public static void run() {
@@ -73,6 +75,10 @@ public class GregtechDehydrator {
"You can definitely make space icecream with this.. ",
Recipe_GT.Gregtech_Recipe_Map.sChemicalDehydratorRecipes, 2, 9, 10000, 2, 5, "Dehydrator.png", "",
false, false, 0, "UNBOXINATOR", null).getStackForm(1L));
+
+ //Advanced
+ GregtechItemList.Controller_Vacuum_Furnace.set(new GregtechMetaTileEntity_IndustrialDehydrator(995, "multimachine.adv.vacuumfurnace", "Utupu-Tanuri").getStackForm(1L));
+
ItemStack coilWire1 = ItemUtils.getItemStackWithMeta(true, "miscutils:itemDehydratorCoilWire", "coilWire1", 0,
4);
diff --git a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCryogenicFreezer.java b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFactoryGradeReplacementMultis.java
index 65f3e41911..2b683dd888 100644
--- a/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechIndustrialCryogenicFreezer.java
+++ b/src/Java/gtPlusPlus/xmod/gregtech/registration/gregtech/GregtechFactoryGradeReplacementMultis.java
@@ -7,12 +7,10 @@ import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.ad
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.GregtechMetaTileEntity_Adv_Fusion_MK4;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.processing.advanced.GregtechMetaTileEntity_Adv_Implosion;
-public class GregtechIndustrialCryogenicFreezer {
+public class GregtechFactoryGradeReplacementMultis {
public static void run() {
- if (gtPlusPlus.core.lib.LoadedMods.Gregtech) {
- run1();
- }
+ run1();
}
private static void run1() {
diff --git a/src/resources/assets/miscutils/lang/en_US.lang b/src/resources/assets/miscutils/lang/en_US.lang
index 1ddcef9c74..38188e838b 100644
--- a/src/resources/assets/miscutils/lang/en_US.lang
+++ b/src/resources/assets/miscutils/lang/en_US.lang
@@ -2794,15 +2794,15 @@ item.itemPlateDoubleRunite.name=Double Runite Plate
item.itemCellRunite.name=Runite Cell
tile.Block of Runite.name=Block of Runite
-item.itemIngotDragonblood.name=Dragonblood Ingot
-item.itemDustDragonblood.name=Dragonblood Dust
-item.itemDustTinyDragonblood.name=Tiny Pile of Dragonblood Dust
-item.itemDustSmallDragonblood.name=Small Pile of Dragonblood Dust
-item.itemNuggetDragonblood.name=Dragonblood Nugget
-item.itemPlateDragonblood.name=Dragonblood Plate
-item.itemPlateDoubleDragonblood.name=Double Dragonblood Plate
+item.itemIngotDragonblood.name=Dragon Metal Ingot
+item.itemDustDragonblood.name=Dragon Metal Dust
+item.itemDustTinyDragonblood.name=Tiny Pile of Dragon Metal Dust
+item.itemDustSmallDragonblood.name=Small Pile of Dragon Metal Dust
+item.itemNuggetDragonblood.name=Shard of Dragonblood
+item.itemPlateDragonblood.name=Dragon Metal Plate
+item.itemPlateDoubleDragonblood.name=Double Dragon Metal Plate
item.itemCellDragonblood.name=Dragonblood Cell
-tile.Block of Dragonblood.name=Block of Dragonblood
+tile.Block of Dragonblood.name=Block of Dragon Metal
item.itemIngotBlackTitanium.name=Black Titanium Ingot
item.itemDustBlackTitanium.name=Black Titanium Dust
@@ -2896,4 +2896,63 @@ item.itemNuggetRhugnor.name=Rhugnor Nugget
item.itemPlateRhugnor.name=Rhugnor Plate
item.itemPlateDoubleRhugnor.name=Double Rhugnor Plate
item.itemCellRhugnor.name=Rhugnor Cell
-tile.Block of Rhugnor.name=Block of Rhugnor \ No newline at end of file
+tile.Block of Rhugnor.name=Block of Rhugnor
+
+
+
+
+//Added 13/5/19
+
+item.GTPP.BattPack.01.name=Charge Pack [LV]
+item.GTPP.BattPack.02.name=Charge Pack [MV]
+item.GTPP.BattPack.03.name=Charge Pack [HV]
+item.GTPP.BattPack.04.name=Charge Pack [EV]
+item.GTPP.BattPack.05.name=Charge Pack [IV]
+item.IndustrialDiamondExquisite.name=Exquisite Industrial Diamond
+
+item.itemSpringCelestialTungsten.name=Celestial Tungsten Spring
+item.itemSpringWhiteMetal.name=White Metal Spring
+item.itemSpringNitinol60.name=Nitinol 60 Spring
+item.itemSpringWatertightSteel.name=Watertight Steel Spring
+item.itemSpringEglinSteel.name=Eglin Steel Spring
+
+item.itemSmallSpringMaragingSteel250.name=Small Maraging Steel 250 Spring
+item.itemSmallSpringNichrome.name=Small Nichrome Spring
+item.itemSmallSpringStaballoy.name=Small Staballoy Spring
+item.itemSmallSpringBlackSteel.name=Small Black Steel Spring
+item.itemSmallSpringBlackTitanium.name=Small Black Titanium Spring
+
+item.itemFineWireWhiteMetal.name=Fine White Metal Wire
+item.itemFineWirePalladium.name=Fine Palladium Wire
+item.itemFineWireZirconium.name=Fine Zirconium Wire
+item.itemFineWireGrisium.name=Fine Grisium Wire
+item.itemFineWireBabbitAlloy.name=Fine Babbit Alloy Wire
+item.itemFineWireKoboldite.name=Fine Koboldite Wire
+item.itemFineWireHG1223.name=Fine HG-1223 Wire
+item.itemFineWireQuantum.name=Fine Quantum Wire
+
+item.itemHeavyPlatePotin.name=Heavy Potin Plate
+item.itemHeavyPlateWatertightSteel.name=Heavy Watertight Steel Plate
+item.itemHeavyPlateBronze.name=Heavy Bronze Plate
+item.itemHeavyPlateOsmiridium.name=Heavy Osmiridium Plate
+item.itemHeavyPlateQuantum.name=Heavy Quantum Plate
+item.itemHeavyPlateBlackSteel.name=Heavy Black Steel Plate
+item.itemHeavyPlateStainlessSteel.name=Heavy Stainless Steel Plate
+item.itemHeavyPlateEglinSteel.name=Heavy Eglin Steel Plate
+item.itemHeavyPlateMaragingSteel300.name=Heavy Maraging Steel 300 Plate
+item.itemHeavyPlateTalonite.name=Heavy Talonite Plate
+item.itemHeavyPlateHypogen.name=Heavy Hypogen Plate
+item.itemHeavyPlateRhugnor.name=Heavy Rhugnor Plate
+item.itemHeavyPlateAdvancedNitinol.name=Heavy Advanced Nitinol Plate
+item.itemHeavyPlateAstralTitanium.name=Heavy Astral Titanium Plate
+item.itemHeavyPlateCelestialTungsten.name=Heavy Celestial Tungsten Plate
+item.itemHeavyPlateWhiteMetal.name=Heavy White Metal Plate
+item.itemHeavyPlateBlackMetal.name=Heavy Black Metal Plate
+item.itemHeavyPlateAncientGranite.name=Heavy Ancient Granite Plate
+
+item.GTPP.bauble.fireprotection.0.name=Supreme Pizza Gloves
+
+
+//Added 16/5/19
+item.itemCellSeleniumDioxide.name=Selenium Dioxide Cell
+item.itemCellSeleniousAcid.name=Selenious Acid Cell
diff --git a/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_B.png b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_B.png
new file mode 100644
index 0000000000..3a1b683837
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/blocks/metro/TEXTURE_STONE_RED_B.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/IndustrialDiamondExquisite.png b/src/resources/assets/miscutils/textures/items/IndustrialDiamondExquisite.png
new file mode 100644
index 0000000000..5427f66858
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/IndustrialDiamondExquisite.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/130.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/130.png
new file mode 100644
index 0000000000..1938287f27
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/130.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/131.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/131.png
new file mode 100644
index 0000000000..327e530f1b
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/131.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/132.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/132.png
new file mode 100644
index 0000000000..635be463af
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/132.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/133.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/133.png
new file mode 100644
index 0000000000..24afa30c17
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/133.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/134.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/134.png
new file mode 100644
index 0000000000..847e54ef60
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/134.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/135.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/135.png
new file mode 100644
index 0000000000..ddd9cb7a2f
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/135.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/136.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/136.png
new file mode 100644
index 0000000000..e21c4fb78c
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/136.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/137.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/137.png
new file mode 100644
index 0000000000..29e270f862
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/137.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/138.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/138.png
new file mode 100644
index 0000000000..87a48050fd
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/138.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/MU-metaitem.01/139.png b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/139.png
new file mode 100644
index 0000000000..3836414587
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/MU-metaitem.01/139.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/baubles/itemFireProtectGlovesBetter.png b/src/resources/assets/miscutils/textures/items/baubles/itemFireProtectGlovesBetter.png
new file mode 100644
index 0000000000..8576ae1b7a
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/baubles/itemFireProtectGlovesBetter.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/chargepack/1.png b/src/resources/assets/miscutils/textures/items/chargepack/1.png
new file mode 100644
index 0000000000..9039d443c3
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/chargepack/1.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/chargepack/2.png b/src/resources/assets/miscutils/textures/items/chargepack/2.png
new file mode 100644
index 0000000000..7023e7ce82
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/chargepack/2.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/chargepack/3.png b/src/resources/assets/miscutils/textures/items/chargepack/3.png
new file mode 100644
index 0000000000..4d787e7aa8
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/chargepack/3.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/chargepack/4.png b/src/resources/assets/miscutils/textures/items/chargepack/4.png
new file mode 100644
index 0000000000..9320de0611
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/chargepack/4.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/chargepack/5.png b/src/resources/assets/miscutils/textures/items/chargepack/5.png
new file mode 100644
index 0000000000..ab8771c89c
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/chargepack/5.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/itemFineWire.png b/src/resources/assets/miscutils/textures/items/itemFineWire.png
new file mode 100644
index 0000000000..1804dc358b
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/itemFineWire.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/itemHeavyPlate.png b/src/resources/assets/miscutils/textures/items/itemHeavyPlate.png
index 1f005e0156..e09ff6d1df 100644
--- a/src/resources/assets/miscutils/textures/items/itemHeavyPlate.png
+++ b/src/resources/assets/miscutils/textures/items/itemHeavyPlate.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/itemHeavyPlate_Overlay.png b/src/resources/assets/miscutils/textures/items/itemHeavyPlate_Overlay.png
new file mode 100644
index 0000000000..c3835b07c1
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/itemHeavyPlate_Overlay.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/itemSmallSpring.png b/src/resources/assets/miscutils/textures/items/itemSmallSpring.png
new file mode 100644
index 0000000000..54b3afb24e
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/itemSmallSpring.png
Binary files differ
diff --git a/src/resources/assets/miscutils/textures/items/itemSpring.png b/src/resources/assets/miscutils/textures/items/itemSpring.png
new file mode 100644
index 0000000000..df442ed454
--- /dev/null
+++ b/src/resources/assets/miscutils/textures/items/itemSpring.png
Binary files differ
diff --git a/src/resources/mcmod.info b/src/resources/mcmod.info
index 4bf9f01d84..626949452a 100644
--- a/src/resources/mcmod.info
+++ b/src/resources/mcmod.info
@@ -5,7 +5,7 @@
"description": "Adds over 100 new Multiblocks, Machines, etc to Gregtech.",
"credits": "",
"logoFile": "",
- "version": "1.7.02.99-pre",
+ "version": "1.7.03.01",
"mcversion": "1.7.10",
"url": "https://github.com/draknyte1/GTplusplus/wiki",
"updateUrl": "https://github.com/draknyte1/GTplusplus/releases/latest",