Home Migration Guide Getting Started With Scripts Commands Examples
Generic JSON Recipes

CustomEMC

This class was added by a mod with mod-id projecte. So you need to have this mod installed if you want to use this feature.

Importing the class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.

script.zs
import mods.projecte.CustomEMC;

Static Methods

Removes the associated EMC value for the given NormalizedSimpleStack.

Return Type: void

script.zs
CustomEMC.removeEMCValue(stack as NormalizedSimpleStack) as void
ParameterTypeDescription
Parameter
stack
Type
NormalizedSimpleStack
Description
NormalizedSimpleStack to remove EMC from.

Set the EMC value for the given NormalizedSimpleStack to the given amount.

Return Type: void

script.zs
CustomEMC.setEMCValue(stack as NormalizedSimpleStack, emc as long) as void
CustomEMC.setEMCValue(<item:mekanism:ingot_refined_obsidian>, 1500);
ParameterTypeDescription
Parameter
stack
Type
NormalizedSimpleStack
Description
NormalizedSimpleStack to set the EMC of.
Parameter
emc
Type
long
Description
EMC value, must not be negative.