mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-08-30 06:55:11 +00:00
HayBale: fixed fall damage
This commit is contained in:
parent
67a0ae0246
commit
aaf7a88de7
@ -24,6 +24,7 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\utils\PillarRotationInMetadataTrait;
|
use pocketmine\block\utils\PillarRotationInMetadataTrait;
|
||||||
|
use pocketmine\entity\Entity;
|
||||||
|
|
||||||
class HayBale extends Opaque{
|
class HayBale extends Opaque{
|
||||||
use PillarRotationInMetadataTrait;
|
use PillarRotationInMetadataTrait;
|
||||||
@ -35,4 +36,9 @@ class HayBale extends Opaque{
|
|||||||
public function getFlammability() : int{
|
public function getFlammability() : int{
|
||||||
return 20;
|
return 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function onEntityLand(Entity $entity) : ?float{
|
||||||
|
$entity->fallDistance *= 0.2;
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user