BlockItemStateProperties

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 crafttweaker.api.item.component.BlockItemStateProperties;

Members

apply(state as BlockState) as BlockState
Applies the BlockItemStateProperties to the given BlockState.

Returns: The new BlockState.

script.zs
// BlockItemStateProperties.apply(state as BlockState) as BlockState;
myBlockItemStateProperties.apply(myBlockState);

Parameters:

state Type: BlockState - The BlockState to apply the properties to.

Return Type: BlockState

Getter
Checks if the BlockItemStateProperties is empty.
script.zs
// BlockItemStateProperties.isEmpty as bool
myBlockItemStateProperties.isEmpty

Return Type: bool

static of(properties as string[string]) as BlockItemStateProperties
Creates a new BlockItemStateProperties with the given properties.

Returns: The new BlockItemStateProperties.

script.zs
// BlockItemStateProperties.of(properties as string[string]) as BlockItemStateProperties;
BlockItemStateProperties.of(myMap);

Parameters:

properties Type: string[string] - The properties.

Return Type: BlockItemStateProperties

properties() as string[string]
Gets the properties of the BlockItemStateProperties.

Returns: The properties.

script.zs
// BlockItemStateProperties.properties() as string[string];
myBlockItemStateProperties.properties();

Return Type: string[string]