Skip to content

Commit 6201c8e

Browse files
make loop cheaper
1 parent 1a29d89 commit 6201c8e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/main/java/gregtech/api/metatileentity/MetaTileEntity.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -967,23 +967,21 @@ public static boolean addFluidsToFluidHandler(IFluidHandler handler, boolean sim
967967
}
968968

969969
public boolean isInputEmpty() {
970-
boolean emptyInputSlots = true;
971-
boolean emptyInputTanks = true;
972970
if (importItems.getSlots() > 0) {
973971
for (int i = 0; i < importItems.getSlots(); i++) {
974972
if (!importItems.getStackInSlot(i).isEmpty()) {
975-
emptyInputSlots = false;
973+
return false;
976974
}
977975
}
978976
}
979977
if (importFluids.getTanks() > 0) {
980978
for (int i = 0; i < importFluids.getTanks(); i++) {
981979
if (importFluids.getTankAt(i).getFluid() != null) {
982-
emptyInputTanks = false;
980+
return false;
983981
}
984982
}
985983
}
986-
return (emptyInputSlots && emptyInputTanks);
984+
return true;
987985
}
988986

989987
public boolean isOutputFull() {

0 commit comments

Comments
 (0)