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

RadiationAttribute

This class was added by a mod with mod-id mekanism. 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.mekanism.content.attribute.gas.RadiationAttribute;

Implemented Interfaces

RadiationAttribute implements the following interfaces. That means all methods defined in these interfaces are also available in RadiationAttribute

Static Methods

Creates an attribute representing the radioactivity of a chemical. This attribute requires validation, meaning chemical containers won’t be able to accept chemicals with this attribute by default.

Returns: Attribute representing the radioactivity of a substance.
Return Type: RadiationAttribute

script.zs
RadiationAttribute.create(radioactivity as double) as RadiationAttribute
ParameterTypeDescription
Parameter
radioactivity
Type
double
Description
Radioactivity of the chemical measured in Sv/h, must be greater than zero.