aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java1
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java23
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java19
-rw-r--r--src/main/resources/assets/bartworks/textures/blocks/TransformerCoil.pngbin1249 -> 665 bytes
4 files changed, 33 insertions, 10 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
index f0b1be2d03..7b645304a2 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/MainMod.java
@@ -60,6 +60,7 @@ import java.io.IOException;
import java.util.Map;
import static com.github.bartimaeusnek.bartworks.common.loaders.BioRecipeLoader.runOnServerStarted;
+import static com.github.bartimaeusnek.bartworks.common.tileentities.multis.GT_TileEntity_ElectricImplosionCompressor.eicMap;
import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.removeIC2Recipes;
import static gregtech.api.enums.GT_Values.VN;
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java
index 154d2a03d6..098dd2c8d0 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/loaders/StaticRecipeChangeLoaders.java
@@ -32,13 +32,10 @@ import com.github.bartimaeusnek.bartworks.util.StreamUtils;
import com.github.bartimaeusnek.bartworks.util.log.DebugLog;
import com.github.bartimaeusnek.crossmod.BartWorksCrossmod;
import com.google.common.collect.ArrayListMultimap;
+import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry;
import gnu.trove.map.hash.TObjectDoubleHashMap;
-import gregtech.api.enums.Element;
-import gregtech.api.enums.ItemList;
-import gregtech.api.enums.Materials;
-import gregtech.api.enums.OrePrefixes;
-import gregtech.api.enums.SubTag;
+import gregtech.api.enums.*;
import gregtech.api.objects.GT_ItemStack;
import gregtech.api.util.GT_ModHandler;
import gregtech.api.util.GT_OreDictUnificator;
@@ -73,6 +70,8 @@ import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader
import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.Oganesson;
import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.fluids;
import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.molten;
+import static com.github.bartimaeusnek.bartworks.system.material.WerkstoffLoader.*;
+import static gregtech.api.enums.GT_Values.MOD_ID_FR;
import static gregtech.api.enums.GT_Values.VN;
public class StaticRecipeChangeLoaders {
@@ -489,6 +488,20 @@ public class StaticRecipeChangeLoaders {
eicMap = new GT_Recipe.GT_Recipe_Map(new HashSet<>(GT_Recipe.GT_Recipe_Map.sImplosionRecipes.mRecipeList.size()), "gt.recipe.electricimplosioncompressor", "Electric Implosion Compressor", (String) null, "gregtech:textures/gui/basicmachines/Default", 1, 2, 1, 0, 1, "", 1, "", true, true);
GT_Recipe.GT_Recipe_Map.sImplosionRecipes.mRecipeList.stream().filter(e -> e.mInputs != null).forEach(recipe -> eicMap.addRecipe(true, Arrays.stream(recipe.mInputs).filter(e -> !StaticRecipeChangeLoaders.checkForExplosives(e)).distinct().toArray(ItemStack[]::new), recipe.mOutputs, null, null, null, 1, BW_Util.getMachineVoltageFromTier(10), 0));
}
+
+ // Custom electric implosion compressor recipe. Cannot be overclocked.
+ if (Loader.isModLoaded("eternalsingularity")) {
+
+ // 1L SpaceTime -> 1 Eternal singularity.
+ eicMap.addRecipe(
+ false,
+ new ItemStack[]{GT_Values.NI},
+ new ItemStack[]{GT_ModHandler.getModItem("eternalsingularity", "eternal_singularity", 1L)},
+ null,
+ new FluidStack[]{Materials.SpaceTime.getMolten(1L)},
+ new FluidStack[]{GT_Values.NF},
+ 100*20, 128_000_000, 1); // aSpecialVaue has no meaning here.
+ }
}
private static boolean checkForExplosives(ItemStack input) {
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java
index 95e8f311ec..18e0ec9272 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/multis/GT_TileEntity_ElectricImplosionCompressor.java
@@ -43,12 +43,14 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;
+import net.minecraftforge.fluids.FluidStack;
import java.util.ArrayList;
import static com.github.bartimaeusnek.bartworks.common.loaders.ItemRegistry.BW_BLOCKS;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
+import static gregtech.api.enums.GT_Values.V;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
public class GT_TileEntity_ElectricImplosionCompressor extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_TileEntity_ElectricImplosionCompressor> {
@@ -180,15 +182,22 @@ public class GT_TileEntity_ElectricImplosionCompressor extends GT_MetaTileEntity
}
}
- ItemStack[] tInputs = tInputList.toArray(new ItemStack[0]);
+ ItemStack[] tItemInputs = tInputList.toArray(new ItemStack[0]);
+ FluidStack[] tFluidInputs = getCompactedFluids();
+
+ long tVoltage = getMaxInputVoltage();
+ byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
+
+
if (tInputList.size() > 0) {
- GT_Recipe tRecipe = GT_TileEntity_ElectricImplosionCompressor.eicMap.findRecipe(this.getBaseMetaTileEntity(), false, 9223372036854775807L, null, tInputs);
- if (tRecipe != null && tRecipe.isRecipeInputEqual(true, null, tInputs)) {
+ GT_Recipe tRecipe = GT_TileEntity_ElectricImplosionCompressor.eicMap.findRecipe(this.getBaseMetaTileEntity(), false, V[tTier], tFluidInputs, tItemInputs);
+ if (tRecipe != null && tRecipe.isRecipeInputEqual(true, tFluidInputs, tItemInputs)) {
this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000;
this.mEfficiencyIncrease = 10000;
this.mEUt = -tRecipe.mEUt;
- this.mMaxProgresstime = Math.max(1, tRecipe.mDuration);
- this.mOutputItems = new ItemStack[]{tRecipe.getOutput(0), tRecipe.getOutput(1)};
+ calculateOverclockedNessMulti(tRecipe.mEUt, tRecipe.mDuration, 1, tVoltage);
+ this.mOutputItems = tRecipe.mOutputs.clone();
+ this.mOutputFluids = tRecipe.mFluidOutputs.clone();
this.sendLoopStart((byte) 20);
this.updateSlots();
return true;
diff --git a/src/main/resources/assets/bartworks/textures/blocks/TransformerCoil.png b/src/main/resources/assets/bartworks/textures/blocks/TransformerCoil.png
index 205816b31f..79801b0471 100644
--- a/src/main/resources/assets/bartworks/textures/blocks/TransformerCoil.png
+++ b/src/main/resources/assets/bartworks/textures/blocks/TransformerCoil.png
Binary files differ