crafttweaker.api.liquid.ILiquidStack Java Examples
The following examples show how to use
crafttweaker.api.liquid.ILiquidStack.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CTSakuraDistillation.java From Sakura_mod with MIT License | 5 votes |
@ZenMethod public static void AddRecipe(ILiquidStack input_fluid,IIngredient[] input,ILiquidStack output) { if(input.length>0){ Object[] array = new Object[input.length]; for(int i = 0; i < input.length;i++){ if (input[i] instanceof IItemStack) array[i]=CraftTweakerMC.getItemStack(input[i]); else if(input[i] instanceof IOreDictEntry) array[i]=((IOreDictEntry)input[i]).getName(); } SakuraRecipeRegister.actions.add(new Addition(array, CraftTweakerMC.getLiquidStack(output),CraftTweakerMC.getLiquidStack(input_fluid))); } }
Example #2
Source File: CTSakuraL2IS.java From Sakura_mod with MIT License | 5 votes |
@ZenMethod public static void RemoveRecipe(ILiquidStack input_fluid,IIngredient input) { Object itemInput=null; if (input instanceof IItemStack) { itemInput=CraftTweakerMC.getItemStack(input); } else if(input instanceof IOreDictEntry) { itemInput=((IOreDictEntry)input).getName(); } if(itemInput!=null) SakuraRecipeRegister.actions.add(new Removal(CraftTweakerMC.getLiquidStack(input_fluid),itemInput)); }
Example #3
Source File: CTSakuraBarrel.java From Sakura_mod with MIT License | 5 votes |
@ZenMethod public static void AddRecipe(ILiquidStack input_fluid,IIngredient[] input,ILiquidStack output) { if(input.length>0){ Object[] array = new Object[input.length]; for(int i = 0; i < input.length;i++){ if (input[i] instanceof IItemStack) array[i]=CraftTweakerMC.getItemStack(input[i]); else if(input[i] instanceof IOreDictEntry) array[i]=((IOreDictEntry)input[i]).getName(); } SakuraRecipeRegister.actions.add(new Addition(array, CraftTweakerMC.getLiquidStack(output),CraftTweakerMC.getLiquidStack(input_fluid))); } }
Example #4
Source File: CTSakuraCampfirePot.java From Sakura_mod with MIT License | 5 votes |
@ZenMethod public static void RemoveRecipe(ILiquidStack input_fluid,IIngredient[] input) { Object[] array = new Object[input.length]; for(int i = 0; i < input.length;i++){ if (input[i] instanceof IItemStack) array[i]=CraftTweakerMC.getItemStack(input[i]); else if(input[i] instanceof IOreDictEntry) array[i]=((IOreDictEntry)input[i]).getName(); } SakuraRecipeRegister.actions.add(new Removal(CraftTweakerMC.getLiquidStack(input_fluid),array)); }
Example #5
Source File: CTSakuraCampfirePot.java From Sakura_mod with MIT License | 5 votes |
@ZenMethod public static void AddRecipe(IIngredient[] input,IItemStack output,ILiquidStack input_fluid) { if(input.length>0){ Object[] array = new Object[input.length]; for(int i = 0; i < input.length;i++){ if (input[i] instanceof IItemStack) array[i]=CraftTweakerMC.getItemStack(input[i]); else if(input[i] instanceof IOreDictEntry) array[i]=((IOreDictEntry)input[i]).getName(); } SakuraRecipeRegister.actions.add(new Addition(array, CraftTweakerMC.getItemStack(output),CraftTweakerMC.getLiquidStack(input_fluid))); } }
Example #6
Source File: RecipeMap.java From GregTech with GNU Lesser General Public License v3.0 | 5 votes |
@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); }
Example #7
Source File: CTRecipeBuilder.java From GregTech with GNU Lesser General Public License v3.0 | 5 votes |
@ZenMethod public CTRecipeBuilder fluidInputs(ILiquidStack... ingredients) { this.backingBuilder.fluidInputs(Arrays.stream(ingredients) .map(CraftTweakerMC::getLiquidStack) .collect(Collectors.toList())); return this; }
Example #8
Source File: CTRecipeBuilder.java From GregTech with GNU Lesser General Public License v3.0 | 5 votes |
@ZenMethod public CTRecipeBuilder fluidOutputs(ILiquidStack... ingredients) { this.backingBuilder.fluidOutputs(Arrays.stream(ingredients) .map(CraftTweakerMC::getLiquidStack) .collect(Collectors.toList())); return this; }
Example #9
Source File: GTCraftTweakerMagicEnergyConverter.java From GT-Classic with GNU Lesser General Public License v3.0 | 4 votes |
@ZenMethod public static void addRecipe(ILiquidStack input) { GTCraftTweakerActions.apply(new MagicEnergyConverterRecipeAction(CraftTweakerMC.getLiquidStack(input).getFluid())); }
Example #10
Source File: CTSakuraDistillation.java From Sakura_mod with MIT License | 4 votes |
@ZenMethod public static void RemoveRecipe(ILiquidStack input) { SakuraRecipeRegister.actions.add(new Removal(CraftTweakerMC.getLiquidStack(input))); }
Example #11
Source File: FuelRecipeMap.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@ZenMethod("findRecipe") @Method(modid = GTValues.MODID_CT) public FuelRecipe ctFindRecipe(long maxVoltage, ILiquidStack inputFluid) { return findRecipe(maxVoltage, CraftTweakerMC.getLiquidStack(inputFluid)); }
Example #12
Source File: CokeOvenRecipeBuilder.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@ZenMethod @Method(modid = GTValues.MODID_CT) public CokeOvenRecipeBuilder fluidOutput(ILiquidStack liquidStack) { return fluidOutput(CraftTweakerMC.getLiquidStack(liquidStack)); }
Example #13
Source File: CTRecipe.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@ZenGetter("fluidOutputs") public List<ILiquidStack> getFluidOutputs() { return this.backingRecipe.getFluidOutputs().stream() .map(MCLiquidStack::new) .collect(Collectors.toList()); }
Example #14
Source File: CTRecipe.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@ZenMethod public boolean hasInputFluid(ILiquidStack liquidStack) { return this.backingRecipe.hasInputFluid(CraftTweakerMC.getLiquidStack(liquidStack)); }
Example #15
Source File: CTRecipe.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@ZenGetter("fluidInputs") public List<ILiquidStack> getFluidInputs() { return this.backingRecipe.getFluidInputs().stream() .map(MCLiquidStack::new) .collect(Collectors.toList()); }
Example #16
Source File: CokeOvenRecipe.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@ZenGetter("fluidOutput") @Method(modid = GTValues.MODID_CT) public ILiquidStack ctGetLiquidOutput() { return new MCLiquidStack(getFluidOutput()); }
Example #17
Source File: FuelRecipe.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@ZenGetter("fluid") @Method(modid = GTValues.MODID_CT) public ILiquidStack ctGetFluid() { return new MCLiquidStack(getRecipeFluid()); }
Example #18
Source File: FuelRecipe.java From GregTech with GNU Lesser General Public License v3.0 | 4 votes |
@ZenMethod("create") @Method(modid = GTValues.MODID_CT) public static FuelRecipe craftTweakerCreate(ILiquidStack liquidStack, int duration, long minVoltage) { return new FuelRecipe(CraftTweakerMC.getLiquidStack(liquidStack), duration, minVoltage); }
Example #19
Source File: CTSakuraBarrel.java From Sakura_mod with MIT License | 4 votes |
@ZenMethod public static void RemoveRecipe(ILiquidStack input) { SakuraRecipeRegister.actions.add(new Removal(CraftTweakerMC.getLiquidStack(input))); }
Example #20
Source File: CTSakuraL2IS.java From Sakura_mod with MIT License | 4 votes |
@ZenMethod public static void AddRecipe(IItemStack input,IItemStack output,ILiquidStack input_fluid) { SakuraRecipeRegister.actions.add(new Addition(CraftTweakerMC.getItemStack(input), CraftTweakerMC.getItemStack(output),CraftTweakerMC.getLiquidStack(input_fluid))); }