Fallable
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.
import crafttweaker.api.block.type.falling.Fallable;
Description
Members
getFallDamageSource(entity as Entity) as DamageSource
Gets the damage source used when this block falls on an entity.script.zs
Returns: The damage source used when this block falls on an entity.
(<block:minecraft:sand> as Fallable).getFallDamageSource(myEntity);
Return Type:
DamageSource
onBrokenAfterFall(level as Level, pos as BlockPos, fallingEntity as FallingBlockEntity)
Called when a falling block breaks after falling.script.zs
// Fallable.onBrokenAfterFall(level as Level, pos as BlockPos, fallingEntity as FallingBlockEntity);(<block:minecraft:sand> as Fallable).onBrokenAfterFall(myLevel, myBlockPos, myFallingBlockEntity);
Parameters:
onLand(level as Level, pos as BlockPos, fallingState as BlockState, placeState as BlockState, fallingEntity as FallingBlockEntity)
Called when a falling block lands on a block.script.zs
// Fallable.onLand(level as Level, pos as BlockPos, fallingState as BlockState, placeState as BlockState, fallingEntity as FallingBlockEntity);(<block:minecraft:sand> as Fallable).onLand(myLevel, myBlockPos, myBlockState, myBlockState, myFallingBlockEntity);
Parameters:
placeState: BlockState
Type: BlockState
- The state of the block that the falling block is landing on.