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

Commit

Permalink
Fix hatch requirement and machine tier check
Browse files Browse the repository at this point in the history
  • Loading branch information
HoleFish committed Jan 22, 2024
1 parent e82e8ae commit 251acd7
Showing 1 changed file with 5 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -325,34 +325,18 @@ public IStructureDefinition<GregtechMetaTileEntity_QuantumForceTransformer> getS
@Override
public boolean checkMachine(IGregTechTileEntity aBaseMetaTileEntity, ItemStack aStack) {
this.mCasing = 0;
this.mCraftingTier = 0;
this.mFocusingTier = 0;
if (!checkPiece(MAIN_PIECE, 7, 20, 4)) {
return false;
}

if (mMaintenanceHatches.size() != 1 || mOutputBusses.size() < 1
|| mInputBusses.size() < 1
|| mInputHatches.size() < 1
|| mOutputHatches.size() < 1) {
if (mMaintenanceHatches.size() != 1 || mOutputBusses.isEmpty()
|| mOutputHatches.isEmpty()) {
return false;
}

// Makes sure that the multi can accept only 1 TT Energy Hatch OR up to 2 Normal Energy Hatches. Deform if both
// present or more than 1 TT Hatch.
if (mExoticEnergyHatches.isEmpty() && mEnergyHatches.isEmpty()) {
return false;
}

if (mExoticEnergyHatches.size() >= 1) {
if (!mEnergyHatches.isEmpty()) {
return false;
}

if (mExoticEnergyHatches.size() != 1) {
return false;
}
}

return mEnergyHatches.size() <= 2;
return checkExoticAndNormalEnergyHatches();
}

@Override
Expand Down

0 comments on commit 251acd7

Please sign in to comment.