mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Block creating and property handling rewrite, part1
This commit is contained in:
@ -29,15 +29,28 @@ use pocketmine\Player;
|
||||
|
||||
class Ladder extends Transparent{
|
||||
|
||||
public $hasEntityCollision = true;
|
||||
protected $id = self::LADDER;
|
||||
|
||||
public function __construct($meta = 0){
|
||||
parent::__construct(self::LADDER, $meta, "Ladder");
|
||||
$this->isSolid = false;
|
||||
$this->isFullBlock = false;
|
||||
$this->hardness = 2;
|
||||
$this->meta = $meta;
|
||||
}
|
||||
|
||||
public function getName(){
|
||||
return "Ladder";
|
||||
}
|
||||
|
||||
public function hasEntityCollision(){
|
||||
return true;
|
||||
}
|
||||
|
||||
public function isSolid(){
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getHardness(){
|
||||
return 2;
|
||||
}
|
||||
|
||||
public function onEntityCollide(Entity $entity){
|
||||
$entity->fallDistance = 0;
|
||||
$entity->onGround = true;
|
||||
|
Reference in New Issue
Block a user