Implement anvil damage on fall (#5345)

This commit is contained in:
IvanCraft623
2022-12-15 14:12:18 -05:00
committed by GitHub
parent 8e600b4a78
commit 84f9136b95
4 changed files with 32 additions and 0 deletions

View File

@ -24,6 +24,7 @@ declare(strict_types=1);
namespace pocketmine\block\utils;
use pocketmine\block\Block;
use pocketmine\entity\object\FallingBlock;
interface Fallable{
@ -33,4 +34,10 @@ interface Fallable{
* Return null if you don't want to change the usual behaviour.
*/
public function tickFalling() : ?Block;
/**
* Called when FallingBlock hits the ground.
* Returns whether the block should be placed.
*/
public function onHitGround(FallingBlock $blockEntity) : bool;
}