MCBlockState

This class was added by a mod with mod-id crafttweaker. 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.

import crafttweaker.api.blocks.MCBlockState;

Casters

Result typeIs Implicit
MCBlocktrue
stringfalse

Methods

getAllowedValuesForProperty

Return Type: stdlib.List<string>

MCBlockState.getAllowedValuesForProperty(name as string) as stdlib.List<string>
ParameterTypeDescription
namestringNo Description Provided

getProperties

Return Type: string[string]

MCBlockState.getProperties() as string[string]
myMCBlockState.getProperties();

getPropertyNames

Return Type: stdlib.List<string>

MCBlockState.getPropertyNames() as stdlib.List<string>
myMCBlockState.getPropertyNames();

getPropertyValue

Return Type: string

MCBlockState.getPropertyValue(name as string) as string
ParameterTypeDescription
namestringNo Description Provided

hasProperty

Return Type: boolean

MCBlockState.hasProperty(name as string) as boolean
ParameterTypeDescription
namestringNo Description Provided

withProperty

Return Type: MCBlockState

MCBlockState.withProperty(name as string, value as string) as MCBlockState
ParameterTypeDescription
namestringNo Description Provided
valuestringNo Description Provided

Properties

NameTypeHas GetterHas Setter
blockMCBlocktruefalse
canProvidePowerbooleantruefalse
commandStringstringtruefalse
hasTileEntitybooleantruefalse
isSolidbooleantruefalse
isStickybooleantruefalse
lightLevelinttruefalse
ticksRandomlybooleantruefalse