Updated Position to use Weak / strong references for Level objects

This commit is contained in:
Shoghi Cervantes
2014-05-22 04:14:06 +02:00
parent 6328834681
commit c1546aac9c
60 changed files with 584 additions and 291 deletions

View File

@ -42,12 +42,12 @@ class Grass extends Solid{
public function onActivate(Item $item, Player $player = null){
if($item->getID() === Item::DYE and $item->getMetadata() === 0x0F){
$item->count--;
TallGrass::growGrass($this->level, $this, new Random(mt_rand()), 8, 2);
TallGrass::growGrass($this->getLevel(), $this, new Random(mt_rand()), 8, 2);
return true;
}elseif($item->isHoe()){
$item->useOn($this);
$this->level->setBlock($this, new Farmland());
$this->getLevel()->setBlock($this, new Farmland());
return true;
}