public static void generateDealloyList() { List<AlloyMix> alloys = Smeltery.getAlloyList(); for (AlloyMix alloy : alloys) { if (!isBlackListed(alloy.result.getFluid())) whitelistedFluids.add(alloy.result); } }
/** * Takes a FluidStack alloy, returns it's components. Should equal the reagents required to * produce this function's input in a Tinker's Construct smeltery. Scaled to the size of our input * stack. * * @param input The alloy fluidstack. * @return A list of fluid stacks produced by the dealloying. */ public static FluidStack[] deAlloy(FluidStack input) { List<AlloyMix> alloys = Smeltery.getAlloyList(); for (AlloyMix alloy : alloys) { if (alloy.result.isFluidEqual(input)) { List<FluidStack> components = alloy.mixers; FluidStack[] output = new FluidStack[components.size()]; for (int i = 0; i < output.length; i++) { float ratio = (float) components.get(i).amount / alloy.result.amount; output[i] = new FluidStack(components.get(i), (int) (input.amount * ratio)); } return output; } } return null; }