mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
Ore: replaced a sub-optimal multiply()->divide() on Vector2
This commit is contained in:
parent
95606b6e04
commit
e48ec9fb71
@ -50,7 +50,7 @@ class Ore{
|
||||
public function placeObject(ChunkManager $level, int $x, int $y, int $z){
|
||||
$clusterSize = $this->type->clusterSize;
|
||||
$angle = $this->random->nextFloat() * M_PI;
|
||||
$offset = VectorMath::getDirection2D($angle)->multiply($clusterSize)->divide(8);
|
||||
$offset = VectorMath::getDirection2D($angle)->multiply($clusterSize / 8);
|
||||
$x1 = $x + 8 + $offset->x;
|
||||
$x2 = $x + 8 - $offset->x;
|
||||
$z1 = $z + 8 + $offset->y;
|
||||
|
Loading…
x
Reference in New Issue
Block a user