Implement anvil fall damage (#5312)

This commit is contained in:
IvanCraft623
2023-03-27 14:17:08 -05:00
committed by GitHub
parent 04197d6b80
commit bea878e9e9
7 changed files with 76 additions and 2 deletions

View File

@ -42,6 +42,18 @@ interface Fallable{
*/
public function onHitGround(FallingBlock $blockEntity) : bool;
/**
* Returns the damage caused per fallen block. This is multiplied by the fall distance (and capped according to
* {@link Fallable::getMaxFallDamage()}) to calculate the damage dealt to any entities who intersect with the block
* when it hits the ground.
*/
public function getFallDamagePerBlock() : float;
/**
* Returns the maximum damage the block can deal to an entity when it hits the ground.
*/
public function getMaxFallDamage() : float;
/**
* Returns the sound that will be played when FallingBlock hits the ground.
*/