Импорт класса

Link to импорт-класса

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.

ZenScript
Copy
import crafttweaker.api.block.type.falling.Fallable;

Link to getFallDamageSource

Name: getFallDamageSource

Gets the damage source used when this block falls on an entity.

Returns: The damage source used when this block falls on an entity.
Return Type: DamageSource

ZenScript
Copy
// Fallable.getFallDamageSource() as DamageSource

(<block:minecraft:sand> as Fallable).getFallDamageSource();

Link to getHurtsEntitySelector

Name: getHurtsEntitySelector

Gets a predicate that determines if an entity should be damaged by this falling block.

Returns: The predicate that determines if an entity should be damaged by this falling block.
Return Type: Predicate<Entity>

ZenScript
Copy
// Fallable.getHurtsEntitySelector() as Predicate<Entity>

(<block:minecraft:sand> as Fallable).getHurtsEntitySelector();

Link to onBrokenAfterFall

Name: onBrokenAfterFall

ZenScript
Copy
Fallable.onBrokenAfterFall(level as Level, pos as BlockPos, fallingEntity as FallingBlockEntity)
ПараметрТип
Параметр
level
Тип
Level
Параметр
pos
Тип
BlockPos
Параметр
fallingEntity
Тип
FallingBlockEntity

Name: onLand

ZenScript
Copy
Fallable.onLand(level as Level, pos as BlockPos, fallingState as BlockState, placeState as BlockState, fallingEntity as FallingBlockEntity)
ПараметрТип
Параметр
level
Тип
Level
Параметр
pos
Тип
BlockPos
Параметр
fallingState
Тип
BlockState
Параметр
placeState
Тип
BlockState
Параметр
fallingEntity
Тип
FallingBlockEntity

Свойства

Link to свойства

НазваниеТипИмеет GetterИмеет SetterОписание
Название
fallDamageSource
Тип
DamageSource
Имеет Getter
true
Имеет Setter
false
Описание
Gets the damage source used when this block falls on an entity.
Название
hurtsEntitySelector
Тип
Predicate<Entity>
Имеет Getter
true
Имеет Setter
false
Описание
Gets a predicate that determines if an entity should be damaged by this falling block.