HayBale: fixed fall damage

This commit is contained in:
Dylan K. Taylor 2022-01-22 21:26:34 +00:00
parent 67a0ae0246
commit aaf7a88de7
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -24,6 +24,7 @@ declare(strict_types=1);
namespace pocketmine\block;
use pocketmine\block\utils\PillarRotationInMetadataTrait;
use pocketmine\entity\Entity;
class HayBale extends Opaque{
use PillarRotationInMetadataTrait;
@ -35,4 +36,9 @@ class HayBale extends Opaque{
public function getFlammability() : int{
return 20;
}
public function onEntityLand(Entity $entity) : ?float{
$entity->fallDistance *= 0.2;
return null;
}
}