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.
import crafttweaker . api.block . BlockState;
BlockState extends BlockStateBase
.
Undocumented Interfaces IForgeBlockState
// (BlockState | (other as CTBlockIngredient)) as CTBlockIngredient
myBlockState | myCTBlockIngredient
Return Type:
BlockIngredient
// BlockState as CTBlockIngredient
myBlockState as CTBlockIngredient
Return Type:
BlockIngredient
// BlockState.asString() as string;
Return Type:
string
Gets the base Block
of this BlockState. The Block
will not contain any of the properties of this BlockState. // BlockState.block as Block
Return Type:
Block
Gets the base Block
of this BlockState. The Block
will not contain any of the properties of this BlockState.
Return Type:
Block
Checks whether this BlockState is solid. // BlockState.canOcclude as bool
Return Type:
bool
Checks whether this BlockState is solid. Returns : True if this BlockState is solid. False otherwise.
// BlockState.canOcclude() as bool;
myBlockState . canOcclude();
Return Type:
bool
Gets the blockstate bracket handler syntax for this BlockState. E.G. <blockstate:minecraft:grass:snowy=true>
// BlockState.commandString as string
myBlockState . commandString
Return Type:
string
Gets the blockstate bracket handler syntax for this BlockState. E.G. <blockstate:minecraft:grass:snowy=true>
Returns : The blockstate bracket handler syntax for this BlockState.
// BlockState.commandString() as string;
myBlockState . commandString();
Return Type:
string
Gets the blockstate bracket handler syntax for this BlockState. E.G. <blockstate:minecraft:grass:snowy=true>
Return Type:
string
Gets the hardness of this BlockState. // BlockState.destroySpeed as float
myBlockState . destroySpeed
Return Type:
float
Sets the destroy speed of this BlockState. // BlockState.destroySpeed = (destroySpeed as float);
myBlockState . destroySpeed = myFloat;
Parameters:
destroySpeed: float
Type: float
- the new destroy speed of this BlockState
Gets the hardness of this BlockState. Returns : The hardness of this BlockState.
// BlockState.destroySpeed() as float;
myBlockState . destroySpeed();
Return Type:
float
Sets the destroy speed of this BlockState. // BlockState.destroySpeed(destroySpeed as float);
myBlockState . destroySpeed( 2.4f );
Parameters:
destroySpeed: float
Type: float
- the new destroy speed of this BlockState
Gets a list of allowed values for a given property. Returns : a List of allowed values.
// BlockState.getAllowedValuesForProperty(name as string) as List<string>;
myBlockState . getAllowedValuesForProperty( "snowy" );
Parameters:
name: string
Type: string
- The name of the property to find the allowed values for.
Return Type:
List <string >
Gets the value of the given property. Returns : The value of the property on this BlockState.
// BlockState.getPropertyValue(name as string) as string;
myBlockState . getPropertyValue(myString);
Parameters:
name: string
Type: string
- "snowy"
Return Type:
string
Checks whether this BlockState has the given property. Returns : True if this BlockState has the property. False otherwise.
// BlockState.hasProperty(name as string) as bool;
myBlockState . hasProperty( "snowy" );
Parameters:
name: string
Type: string
- the name of the property to check.
Return Type:
bool
Checks whether this BlockState ticks randomly. // BlockState.isRandomlyTicking as bool
myBlockState . isRandomlyTicking
Return Type:
bool
Checks whether this BlockState ticks randomly. Returns : True if this BlockState ticks randomly. False otherwise.
// BlockState.isRandomlyTicking() as bool;
myBlockState . isRandomlyTicking();
Return Type:
bool
Checks whether this BlockState can provide Redstone Power // BlockState.isSignalSource as bool
myBlockState . isSignalSource
Return Type:
bool
Checks whether this BlockState can provide Redstone Power Returns : True if this BlockState can provide Redstone Power. False otherwise.
// BlockState.isSignalSource() as bool;
myBlockState . isSignalSource();
Return Type:
bool
Gets the light level of this BlockState // BlockState.lightEmission as int
myBlockState . lightEmission
Return Type:
int
Gets the light level of this BlockState Returns : The light level of this BlockState.
// BlockState.lightEmission() as int;
myBlockState . lightEmission();
Return Type:
int
Gets the properties of this BlockState. // BlockState.properties as string[string]
Return Type:
string [string ]
Gets the properties of this BlockState. Returns : a Map of the properties on this BlockState.
// BlockState.properties() as string[string];
myBlockState . properties();
Return Type:
string [string ]
Gets the names of the properties of this BlockState. // BlockState.propertyNames as List<string>
myBlockState . propertyNames
Return Type:
List <string >
Gets the names of the properties of this BlockState. Returns : the List of the names of the BlockStates's properties.
// BlockState.propertyNames() as List<string>;
myBlockState . propertyNames();
Return Type:
List <string >
// BlockState.rotate(rotation as Rotation) as BlockState;
myBlockState . rotate(myRotation);
Return Type:
BlockState
// BlockState.soundType as SoundType
Return Type:
SoundType
// BlockState.soundType() as SoundType;
myBlockState . soundType();
Return Type:
SoundType
Sets a block property based on it's name. Returns : This BlockState with the new property value.
// BlockState.withProperty(name as string, value as string) as BlockState;
myBlockState . withProperty( "snowy" , "true" );
Parameters:
name: string
Type: string
- The name of the property to set.
value: string
Type: string
- The new value of the property.
Return Type:
BlockState