mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-14 15:35:31 +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){
|
if($pos !== null){
|
||||||
$block->x = $pos->getFloorX();
|
$block->position($pos->getLevel(), $pos->getFloorX(), $pos->getFloorY(), $pos->getFloorZ());
|
||||||
$block->y = $pos->getFloorY();
|
|
||||||
$block->z = $pos->getFloorZ();
|
|
||||||
$block->level = $pos->level;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $block;
|
return $block;
|
||||||
|
@ -51,7 +51,7 @@ class PaintingItem extends Item{
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Painting::canFit($player->level, $blockReplace, $face, true, $motive)){
|
if(Painting::canFit($player->getLevel(), $blockReplace, $face, true, $motive)){
|
||||||
if($currentTotalDimension > $totalDimension){
|
if($currentTotalDimension > $totalDimension){
|
||||||
$totalDimension = $currentTotalDimension;
|
$totalDimension = $currentTotalDimension;
|
||||||
/*
|
/*
|
||||||
|
@ -1368,11 +1368,7 @@ class Level implements ChunkManager, Metadatable{
|
|||||||
}
|
}
|
||||||
|
|
||||||
$block = BlockFactory::get($id, $meta);
|
$block = BlockFactory::get($id, $meta);
|
||||||
|
$block->position($this, $x, $y, $z);
|
||||||
$block->x = $x;
|
|
||||||
$block->y = $y;
|
|
||||||
$block->z = $z;
|
|
||||||
$block->level = $this;
|
|
||||||
|
|
||||||
static $dynamicStateRead = false;
|
static $dynamicStateRead = false;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user