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

SimpleDisplayState

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

Extends

SimpleDisplayState extends AbstractSimpleDisplayState.

Members

getRenderState(progress as float) as BlockState
Gets the BlockState that will render for the given progress.

Returns: the BlockState that will render for the given progress

script.zs
// SimpleDisplayState.getRenderState(progress as float) as BlockState;
mySimpleDisplayState.getRenderState(myFloat);

Parameters:

progress Type: float - the progress to render at

Return Type: BlockState

static of(state as BlockState, scale as float?[]? = [], offset as float?[]? = [], rotations as List<AxisAlignedRotation> = null, renderFluid as bool = false) as SimpleDisplayState
Creates a simple display state from the given values.

Returns: a new SimpleDisplayState

script.zs
// SimpleDisplayState.of(state as BlockState, scale as float?[]? = [], offset as float?[]? = [], rotations as List<AxisAlignedRotation> = null, renderFluid as bool = false) as SimpleDisplayState;
SimpleDisplayState.of(myBlockState, my@org.openzen.zencode.java.ZenCodeType.Nullable float[], my@org.openzen.zencode.java.ZenCodeType.Nullable float[], myList, myBool);

Parameters:

state Type: BlockState - The BlockState to render
scale (optional) Type: float?[]? - An optional [x, y, z] scale to apply

Default Value: []

offset (optional) Type: float?[]? - An optional [x, y, z] offset to apply

Default Value: []

rotations (optional) Type: List<AxisAlignedRotation> - An optional list of AxisAlignedRotation to apply

Default Value: null

renderFluid (optional) Type: bool - if the blockstate has a fluid, should it be rendered?

Default Value: false

Return Type: SimpleDisplayState

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

Parameters:

data Type: MapData - the data to deserialize.

Return Type: DisplayState