mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-12 22:45:28 +00:00
Remove some direct Position->level accesses
This commit is contained in:
parent
9fb365306a
commit
8051fa4f6d
@ -538,10 +538,7 @@ class BlockFactory{
|
||||
}
|
||||
|
||||
if($pos !== null){
|
||||
$block->x = $pos->getFloorX();
|
||||
$block->y = $pos->getFloorY();
|
||||
$block->z = $pos->getFloorZ();
|
||||
$block->level = $pos->level;
|
||||
$block->position($pos->getLevel(), $pos->getFloorX(), $pos->getFloorY(), $pos->getFloorZ());
|
||||
}
|
||||
|
||||
return $block;
|
||||
|
@ -51,7 +51,7 @@ class PaintingItem extends Item{
|
||||
continue;
|
||||
}
|
||||
|
||||
if(Painting::canFit($player->level, $blockReplace, $face, true, $motive)){
|
||||
if(Painting::canFit($player->getLevel(), $blockReplace, $face, true, $motive)){
|
||||
if($currentTotalDimension > $totalDimension){
|
||||
$totalDimension = $currentTotalDimension;
|
||||
/*
|
||||
|
@ -1368,11 +1368,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
}
|
||||
|
||||
$block = BlockFactory::get($id, $meta);
|
||||
|
||||
$block->x = $x;
|
||||
$block->y = $y;
|
||||
$block->z = $z;
|
||||
$block->level = $this;
|
||||
$block->position($this, $x, $y, $z);
|
||||
|
||||
static $dynamicStateRead = false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user