mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 12:04:46 +00:00
Convert BlockFactory to singleton
This commit is contained in:
@@ -71,7 +71,7 @@ class FallingBlock extends Entity{
|
||||
|
||||
$damage = $nbt->getByte("Data", 0);
|
||||
|
||||
$this->block = BlockFactory::get($blockId, $damage);
|
||||
$this->block = BlockFactory::getInstance()->get($blockId, $damage);
|
||||
}
|
||||
|
||||
public function canCollideWith(Entity $entity) : bool{
|
||||
|
@@ -100,7 +100,7 @@ abstract class Projectile extends Entity{
|
||||
break;
|
||||
}
|
||||
|
||||
$this->blockHit = BlockFactory::get($blockId, $blockData);
|
||||
$this->blockHit = BlockFactory::getInstance()->get($blockId, $blockData);
|
||||
$this->blockHit->position($this->getWorld(), $blockPos->getFloorX(), $blockPos->getFloorY(), $blockPos->getFloorZ());
|
||||
}while(false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user