PMF & Multiworld [part 2]

This commit is contained in:
Shoghi Cervantes Pueyo
2013-05-14 19:25:55 +02:00
parent 9b212ae034
commit 5938747083
39 changed files with 239 additions and 301 deletions

View File

@ -30,10 +30,10 @@ class RedstoneOreBlock extends SolidBlock{
parent::__construct(REDSTONE_ORE, 0, "Redstone Ore");
}
public function onUpdate(BlockAPI $level, $type){
public function onUpdate($type){
if($type === BLOCK_UPDATE_NORMAL or $type === BLOCK_UPDATE_TOUCH){
$level->setBlock($this, GLOWING_REDSTONE_ORE, $this->getMetadata(), false);
$level->scheduleBlockUpdate($this, mt_rand(45, 100));
$this->level->setBlock($this, GLOWING_REDSTONE_ORE, $this->getMetadata(), false);
$this->level->scheduleBlockUpdate($this, mt_rand(45, 100));
return BLOCK_UPDATE_WEAK;
}
return false;