MCPcopy Create free account
hub / github.com/GregTech6/gregtech6 / checkStacksEqual

Method checkStacksEqual

src/main/java/gregapi/recipes/Recipe.java:765–785  ·  view source on GitHub ↗
(boolean aDecreaseStacksizeBySuccess, boolean aDontCheckStackSizes, ItemStack... aInputs)

Source from the content-addressed store, hash-verified

763 }
764
765 public boolean checkStacksEqual(boolean aDecreaseStacksizeBySuccess, boolean aDontCheckStackSizes, ItemStack... aInputs) {
766 boolean[] tChecked = new boolean[aInputs.length];
767 for (ItemStack tInput : mInputs) if (ST.valid(tInput)) {
768 boolean temp = T;
769 for (int i = 0; i < aInputs.length; i++) if (!tChecked[i]) {
770 ItemStack aInput = aInputs[i];
771 if (ST.valid(aInput)) {
772 if ((aDontCheckStackSizes || aInput.stackSize >= tInput.stackSize) && OreDictManager.INSTANCE.equal_(F, aInput, tInput, !tInput.hasTagCompound())) {
773 if (aDecreaseStacksizeBySuccess) aInput.stackSize -= tInput.stackSize;
774 tChecked[i] = T;
775 temp = F;
776 break;
777 }
778 } else {
779 tChecked[i] = T;
780 }
781 }
782 if (temp) return F;
783 }
784 return T;
785 }
786
787 @Deprecated
788 public boolean isRecipeInputEqual(boolean aDecreaseStacksizeBySuccess, FluidStack[] aFluidInputs, ItemStack... aInputs) {

Callers 1

isRecipeInputEqualMethod · 0.95

Calls 2

validMethod · 0.95
equal_Method · 0.45

Tested by

no test coverage detected