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

Method addSimpleIC2MachineRecipe

src/main/java/gregapi/util/UT.java:3375–3396  ·  view source on GitHub ↗
(IMachineRecipeManager aRecipeManager, ItemStack aInput, NBTTagCompound aNBT, Object... aOutput)

Source from the content-addressed store, hash-verified

3373 }
3374
3375 public static boolean addSimpleIC2MachineRecipe(IMachineRecipeManager aRecipeManager, ItemStack aInput, NBTTagCompound aNBT, Object... aOutput) {
3376 if (!MD.IC2.mLoaded || ST.invalid(aInput) || aOutput == null || aRecipeManager == null) return F;
3377 try {
3378 aOutput = Code.getWithoutNulls(aOutput).toArray(ZL);
3379 if (aOutput.length == 0) return F;
3380 OreDictItemData tOreName = OM.association_(aInput);
3381 if (aRecipeManager instanceof IMachineRecipeManagerExt) {
3382 if (tOreName != null && !tOreName.mBlackListed && !OreDictManager.INSTANCE.isBlacklisted(aInput)) {
3383 ((IMachineRecipeManagerExt)aRecipeManager).addRecipe((IRecipeInput)COMPAT_IC2.makeInput(tOreName.toString(), aInput.stackSize), aNBT, T, OreDictManager.INSTANCE.getStackArray(T, aOutput));
3384 } else {
3385 ((IMachineRecipeManagerExt)aRecipeManager).addRecipe((IRecipeInput)COMPAT_IC2.makeInput(aInput), aNBT, T, OreDictManager.INSTANCE.getStackArray(T, aOutput));
3386 }
3387 } else {
3388 if (tOreName != null && !tOreName.mBlackListed && !OreDictManager.INSTANCE.isBlacklisted(aInput)) {
3389 aRecipeManager.addRecipe((IRecipeInput)COMPAT_IC2.makeInput(tOreName.toString(), aInput.stackSize), aNBT, OreDictManager.INSTANCE.getStackArray(T, aOutput));
3390 } else {
3391 aRecipeManager.addRecipe((IRecipeInput)COMPAT_IC2.makeInput(aInput), aNBT, OreDictManager.INSTANCE.getStackArray(T, aOutput));
3392 }
3393 }
3394 } catch(Throwable e) {/**/}
3395 return T;
3396 }
3397
3398 @SuppressWarnings("unchecked")
3399 public static boolean addSimpleIC2MachineRecipe(ItemStack aInput, @SuppressWarnings("rawtypes") Map aRecipeList, NBTTagCompound aNBT, Object... aOutput) {

Callers 6

pulverizingMethod · 0.95
ic2_maceratorMethod · 0.95
ic2_extractorMethod · 0.95
ic2_compressorMethod · 0.95
ic2_orewasherMethod · 0.95
ic2_centrifugeMethod · 0.95

Calls 10

invalidMethod · 0.95
getWithoutNullsMethod · 0.95
association_Method · 0.95
toStringMethod · 0.95
isBlacklistedMethod · 0.80
addRecipeMethod · 0.80
getStackArrayMethod · 0.80
makeInputMethod · 0.65
makeOutputMethod · 0.65
putMethod · 0.45

Tested by

no test coverage detected