mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Block creating and property handling rewrite, part1
This commit is contained in:
@ -23,12 +23,23 @@ namespace pocketmine\block;
|
||||
|
||||
|
||||
class Sand extends Fallable{
|
||||
|
||||
protected $id = self::SAND;
|
||||
|
||||
public function __construct($meta = 0){
|
||||
parent::__construct(self::SAND, $meta & 0x01, "Sand");
|
||||
if($this->meta === 0x01){
|
||||
$this->name = "Red sand";
|
||||
}
|
||||
$this->hardness = 2.5;
|
||||
$this->meta = $meta & 0x01;
|
||||
}
|
||||
|
||||
public function getHardness(){
|
||||
return 2.5;
|
||||
}
|
||||
|
||||
public function getName(){
|
||||
if($this->meta === 0x01){
|
||||
return "Red Sand";
|
||||
}
|
||||
|
||||
return "Sand";
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user