Plant growth & scheduled updates!

This commit is contained in:
Shoghi Cervantes
2013-06-04 17:23:03 +02:00
parent be9676ebe5
commit dce9b3140a
17 changed files with 237 additions and 123 deletions

View File

@ -33,7 +33,7 @@ class RedstoneOreBlock extends SolidBlock{
public function onUpdate($type){
if($type === BLOCK_UPDATE_NORMAL or $type === BLOCK_UPDATE_TOUCH){
$this->level->setBlock($this, BlockAPI::get(GLOWING_REDSTONE_ORE, $this->meta), false);
$this->level->scheduleBlockUpdate($this, mt_rand(45, 100));
$this->level->scheduleBlockUpdate(new Position($this, 0, 0, $this->level), Utils::getRandomUpdateTicks(), BLOCK_UPDATE_RANDOM);
return BLOCK_UPDATE_WEAK;
}
return false;