I think I finished...!
This commit is contained in:
parent
726dda30c9
commit
78d97bd885
|
@ -16,6 +16,7 @@ import net.minecraftforge.fluids.FluidStack;
|
|||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
|
||||
import com.bioxx.tfc.api.Crafting.BarrelLiquidToLiquidRecipe;
|
||||
import com.bioxx.tfc.api.Crafting.BarrelManager;
|
||||
import com.bioxx.tfc.api.Crafting.BarrelRecipe;
|
||||
|
||||
|
@ -23,13 +24,32 @@ import com.bioxx.tfc.api.Crafting.BarrelRecipe;
|
|||
public class Barrel {
|
||||
|
||||
/**
|
||||
* Note: by default the parameter <code>sealed</code> should be <code>true</code>
|
||||
* <p>And, the parameter <code>time</code> uses the unit of "hour" in TFCraft
|
||||
* @param outputFluid If you want this recipe consume fluid, <code>outputFluid=inputFluid</code>
|
||||
* @param time How long the recipe finished. Unit is TFC hour.
|
||||
* @param techLv Set to 0 if you want vessel to be able to use your new recipe, otherwise you will set to 1
|
||||
* @param removeFluid Set false if there is special need
|
||||
* @param allowAny By default it is <code>true</code>
|
||||
*/
|
||||
@ZenMethod
|
||||
public static void add(IItemStack inputItem, ILiquidStack inputFluid, IItemStack outputItem, ILiquidStack outputFluid, int time, int techLv, boolean sealed){
|
||||
MineTweakerAPI.apply(new AddRecipe(new BarrelRecipe(toStack(inputItem), toFluid(inputFluid), toStack(outputItem), toFluid(outputFluid), time).setSealedRecipe(sealed).setMinTechLevel(techLv)));
|
||||
public static void addSealed(IItemStack inputItem, ILiquidStack inputFluid, IItemStack outputItem, ILiquidStack outputFluid, int time, int techLv, boolean removeFluid, boolean allowAny){
|
||||
MineTweakerAPI.apply(new AddRecipe(new BarrelRecipe(toStack(inputItem), toFluid(inputFluid), toStack(outputItem), toFluid(outputFluid), time).setMinTechLevel(techLv).setRemovesLiquid(removeFluid).setAllowAnyStack(allowAny)));
|
||||
}
|
||||
|
||||
|
||||
@ZenMethod
|
||||
public static void addUnsealed(IItemStack inputItem, ILiquidStack inputFluid, IItemStack outputItem, ILiquidStack outputFluid, int techLv, boolean removeFluid, boolean allowAny){
|
||||
MineTweakerAPI.apply(new AddRecipe(new BarrelRecipe(toStack(inputItem), toFluid(inputFluid), toStack(outputItem), toFluid(outputFluid)).setSealedRecipe(false).setMinTechLevel(techLv).setRemovesLiquid(removeFluid).setAllowAnyStack(allowAny)));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param inputInBarrel The input fluid which is in barrel
|
||||
* @param input The input fluid which is in a fluid container, like a water bucket
|
||||
* @param output The output fluid
|
||||
*/
|
||||
@ZenMethod
|
||||
public static void addFluidToFluid(ILiquidStack inputInBarrel, ILiquidStack input, ILiquidStack output){
|
||||
MineTweakerAPI.apply(new AddRecipe(new BarrelLiquidToLiquidRecipe(toFluid(inputInBarrel), toFluid(input), toFluid(output))));
|
||||
}
|
||||
|
||||
@ZenMethod
|
||||
|
@ -61,7 +81,7 @@ public class Barrel {
|
|||
public void apply() {
|
||||
ArrayList<BarrelRecipe> toRemove = new ArrayList<BarrelRecipe>();
|
||||
for (BarrelRecipe recipe : BarrelManager.getInstance().getRecipes()){
|
||||
if (recipe.getInItem() != null && recipe.getRecipeOutIS() == stack){
|
||||
if (recipe.getRecipeOutIS() != null && recipe.getRecipeOutIS() == stack){
|
||||
toRemove.add(recipe);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue