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