mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 00:55:14 +00:00
World: remove one more unnecessary vector3 field mutation
This commit is contained in:
@ -2235,6 +2235,7 @@ class World implements ChunkManager{
|
|||||||
$v = $spawn->floor();
|
$v = $spawn->floor();
|
||||||
$chunk = $this->getChunkAtPosition($v, false);
|
$chunk = $this->getChunkAtPosition($v, false);
|
||||||
$x = (int) $v->x;
|
$x = (int) $v->x;
|
||||||
|
$y = $v->y;
|
||||||
$z = (int) $v->z;
|
$z = (int) $v->z;
|
||||||
if($chunk !== null and $chunk->isGenerated()){
|
if($chunk !== null and $chunk->isGenerated()){
|
||||||
$y = (int) min($max - 2, $v->y);
|
$y = (int) min($max - 2, $v->y);
|
||||||
@ -2259,11 +2260,9 @@ class World implements ChunkManager{
|
|||||||
++$y;
|
++$y;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$v->y = $y;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return new Position($spawn->x, $v->y, $spawn->z, $this);
|
return new Position($spawn->x, $y, $spawn->z, $this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user