Home Commands Examples Getting Started With Scripts Global Keywords
Generic Recipe Manipulation

AgingDisplayState

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import mods.botanypotstweaker.displaystate.AgingDisplayState;

Extends

AgingDisplayState extends TransitionalDisplayState.

Members

static of(state as BlockState) as AgingDisplayState
Creates a new AgingDisplayState from the given BlockState

Returns: a new display state from the given blockstate

script.zs
// AgingDisplayState.of(state as BlockState) as AgingDisplayState;
AgingDisplayState.of(myBlockState);

Parameters:

state Type: BlockState - The state to display

Return Type: AgingDisplayState

static of(state as DisplayState) as TransitionalDisplayState
Creates a TransitionalDisplayState object from a given DisplayState.

Returns: A TransitionalDisplayState object created from the given DisplayState.

script.zs
// AgingDisplayState.of(state as DisplayState) as TransitionalDisplayState;
AgingDisplayState.of(myDisplayState);

Parameters:

state Type: DisplayState - The DisplayState object to be included in the TransitionalDisplayState.

Return Type: TransitionalDisplayState

static of(states as List<DisplayState>) as TransitionalDisplayState
script.zs
// AgingDisplayState.of(states as List<DisplayState>) as TransitionalDisplayState;
AgingDisplayState.of(myList);

Parameters:

states Type: List<DisplayState>

Return Type: TransitionalDisplayState

static of(data as MapData) as DisplayState
Creates a display state from the given data.

Returns: A new display state from the given data.

script.zs
// AgingDisplayState.of(data as MapData) as DisplayState;
AgingDisplayState.of({"block": {"block": "minecraft:diamond_block", "properties": {}}, "type": "botanypots:aging"});

Parameters:

data Type: MapData - the data to deserialize.

Return Type: DisplayState