Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Commit

Permalink
fix Naquadah Reactor don't detect ME input hatch when running (#218)
Browse files Browse the repository at this point in the history
* fix

* adjust
  • Loading branch information
HoleFish authored Dec 3, 2023
1 parent 89af477 commit c8fc878
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ public void saveNBTData(NBTTagCompound aNBT) {
public @NotNull CheckRecipeResult checkProcessing_EM() {

ArrayList<FluidStack> 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))) {
Expand Down Expand Up @@ -233,20 +232,24 @@ 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
&& !consumeFuel(Materials.LiquidAir.getFluid(LiquidAirConsumptionPerSecond), input)) {
this.mEUt = 0;
this.trueEff = 0;
this.trueOutput = 0;
endRecipeProcessing();
return true;
}
if (getCoolant(input, true) != null) eff = getCoolant(input, false).getValue();
if (consumeFuel(lockedFluid, input)) time = times;
this.mEUt = basicOutput * eff * time / 100;
this.trueEff = eff;
this.trueOutput = (long) basicOutput * (long) eff * (long) time / 100;
endRecipeProcessing();
}
addAutoEnergy(trueOutput);
}
Expand Down

0 comments on commit c8fc878

Please sign in to comment.