Interface FallingBlockDamageSource
-
- All Superinterfaces:
DamageSource
,EntityDamageSource
public interface FallingBlockDamageSource extends EntityDamageSource
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
FallingBlockDamageSource.Builder
-
Nested classes/interfaces inherited from interface org.spongepowered.api.event.cause.entity.damage.source.DamageSource
DamageSource.DamageSourceBuilder<T extends DamageSource,B extends DamageSource.DamageSourceBuilder<T,B>>, DamageSource.Factory
-
Nested classes/interfaces inherited from interface org.spongepowered.api.event.cause.entity.damage.source.EntityDamageSource
EntityDamageSource.EntityDamageSourceBuilder<T extends EntityDamageSource,B extends EntityDamageSource.EntityDamageSourceBuilder<T,B>>
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Value.Immutable<BlockState>
blockState()
Gets theBlockState
the falling block is representing.static FallingBlockDamageSource.Builder
builder()
Creates a newFallingBlockDamageSource.Builder
for constructing a newFallingBlockDamageSource
.default Value.Immutable<Boolean>
canDropAsItem()
Gets whether this falling block can drop as an item if it lands in a way that it can not be placed.default Value.Immutable<Boolean>
canHurtEntities()
Gets whether this falling block will damage entities where it lands.default Value.Immutable<Boolean>
canPlaceAsBlock()
Gets whether this falling block will try to place itself where it lands.default Value.Immutable<Double>
fallDamagePerBlock()
Gets theValue.Immutable
for the damage to deal per block theFallingBlock
has fallen.default Value.Immutable<Ticks>
fallTime()
Gets the time the block has been falling if spawning a entity in air this will need to be set to 1 or it will be instantly removed.default Value.Immutable<Double>
maxFallDamage()
Gets the maximum damage theFallingBlock
can deal to another entity for falling on the entity.FallingBlock
source()
Gets theEntity
that is the source.-
Methods inherited from interface org.spongepowered.api.event.cause.entity.damage.source.DamageSource
doesAffectCreative, exhaustion, isAbsolute, isBypassingArmor, isExplosive, isFire, isMagic, isScaledByDifficulty, type
-
-
-
-
Method Detail
-
builder
static FallingBlockDamageSource.Builder builder()
Creates a newFallingBlockDamageSource.Builder
for constructing a newFallingBlockDamageSource
.- Returns:
- A new builder
-
source
FallingBlock source()
Description copied from interface:EntityDamageSource
Gets theEntity
that is the source.- Specified by:
source
in interfaceEntityDamageSource
- Returns:
- The entity source
-
fallDamagePerBlock
default Value.Immutable<Double> fallDamagePerBlock()
Gets theValue.Immutable
for the damage to deal per block theFallingBlock
has fallen.- Returns:
- The immutable value for the damage per block of falling
-
maxFallDamage
default Value.Immutable<Double> maxFallDamage()
Gets the maximum damage theFallingBlock
can deal to another entity for falling on the entity.- Returns:
- The maximum damage the block can deal
-
blockState
default Value.Immutable<BlockState> blockState()
Gets theBlockState
the falling block is representing.- Returns:
- The falling block's block state
-
canPlaceAsBlock
default Value.Immutable<Boolean> canPlaceAsBlock()
Gets whether this falling block will try to place itself where it lands.- Returns:
- True if this block will attempt to place itself when it lands
-
canDropAsItem
default Value.Immutable<Boolean> canDropAsItem()
Gets whether this falling block can drop as an item if it lands in a way that it can not be placed.- Returns:
- Whether this falling block can drop as an item
-
fallTime
default Value.Immutable<Ticks> fallTime()
Gets the time the block has been falling if spawning a entity in air this will need to be set to 1 or it will be instantly removed.- Returns:
- The time the block has been falling
-
canHurtEntities
default Value.Immutable<Boolean> canHurtEntities()
Gets whether this falling block will damage entities where it lands.- Returns:
- Whether this falling block will damage entities where it lands
-
-