Search in sources :

Example 1 with CTRecipe

use of gregtech.api.recipes.crafttweaker.CTRecipe in project GregTech by GregTechCE.

the class RecipeMap method ctFindRecipe.

@ZenMethod("findRecipe")
@Method(modid = GTValues.MODID_CT)
@Nullable
public CTRecipe ctFindRecipe(long maxVoltage, IItemStack[] itemInputs, ILiquidStack[] fluidInputs, @Optional(valueLong = Integer.MAX_VALUE) int outputFluidTankCapacity) {
    List<ItemStack> mcItemInputs = itemInputs == null ? Collections.emptyList() : Arrays.stream(itemInputs).map(CraftTweakerMC::getItemStack).collect(Collectors.toList());
    List<FluidStack> mcFluidInputs = fluidInputs == null ? Collections.emptyList() : Arrays.stream(fluidInputs).map(CraftTweakerMC::getLiquidStack).collect(Collectors.toList());
    Recipe backingRecipe = findRecipe(maxVoltage, mcItemInputs, mcFluidInputs, outputFluidTankCapacity);
    return backingRecipe == null ? null : new CTRecipe(this, backingRecipe);
}
Also used : CTRecipe(gregtech.api.recipes.crafttweaker.CTRecipe) CraftTweakerMC(crafttweaker.api.minecraft.CraftTweakerMC) FluidStack(net.minecraftforge.fluids.FluidStack) CTRecipe(gregtech.api.recipes.crafttweaker.CTRecipe) ItemStack(net.minecraft.item.ItemStack) IItemStack(crafttweaker.api.item.IItemStack) Method(net.minecraftforge.fml.common.Optional.Method) Nullable(javax.annotation.Nullable)

Aggregations

IItemStack (crafttweaker.api.item.IItemStack)1 CraftTweakerMC (crafttweaker.api.minecraft.CraftTweakerMC)1 CTRecipe (gregtech.api.recipes.crafttweaker.CTRecipe)1 Nullable (javax.annotation.Nullable)1 ItemStack (net.minecraft.item.ItemStack)1 FluidStack (net.minecraftforge.fluids.FluidStack)1 Method (net.minecraftforge.fml.common.Optional.Method)1