From c8fc878cd693b454d500f1cae611a363b59914ea Mon Sep 17 00:00:00 2001 From: HoleFish <48403212+HoleFish@users.noreply.github.com> Date: Sun, 3 Dec 2023 21:18:22 +0800 Subject: [PATCH] fix Naquadah Reactor don't detect ME input hatch when running (#218) * fix * adjust --- .../goodgenerator/blocks/tileEntity/MultiNqGenerator.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/goodgenerator/blocks/tileEntity/MultiNqGenerator.java b/src/main/java/goodgenerator/blocks/tileEntity/MultiNqGenerator.java index 51a8dfde..2885ad1f 100644 --- a/src/main/java/goodgenerator/blocks/tileEntity/MultiNqGenerator.java +++ b/src/main/java/goodgenerator/blocks/tileEntity/MultiNqGenerator.java @@ -194,7 +194,6 @@ public void saveNBTData(NBTTagCompound aNBT) { public @NotNull CheckRecipeResult checkProcessing_EM() { ArrayList tFluids = getStoredFluids(); - for (int i = 0; i < tFluids.size() - 1; i++) { for (int j = i + 1; j < tFluids.size(); j++) { if (GT_Utility.areFluidsEqual(tFluids.get(i), tFluids.get(j))) { @@ -233,6 +232,8 @@ public void saveNBTData(NBTTagCompound aNBT) { public boolean onRunningTick(ItemStack stack) { if (this.getBaseMetaTileEntity().isServerSide()) { if (mMaxProgresstime != 0 && mProgresstime % 20 == 0) { + // If there's no startRecipeProcessing, ME input hatch wouldn't work + startRecipeProcessing(); FluidStack[] input = getStoredFluids().toArray(new FluidStack[0]); int eff = 100, time = 1; if (LiquidAirConsumptionPerSecond != 0 @@ -240,6 +241,7 @@ public boolean onRunningTick(ItemStack stack) { this.mEUt = 0; this.trueEff = 0; this.trueOutput = 0; + endRecipeProcessing(); return true; } if (getCoolant(input, true) != null) eff = getCoolant(input, false).getValue(); @@ -247,6 +249,7 @@ public boolean onRunningTick(ItemStack stack) { this.mEUt = basicOutput * eff * time / 100; this.trueEff = eff; this.trueOutput = (long) basicOutput * (long) eff * (long) time / 100; + endRecipeProcessing(); } addAutoEnergy(trueOutput); }