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

DisplayState

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.DisplayState;

Members

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
// DisplayState.of(data as MapData) as DisplayState;
DisplayState.of({"block": {"block": "minecraft:diamond_block", "properties": {}}, "type": "botanypots:aging"});

Parameters:

data Type: MapData - the data to deserialize.

Return Type: DisplayState