use of stanhebben.zenscript.annotations.ZenMethod in project Binnie by ForestryMC.
the class FruitPressRecipeHandler method addRecipe.
@ZenMethod
public static void addRecipe(IItemStack input, ILiquidStack output) {
ItemStack inputStack = CraftTweakerUtil.getItemStack(input);
FluidStack outputStack = CraftTweakerUtil.getLiquidStack(output);
addRecipe(new FruitPressRecipe(inputStack, outputStack), ExtraTreesRecipeManager.fruitPressManager);
}
use of stanhebben.zenscript.annotations.ZenMethod in project Minechem by iopleke.
the class Synthesiser method addRecipe.
@ZenMethod
public static void addRecipe(IIngredient[] inputs, IIngredient outputStack, boolean shaped, int energy) {
boolean someValue = false;
PotionChemical[] inputFixed = new PotionChemical[9];
if (shaped) {
for (int i = 0; i < inputFixed.length && i < inputs.length; i++) {
if (inputs[i] != null) {
inputFixed[i] = InputHelper.getChemical(inputs[i]);
if (inputFixed[i] != null)
someValue = true;
}
}
} else {
List<PotionChemical> input = InputHelper.getChemicals(inputs);
inputFixed = Arrays.copyOf(input.toArray(new PotionChemical[0]), 9);
someValue = !input.isEmpty();
}
if (someValue) {
ItemStack output = InputHelper.getInput(outputStack);
if (output != null) {
MineTweakerAPI.apply(new AddRecipeAction(output, shaped, energy, inputFixed));
}
}
}
use of stanhebben.zenscript.annotations.ZenMethod in project Minechem by iopleke.
the class Chemicals method addFoodEffect.
@ZenMethod
public static void addFoodEffect(IIngredient ingredient, int level, double saturation) {
PharmacologyEffect effect = new PharmacologyEffect.Food(level, (float) saturation);
addEffect(ingredient, effect);
}
use of stanhebben.zenscript.annotations.ZenMethod in project Minechem by iopleke.
the class Chemicals method addCureEffect.
@ZenMethod
public static void addCureEffect(IIngredient ingredient, String string) {
PharmacologyEffect effect = new PharmacologyEffect.Cure(string);
addEffect(ingredient, effect);
}
use of stanhebben.zenscript.annotations.ZenMethod in project Minechem by iopleke.
the class Chemicals method addBurnEffect.
@ZenMethod
public static void addBurnEffect(IIngredient ingredient, int time) {
PharmacologyEffect effect = new PharmacologyEffect.Burn(time);
addEffect(ingredient, effect);
}
Aggregations