use of stanhebben.zenscript.annotations.ZenMethod in project Minechem by iopleke.
the class Chemicals method addPotionEffect.
@ZenMethod
public static void addPotionEffect(IIngredient ingredient, String potion, int time, int level) {
PharmacologyEffect effect = new PharmacologyEffect.Potion(potion, level, time);
addEffect(ingredient, effect);
}
use of stanhebben.zenscript.annotations.ZenMethod in project Minechem by iopleke.
the class Chemicals method addElement.
@ZenMethod
public static void addElement(int id, String name, String descriptiveName, String classification, String roomState, String radioactivity) {
if (id < 0) {
throw new IllegalArgumentException(id + " is invalid");
}
if (ElementEnum.getByID(id) != null) {
throw new IllegalArgumentException(id + ": " + name + " is already registered as an element");
}
ElementClassificationEnum eClass = InputHelper.getClassification(classification);
ChemicalRoomStateEnum state = InputHelper.getRoomState(roomState);
RadiationEnum radiation = InputHelper.getRadiation(radioactivity);
MineTweakerAPI.apply(new AddElementAction(id, name, descriptiveName, eClass, state, radiation));
}
use of stanhebben.zenscript.annotations.ZenMethod in project ImmersiveEngineering by BluSunrize.
the class BlastFurnace method addRecipe.
@ZenMethod
public static void addRecipe(IItemStack output, IIngredient input, int time, @Optional IItemStack slag) {
Object oInput = CraftTweakerHelper.toObject(input);
if (oInput == null)
return;
BlastFurnaceRecipe r = new BlastFurnaceRecipe(CraftTweakerHelper.toStack(output), oInput, time, CraftTweakerHelper.toStack(slag));
CraftTweakerAPI.apply(new Add(r));
}
use of stanhebben.zenscript.annotations.ZenMethod in project ImmersiveEngineering by BluSunrize.
the class BottlingMachine method addRecipe.
@ZenMethod
public static void addRecipe(IItemStack output, IIngredient input, ILiquidStack fluid) {
Object oInput = CraftTweakerHelper.toObject(input);
if (oInput == null || output == null || fluid == null)
return;
BottlingMachineRecipe r = new BottlingMachineRecipe(CraftTweakerHelper.toStack(output), oInput, CraftTweakerHelper.toFluidStack(fluid));
CraftTweakerAPI.apply(new Add(r));
}
use of stanhebben.zenscript.annotations.ZenMethod in project ImmersiveEngineering by BluSunrize.
the class MetalPress method addRecipe.
@ZenMethod
public static void addRecipe(IItemStack output, IIngredient input, IItemStack mold, int energy, @Optional int inputSize) {
Object oInput = CraftTweakerHelper.toObject(input);
if (oInput == null)
return;
ItemStack sOut = CraftTweakerHelper.toStack(output);
ItemStack sMold = CraftTweakerHelper.toStack(mold);
if (!sOut.isEmpty() && !sMold.isEmpty()) {
MetalPressRecipe r = new MetalPressRecipe(sOut, oInput, ApiUtils.createComparableItemStack(sMold, true), energy);
if (inputSize > 0)
r.setInputSize(inputSize);
CraftTweakerAPI.apply(new Add(r));
}
}
Aggregations