Fallable
Link to fallable
Importare la Classe
Link to importare-la-classe
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 Copyimport crafttweaker.api.block.type.falling.Fallable;
Metodi
Link to metodi
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();
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();
Name: onBrokenAfterFall
ZenScript CopyFallable.onBrokenAfterFall(level as Level, pos as BlockPos, fallingEntity as FallingBlockEntity)
Parametro | Tipo |
---|---|
Parametro level | Tipo Level |
Parametro pos | Tipo BlockPos |
Parametro fallingEntity | Tipo FallingBlockEntity |
Name: onLand
ZenScript CopyFallable.onLand(level as Level, pos as BlockPos, fallingState as BlockState, placeState as BlockState, fallingEntity as FallingBlockEntity)
Parametro | Tipo |
---|---|
Parametro level | Tipo Level |
Parametro pos | Tipo BlockPos |
Parametro fallingState | Tipo BlockState |
Parametro placeState | Tipo BlockState |
Parametro fallingEntity | Tipo FallingBlockEntity |
Proprietà
Link to proprietà
Nome | Tipo | Ha Getter | Ha Setter | Descrizione |
---|---|---|---|---|
Nome fallDamageSource | Tipo DamageSource | Ha Getter sì | Ha Setter no | Descrizione Gets the damage source used when this block falls on an entity. |
Nome hurtsEntitySelector | Tipo Predicate<Entity> | Ha Getter sì | Ha Setter no | Descrizione Gets a predicate that determines if an entity should be damaged by this falling block. |