use of stanhebben.zenscript.annotations.ZenMethod in project Minechem by iopleke.
the class Chemicals method addDamageEffect.
@ZenMethod
public static void addDamageEffect(IIngredient ingredient, double damage) {
PharmacologyEffect effect = new PharmacologyEffect.Damage((float) damage);
addEffect(ingredient, effect);
}
use of stanhebben.zenscript.annotations.ZenMethod in project Minechem by iopleke.
the class Chemicals method removeMoleculeEffects.
@ZenMethod
public static void removeMoleculeEffects(IIngredient ingredient) {
PotionChemical chemical = InputHelper.getChemical(ingredient);
if (!(chemical instanceof Molecule)) {
throw new IllegalArgumentException("Ingredient is not a molecule");
}
MineTweakerAPI.apply(new RemoveEffectsAction(((Molecule) chemical).molecule));
}
use of stanhebben.zenscript.annotations.ZenMethod in project Minechem by iopleke.
the class Chemicals method addMolecule.
@ZenMethod
public static void addMolecule(String name, int id, String roomState, IIngredient[] chemicals) {
ChemicalRoomStateEnum state = InputHelper.getRoomState(roomState);
if (MoleculeEnum.getByName(name) != null || MoleculeEnum.getById(id) != null) {
throw new IllegalArgumentException(name + " is already registered as a molecule");
}
ArrayList<PotionChemical> chem = InputHelper.getChemicals(chemicals);
PotionChemical[] chemical = chem.toArray(new PotionChemical[chem.size()]);
MineTweakerAPI.apply(new AddMoleculeAction(name, id, state, chemical));
}
use of stanhebben.zenscript.annotations.ZenMethod in project ImmersiveEngineering by BluSunrize.
the class Mixer method addRecipe.
@ZenMethod
public static void addRecipe(ILiquidStack output, ILiquidStack fluidInput, IIngredient[] itemInputs, int energy) {
Object[] adds = null;
if (itemInputs != null) {
adds = new Object[itemInputs.length];
for (int i = 0; i < itemInputs.length; i++) adds[i] = CraftTweakerHelper.toObject(itemInputs[i]);
}
MixerRecipe r = new MixerRecipe(CraftTweakerHelper.toFluidStack(output), CraftTweakerHelper.toFluidStack(fluidInput), adds, energy);
CraftTweakerAPI.apply(new Add(r));
}
use of stanhebben.zenscript.annotations.ZenMethod in project ImmersiveEngineering by BluSunrize.
the class AlloySmelter method addRecipe.
@ZenMethod
public static void addRecipe(IItemStack output, IIngredient first, IIngredient second, int time) {
Object oFirst = CraftTweakerHelper.toObject(first), oSecond = CraftTweakerHelper.toObject(second);
if (oFirst == null || oSecond == null)
return;
AlloyRecipe r = new AlloyRecipe(CraftTweakerHelper.toStack(output), oFirst, oSecond, time);
CraftTweakerAPI.apply(new Add(r));
}
Aggregations