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

Method remout

src/main/java/gregapi/util/CR.java:603–626  ·  view source on GitHub ↗

Removes a Crafting Recipe. @param aOutput The output of the Recipe. @return if it has removed at least one Recipe.

(ItemStack aOutput, boolean aIgnoreNBT, boolean aNotRemoveShapelessRecipes, boolean aOnlyRemoveNativeHandlers, boolean aDontRemoveDyeingRecipes)

Source from the content-addressed store, hash-verified

601 * @return if it has removed at least one Recipe.
602 */
603 public static boolean remout(ItemStack aOutput, boolean aIgnoreNBT, boolean aNotRemoveShapelessRecipes, boolean aOnlyRemoveNativeHandlers, boolean aDontRemoveDyeingRecipes) {
604 if (ST.invalid(aOutput)) return F;
605 boolean rReturn = F;
606 List<IRecipe> tList = list();
607 aOutput = OM.get_(aOutput);
608 for (int i = 0; i < tList.size(); i++) {
609 IRecipe tRecipe = tList.get(i);
610 if (tRecipe instanceof ICraftingRecipeGT && !((ICraftingRecipeGT)tRecipe).isRemovableByGT()) continue;
611 if (aNotRemoveShapelessRecipes && (tRecipe instanceof ShapelessRecipes || tRecipe instanceof ShapelessOreRecipe)) continue;
612 if (aOnlyRemoveNativeHandlers) {
613 if (!CLASSES_NATIVE.contains(tRecipe.getClass().getName())) continue;
614 } else {
615 if (CLASSES_SPECIAL.contains(tRecipe.getClass().getName())) continue;
616 }
617 if (!ST.equal(OM.get(tRecipe.getRecipeOutput()), aOutput, aIgnoreNBT)) continue;
618 if (aDontRemoveDyeingRecipes) {
619 if (tRecipe instanceof ShapedOreRecipe ) {boolean temp = F; for (Object tObject : ((ShapedOreRecipe )tRecipe).getInput()) if (OREDICT_DYE_LISTS.contains(tObject)) {temp = T; break;} if (temp) continue;}
620 if (tRecipe instanceof ShapelessOreRecipe) {boolean temp = F; for (Object tObject : ((ShapelessOreRecipe)tRecipe).getInput()) if (OREDICT_DYE_LISTS.contains(tObject)) {temp = T; break;} if (temp) continue;}
621 }
622 tList.remove(i--);
623 rReturn = T;
624 }
625 return rReturn;
626 }
627
628 /**
629 * Removes a Crafting Recipe.

Callers 12

stoneshapesMethod · 0.95
stonetypesMethod · 0.95
removeRecipeByOutputMethod · 0.95
remoutMethod · 0.95
shapedMethod · 0.95
shapelessMethod · 0.95
delateMethod · 0.95
runMethod · 0.95
onPostLoadMethod · 0.95
onPostLoadMethod · 0.95
onPostLoadMethod · 0.95
onPostLoadMethod · 0.95

Calls 13

invalidMethod · 0.95
listMethod · 0.95
get_Method · 0.95
equalMethod · 0.95
getMethod · 0.95
makeMethod · 0.95
getMethod · 0.65
isRemovableByGTMethod · 0.65
containsMethod · 0.65
removeMethod · 0.65
sizeMethod · 0.45
getNameMethod · 0.45

Tested by

no test coverage detected