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.
crafttweaker.api.block.MCBlockState
Implemented Interfaces
MCBlockState implements the following interfaces. That means any method available to them can also be used on this class.
Methods
getAllowedValuesForProperty
Returns List
myMCBlockState.getAllowedValuesForProperty(name as String);
Parameter | Type | Description |
---|
name | String | No description provided |
getProperties
Returns String[String]
myMCBlockState.getProperties();
getPropertyNames
Returns List
myMCBlockState.getPropertyNames();
getPropertyValue
Returns String
myMCBlockState.getPropertyValue(name as String);
Parameter | Type | Description |
---|
name | String | No description provided |
hasProperty
Returns boolean
myMCBlockState.hasProperty(name as String);
Parameter | Type | Description |
---|
name | String | No description provided |
withProperty
Returns crafttweaker.api.block.MCBlockState
myMCBlockState.withProperty(name as String, value as String);
Parameter | Type | Description |
---|
name | String | No description provided |
value | String | No description provided |
Properties
名称 | Type | Has Getter | Has Setter |
---|
block | crafttweaker.api.block.MCBlock | true | false |
canProvidePower | boolean型 | true | false |
commandString | String | true | false |
hasTileEntity | boolean型 | true | false |
isSolid | boolean型 | true | false |
isSticky | boolean型 | true | false |
lightLevel | int | true | false |
ticksRandomly | boolean型 | true | false |
Casters