Block creating and property handling rewrite, part1

This commit is contained in:
Shoghi Cervantes
2014-12-07 01:53:27 +01:00
parent 79236c971c
commit a0d4bff385
138 changed files with 1912 additions and 835 deletions

View File

@ -26,13 +26,24 @@ use pocketmine\level\Level;
class GlowingRedstoneOre extends Solid{
public $lightLevel = 9;
protected $id = self::GLOWING_REDSTONE_ORE;
public function __construct(){
parent::__construct(self::GLOWING_REDSTONE_ORE, 0, "Glowing Redstone Ore");
$this->hardness = 15;
}
public function getHardness(){
return 15;
}
public function getName(){
return "Glowing Redstone Ore";
}
public function getLightLevel(){
return 9;
}
public function onUpdate($type){
if($type === Level::BLOCK_UPDATE_SCHEDULED or $type === Level::BLOCK_UPDATE_RANDOM){
$this->getLevel()->setBlock($this, Block::get(Item::REDSTONE_ORE, $this->meta), false, false, true);