mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Updated Position to use Weak / strong references for Level objects
This commit is contained in:
@ -47,7 +47,7 @@ class Torch extends Flowable{
|
||||
if($this->getSide($faces[$side])->isTransparent === true and !($side === 0 and $this->getSide(0)->getID() === self::FENCE)){ //Replace with common break method
|
||||
//TODO
|
||||
//Server::getInstance()->api->entity->drop($this, Item::get($this->id, 0, 1));
|
||||
$this->level->setBlock($this, new Air(), true, false, true);
|
||||
$this->getLevel()->setBlock($this, new Air(), true, false, true);
|
||||
|
||||
return Level::BLOCK_UPDATE_NORMAL;
|
||||
}
|
||||
@ -66,12 +66,12 @@ class Torch extends Flowable{
|
||||
5 => 1,
|
||||
);
|
||||
$this->meta = $faces[$face];
|
||||
$this->level->setBlock($block, $this, true, false, true);
|
||||
$this->getLevel()->setBlock($block, $this, true, false, true);
|
||||
|
||||
return true;
|
||||
}elseif($this->getSide(0)->isTransparent === false or $this->getSide(0)->getID() === self::FENCE){
|
||||
$this->meta = 0;
|
||||
$this->level->setBlock($block, $this, true, false, true);
|
||||
$this->getLevel()->setBlock($block, $this, true, false, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user