aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
authorHoleFish <48403212+HoleFish@users.noreply.github.com>2024-08-24 03:51:40 +0800
committerGitHub <noreply@github.com>2024-08-23 21:51:40 +0200
commit56c98aa0ca2ccab586abe13e3064b1e3499731ec (patch)
treeee64e4ff405d8c6a92cc097d7d18d7bf10b25554 /src/main/java/com
parent71e7f3dc16a7be69a3f89c17a170d401383bf021 (diff)
downloadGT5-Unofficial-56c98aa0ca2ccab586abe13e3064b1e3499731ec.tar.gz
GT5-Unofficial-56c98aa0ca2ccab586abe13e3064b1e3499731ec.tar.bz2
GT5-Unofficial-56c98aa0ca2ccab586abe13e3064b1e3499731ec.zip
Display real data stick for assembly line recipes in NEI (#2917)
* display real data stick * spotless --------- Co-authored-by: Martin Robertz <dream-master@gmx.net>
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java10
-rw-r--r--src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java101
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java235
-rw-r--r--src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java2
4 files changed, 89 insertions, 259 deletions
diff --git a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java
index a34685bb9c..b6f58ebd0f 100644
--- a/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java
+++ b/src/main/java/com/github/bartimaeusnek/bartworks/common/tileentities/debug/CreativeScanner.java
@@ -54,6 +54,16 @@ public class CreativeScanner extends GT_MetaTileEntity_Scanner {
}
@Override
+ protected boolean hasEnoughEnergyToCheckRecipe() {
+ return true;
+ }
+
+ @Override
+ protected boolean drainEnergyForProcess(long aEUt) {
+ return true;
+ }
+
+ @Override
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
this.mProgresstime = this.mMaxProgresstime;
super.onPostTick(aBaseMetaTileEntity, aTick);
diff --git a/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java b/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java
index 6cb0ec0791..ce98b6dc86 100644
--- a/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java
+++ b/src/main/java/com/github/technus/tectech/recipe/TT_recipeAdder.java
@@ -19,6 +19,7 @@ import com.github.technus.tectech.thing.CustomItemList;
import cpw.mods.fml.common.registry.GameRegistry;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.ItemList;
+import gregtech.api.util.GT_AssemblyLineUtils;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Recipe.GT_Recipe_AssemblyLine;
@@ -54,10 +55,32 @@ public class TT_recipeAdder extends GT_RecipeAdder {
}
researchAmperage = GT_Utility.clamp(researchAmperage, 1, Short.MAX_VALUE);
computationRequiredPerSec = GT_Utility.clamp(computationRequiredPerSec, 1, Short.MAX_VALUE);
+
+ GT_Recipe_AssemblyLine recipeGT = new GT_Recipe.GT_Recipe_AssemblyLine(
+ CustomItemList.UnusedStuff.get(1),
+ totalComputationRequired / computationRequiredPerSec,
+ aInputs,
+ aFluidInputs,
+ aOutput,
+ assDuration,
+ assEUt);
+ GT_Recipe_AssemblyLine recipeTT = new GT_Recipe.GT_Recipe_AssemblyLine(
+ aResearchItem,
+ totalComputationRequired / computationRequiredPerSec,
+ aInputs,
+ aFluidInputs,
+ aOutput,
+ assDuration,
+ assEUt);
+ GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(recipeGT);
+ TecTechRecipeMaps.researchableALRecipeList.add(recipeTT);
+
+ ItemStack writesDataStick = ItemList.Tool_DataStick.getWithName(1L, "Writes Research result");
+ GT_AssemblyLineUtils.setAssemblyLineRecipeOnDataStick(writesDataStick, recipeTT, false);
GT_Values.RA.stdBuilder()
.itemInputs(aResearchItem)
.itemOutputs(aOutput)
- .special(ItemList.Tool_DataStick.getWithName(1L, "Writes Research result"))
+ .special(writesDataStick)
.duration(totalComputationRequired)
.eut(researchEUt)
.metadata(RESEARCH_STATION_DATA, researchAmperage | computationRequiredPerSec << 16)
@@ -66,35 +89,18 @@ public class TT_recipeAdder extends GT_RecipeAdder {
.fake()
.addTo(researchStationFakeRecipes);
+ ItemStack readsDataStick = ItemList.Tool_DataStick.getWithName(1L, "Reads Research result");
+ GT_AssemblyLineUtils.setAssemblyLineRecipeOnDataStick(readsDataStick, recipeTT, false);
GT_Values.RA.stdBuilder()
.itemInputs(aInputs)
.itemOutputs(aOutput)
.fluidInputs(aFluidInputs)
- .special(ItemList.Tool_DataStick.getWithName(1L, "Reads Research result"))
+ .special(readsDataStick)
.duration(assDuration)
.eut(assEUt)
.ignoreCollision()
.fake()
.addTo(assemblylineVisualRecipes);
-
- GT_Recipe.GT_Recipe_AssemblyLine.sAssemblylineRecipes.add(
- new GT_Recipe.GT_Recipe_AssemblyLine(
- CustomItemList.UnusedStuff.get(1),
- totalComputationRequired / computationRequiredPerSec,
- aInputs,
- aFluidInputs,
- aOutput,
- assDuration,
- assEUt));
- TecTechRecipeMaps.researchableALRecipeList.add(
- new GT_Recipe.GT_Recipe_AssemblyLine(
- aResearchItem,
- totalComputationRequired / computationRequiredPerSec,
- aInputs,
- aFluidInputs,
- aOutput,
- assDuration,
- assEUt));
return true;
}
@@ -190,30 +196,6 @@ public class TT_recipeAdder extends GT_RecipeAdder {
tPersistentHash = tPersistentHash * 31 + assDuration;
tPersistentHash = tPersistentHash * 31 + assEUt;
- GT_Values.RA.stdBuilder()
- .itemInputs(aResearchItem)
- .itemOutputs(aOutput)
- .special(ItemList.Tool_DataStick.getWithName(1L, "Writes Research result"))
- .duration(totalComputationRequired)
- .eut(researchEUt)
- .metadata(RESEARCH_STATION_DATA, researchAmperage | computationRequiredPerSec << 16)
- .noOptimize()
- .ignoreCollision()
- .fake()
- .addTo(researchStationFakeRecipes);
-
- assemblylineVisualRecipes.addFakeRecipe(
- false,
- tInputs,
- new ItemStack[] { aOutput },
- new ItemStack[] { ItemList.Tool_DataStick.getWithName(1L, "Reads Research result") },
- aFluidInputs,
- null,
- assDuration,
- assEUt,
- 0,
- tAlts,
- false);
GT_Recipe_AssemblyLine recipeGT = new GT_Recipe_AssemblyLine(
CustomItemList.UnusedStuff.get(1),
totalComputationRequired / computationRequiredPerSec,
@@ -236,6 +218,35 @@ public class TT_recipeAdder extends GT_RecipeAdder {
tAlts);
recipeTT.setPersistentHash(tPersistentHash);
TecTechRecipeMaps.researchableALRecipeList.add(recipeTT);
+
+ ItemStack writesDataStick = ItemList.Tool_DataStick.getWithName(1L, "Writes Research result");
+ GT_AssemblyLineUtils.setAssemblyLineRecipeOnDataStick(writesDataStick, recipeTT, false);
+ GT_Values.RA.stdBuilder()
+ .itemInputs(aResearchItem)
+ .itemOutputs(aOutput)
+ .special(writesDataStick)
+ .duration(totalComputationRequired)
+ .eut(researchEUt)
+ .metadata(RESEARCH_STATION_DATA, researchAmperage | computationRequiredPerSec << 16)
+ .noOptimize()
+ .ignoreCollision()
+ .fake()
+ .addTo(researchStationFakeRecipes);
+
+ ItemStack readsDataStick = ItemList.Tool_DataStick.getWithName(1L, "Reads Research result");
+ GT_AssemblyLineUtils.setAssemblyLineRecipeOnDataStick(readsDataStick, recipeTT, false);
+ assemblylineVisualRecipes.addFakeRecipe(
+ false,
+ tInputs,
+ new ItemStack[] { aOutput },
+ new ItemStack[] { readsDataStick },
+ aFluidInputs,
+ null,
+ assDuration,
+ assEUt,
+ 0,
+ tAlts,
+ false);
return true;
}
}
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java
index 26dd4248b1..af9439d13a 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/GT_MetaTileEntity_EM_research.java
@@ -20,7 +20,6 @@ import static net.minecraft.util.StatCollector.translateToLocalFormatted;
import java.util.ArrayList;
import java.util.Collections;
-import java.util.LinkedHashMap;
import java.util.List;
import javax.annotation.Nonnull;
@@ -29,8 +28,6 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-import net.minecraft.nbt.NBTTagString;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.EnumChatFormatting;
@@ -58,6 +55,7 @@ import com.gtnewhorizons.modularui.common.widget.TextWidget;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Textures;
+import gregtech.api.enums.TierEU;
import gregtech.api.interfaces.IHatchElement;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
@@ -69,7 +67,6 @@ import gregtech.api.recipe.check.CheckRecipeResult;
import gregtech.api.recipe.check.CheckRecipeResultRegistry;
import gregtech.api.recipe.check.SimpleCheckRecipeResult;
import gregtech.api.util.GT_AssemblyLineUtils;
-import gregtech.api.util.GT_LanguageManager;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Recipe;
import gregtech.api.util.GT_Utility;
@@ -99,8 +96,6 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB
// Used to sync currently researching item to GUI
private String clientOutputName;
- private static LinkedHashMap<String, String> lServerNames;
-
private static final String[] description = new String[] {
EnumChatFormatting.AQUA + translateToLocal("tt.keyphrase.Hint_Details") + ":",
translateToLocal("gt.blockmachines.multimachine.em.research.hint.0"), // 1 - Classic/Data Hatches or
@@ -148,183 +143,17 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB
private void makeStick() {
mInventory[1].setTagCompound(new NBTTagCompound());
- mInventory[1].setStackDisplayName(
- GT_LanguageManager.getTranslation(tRecipe.mOutput.getDisplayName()) + " Construction Data");
- GT_Utility.ItemNBT.setBookTitle(
- mInventory[1],
- GT_LanguageManager.getTranslation(tRecipe.mOutput.getDisplayName()) + " Construction Data");
- NBTTagCompound tNBT = mInventory[1].getTagCompound(); // code above makes it not null
-
- tNBT.setTag("output", tRecipe.mOutput.writeToNBT(new NBTTagCompound()));
- tNBT.setInteger("time", tRecipe.mDuration);
- tNBT.setInteger("eu", tRecipe.mEUt);
- for (int i = 0; i < tRecipe.mInputs.length; i++) {
- tNBT.setTag(String.valueOf(i), tRecipe.mInputs[i].writeToNBT(new NBTTagCompound()));
- }
- for (int i = 0; i < tRecipe.mFluidInputs.length; i++) {
- tNBT.setTag("f" + i, tRecipe.mFluidInputs[i].writeToNBT(new NBTTagCompound()));
- }
- tNBT.setString(
- "author",
- EnumChatFormatting.BLUE + "Tec"
- + EnumChatFormatting.DARK_BLUE
- + "Tech"
- + EnumChatFormatting.WHITE
- + " Assembling Line Recipe Generator");
- NBTTagList tNBTList = new NBTTagList();
- tNBTList.appendTag(
- new NBTTagString(
- "Construction plan for " + tRecipe.mOutput.stackSize
+ mInventory[1].getTagCompound()
+ .setString(
+ "author",
+ EnumChatFormatting.BLUE + "Tec"
+ + EnumChatFormatting.DARK_BLUE
+ + "Tech"
+ + EnumChatFormatting.WHITE
+ ' '
- + GT_LanguageManager.getTranslation(tRecipe.mOutput.getDisplayName())
- + ". Needed EU/t: "
- + tRecipe.mEUt
- + " Production time: "
- + tRecipe.mDuration / 20));
- for (int i = 0; i < tRecipe.mInputs.length; i++) {
- if (tRecipe.mInputs[i] != null) {
- tNBTList.appendTag(
- new NBTTagString(
- "Input Bus " + (i + 1)
- + ": "
- + tRecipe.mInputs[i].stackSize
- + ' '
- + GT_LanguageManager.getTranslation(tRecipe.mInputs[i].getDisplayName())));
- }
- }
- for (int i = 0; i < tRecipe.mFluidInputs.length; i++) {
- if (tRecipe.mFluidInputs[i] != null) {
- tNBTList.appendTag(
- new NBTTagString(
- "Input Hatch " + (i + 1)
- + ": "
- + tRecipe.mFluidInputs[i].amount
- + "L "
- + GT_LanguageManager.getTranslation(tRecipe.mFluidInputs[i].getLocalizedName())));
- }
- }
- tNBT.setTag("pages", tNBTList);
- }
-
- static {
- try {
- Class<?> GT_Assemblyline_Server = Class.forName("gregtech.api.util.GT_Assemblyline_Server");
- lServerNames = (LinkedHashMap<String, String>) GT_Assemblyline_Server.getField("lServerNames")
- .get(null);
- } catch (ClassNotFoundException | NoSuchFieldException | IllegalAccessException e) {
- lServerNames = null;
- }
- }
-
- private void makeStick2() {
- String s = tRecipe.mOutput.getDisplayName();
- if (getBaseMetaTileEntity().isServerSide()) {
- if (lServerNames != null) {
- s = lServerNames.get(tRecipe.mOutput.getDisplayName());
- if (s == null) {
- s = tRecipe.mOutput.getDisplayName();
- }
- } else {
- s = tRecipe.mOutput.getDisplayName();
- }
- }
- mInventory[1].setTagCompound(new NBTTagCompound());
- mInventory[1].setStackDisplayName(s + " Construction Data");
- GT_Utility.ItemNBT.setBookTitle(mInventory[1], s + " Construction Data");
-
- NBTTagCompound tNBT = mInventory[1].getTagCompound();
-
- tNBT.setTag("output", tRecipe.mOutput.writeToNBT(new NBTTagCompound()));
- tNBT.setInteger("time", tRecipe.mDuration);
- tNBT.setInteger("eu", tRecipe.mEUt);
- for (int i = 0; i < tRecipe.mInputs.length; i++) {
- tNBT.setTag("" + i, tRecipe.mInputs[i].writeToNBT(new NBTTagCompound()));
- }
- for (int i = 0; i < tRecipe.mOreDictAlt.length; i++) {
- if (tRecipe.mOreDictAlt[i] != null && tRecipe.mOreDictAlt[i].length > 0) {
- tNBT.setInteger("a" + i, tRecipe.mOreDictAlt[i].length);
- for (int j = 0; j < tRecipe.mOreDictAlt[i].length; j++) {
- tNBT.setTag("a" + i + ":" + j, tRecipe.mOreDictAlt[i][j].writeToNBT(new NBTTagCompound()));
- }
- }
- }
- for (int i = 0; i < tRecipe.mFluidInputs.length; i++) {
- tNBT.setTag("f" + i, tRecipe.mFluidInputs[i].writeToNBT(new NBTTagCompound()));
- }
- tNBT.setString(
- "author",
- EnumChatFormatting.BLUE + "Tec"
- + EnumChatFormatting.DARK_BLUE
- + "Tech"
- + EnumChatFormatting.WHITE
- + ' '
- + machineType
- + " Recipe Generator");
- NBTTagList tNBTList = new NBTTagList();
- s = tRecipe.mOutput.getDisplayName();
- if (getBaseMetaTileEntity().isServerSide()) {
- s = lServerNames.get(tRecipe.mOutput.getDisplayName());
- if (s == null) {
- s = tRecipe.mOutput.getDisplayName();
- }
- }
- tNBTList.appendTag(
- new NBTTagString(
- "Construction plan for " + tRecipe.mOutput.stackSize
- + " "
- + s
- + ". Needed EU/t: "
- + tRecipe.mEUt
- + " Production time: "
- + (tRecipe.mDuration / 20)));
- for (int i = 0; i < tRecipe.mInputs.length; i++) {
- if (tRecipe.mOreDictAlt[i] != null) {
- int count = 0;
- StringBuilder tBuilder = new StringBuilder("Input Bus " + (i + 1) + ": ");
- for (ItemStack tStack : tRecipe.mOreDictAlt[i]) {
- if (tStack != null) {
- s = tStack.getDisplayName();
- if (getBaseMetaTileEntity().isServerSide()) {
- s = lServerNames.get(tStack.getDisplayName());
- if (s == null) s = tStack.getDisplayName();
- }
-
- tBuilder.append(count == 0 ? "" : "\nOr ")
- .append(tStack.stackSize)
- .append(" ")
- .append(s);
- count++;
- }
- }
- if (count > 0) tNBTList.appendTag(new NBTTagString(tBuilder.toString()));
- } else if (tRecipe.mInputs[i] != null) {
- s = tRecipe.mInputs[i].getDisplayName();
- if (getBaseMetaTileEntity().isServerSide()) {
- s = lServerNames.get(tRecipe.mInputs[i].getDisplayName());
- if (s == null) {
- s = tRecipe.mInputs[i].getDisplayName();
- }
- }
- tNBTList.appendTag(
- new NBTTagString("Input Bus " + (i + 1) + ": " + tRecipe.mInputs[i].stackSize + " " + s));
- }
- }
- for (int i = 0; i < tRecipe.mFluidInputs.length; i++) {
- if (tRecipe.mFluidInputs[i] != null) {
- s = tRecipe.mFluidInputs[i].getLocalizedName();
- if (getBaseMetaTileEntity().isServerSide()) {
- s = lServerNames.get(tRecipe.mFluidInputs[i].getLocalizedName());
- if (s == null) {
- s = tRecipe.mFluidInputs[i].getLocalizedName();
- }
- }
- tNBTList.appendTag(
- new NBTTagString("Input Hatch " + (i + 1) + ": " + tRecipe.mFluidInputs[i].amount + "L " + s));
- }
- }
- tNBT.setTag("pages", tNBTList);
-
- mInventory[1].setTagCompound(tNBT);
+ + machineType
+ + " Recipe Generator");
+ GT_AssemblyLineUtils.setAssemblyLineRecipeOnDataStick(mInventory[1], tRecipe);
}
private boolean iterateRecipes() {
@@ -392,16 +221,13 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB
return SimpleCheckRecipeResult.ofFailure("wrongRequirements");
}
this.tRecipe = assRecipe;
- // Scanner mode should consume item first
- eHolders.get(0).mInventory[0] = null;
- mInventory[1] = null;
// Set property
computationRequired = computationRemaining = assRecipe.mResearchTime;
mMaxProgresstime = 20;
mEfficiencyIncrease = 10000;
eRequiredData = 1;
eAmpereFlow = 1;
- mEUt = -524288;
+ mEUt = (int) -TierEU.RECIPE_UV;
eHolders.get(0)
.getBaseMetaTileEntity()
.setActive(true);
@@ -435,31 +261,12 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB
@Override
public void outputAfterRecipe_EM() {
if (!eHolders.isEmpty()) {
- switch (machineType) {
- case assembly -> {
- if (tRecipe != null && ItemList.Tool_DataStick.isStackEqual(mInventory[1], false, true)) {
- eHolders.get(0)
- .getBaseMetaTileEntity()
- .setActive(false);
- eHolders.get(0).mInventory[0] = null;
- if (lServerNames == null) {
- makeStick();
- } else {
- try {
- makeStick2();
- } catch (NoSuchFieldError e) {
- makeStick();
- }
- }
- }
- }
- case scanner -> {
- mInventory[1] = ItemList.Tool_DataStick.get(1);
- GT_AssemblyLineUtils.setAssemblyLineRecipeOnDataStick(mInventory[1], tRecipe);
- eHolders.get(0)
- .getBaseMetaTileEntity()
- .setActive(false);
- }
+ if (tRecipe != null && ItemList.Tool_DataStick.isStackEqual(mInventory[1], false, true)) {
+ eHolders.get(0)
+ .getBaseMetaTileEntity()
+ .setActive(false);
+ eHolders.get(0).mInventory[0] = null;
+ makeStick();
}
}
computationRequired = computationRemaining = 0;
@@ -470,8 +277,8 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB
@Override
public GT_Multiblock_Tooltip_Builder createTooltip() {
final GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
- tt.addMachineType(translateToLocal("gt.blockmachines.multimachine.em.research.name")) // Machine Type: Research
- // Station
+ tt.addMachineType(translateToLocal("gt.blockmachines.multimachine.em.research.type")) // Machine Type: Research
+ // Station, Scanner
.addInfo(translateToLocal("gt.blockmachines.multimachine.em.research.desc.0")) // Controller block of
// the Research Station
.addInfo(translateToLocal("gt.blockmachines.multimachine.em.research.desc.1")) // Used to scan Data
@@ -482,6 +289,8 @@ public class GT_MetaTileEntity_EM_research extends GT_MetaTileEntity_MultiblockB
.addInfo(translateToLocal("gt.blockmachines.multimachine.em.research.desc.3")) // Does not consume the
// item until
// the Data Stick is written
+ .addInfo(translateToLocal("gt.blockmachines.multimachine.em.research.desc.4")) // Use screwdriver to change
+ // mode
.addInfo(translateToLocal("tt.keyword.Structure.StructureTooComplex")) // The structure is too complex!
.addSeparator()
.beginStructureBlock(3, 7, 7, false)
diff --git a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java
index 48c2e44bba..ad0c5a0c97 100644
--- a/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java
+++ b/src/main/java/com/github/technus/tectech/thing/metaTileEntity/multi/base/GT_MetaTileEntity_MultiblockBase_EM.java
@@ -1518,7 +1518,7 @@ public abstract class GT_MetaTileEntity_MultiblockBase_EM
if (!drainEnergyInput(
getPowerFlow() * getMaxEfficiency(aStack) / Math.max(1000L, mEfficiency),
eAmpereFlow)) {
- criticalStopMachine();
+ stopMachine(ShutDownReasonRegistry.POWER_LOSS);
return false;
}
}