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