mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-20 15:41:33 +00:00
Added World::Y_MIN
preparation for Y axis expansion in 1.17
This commit is contained in:
@@ -97,7 +97,7 @@ class ParticleCommand extends VanillaCommand{
|
||||
$world = $senderPos->getWorld();
|
||||
$pos = new Vector3(
|
||||
$this->getRelativeDouble($senderPos->getX(), $sender, $args[1]),
|
||||
$this->getRelativeDouble($senderPos->getY(), $sender, $args[2], 0, World::Y_MAX),
|
||||
$this->getRelativeDouble($senderPos->getY(), $sender, $args[2], World::Y_MIN, World::Y_MAX),
|
||||
$this->getRelativeDouble($senderPos->getZ(), $sender, $args[3])
|
||||
);
|
||||
}else{
|
||||
|
@@ -73,7 +73,7 @@ class SpawnpointCommand extends VanillaCommand{
|
||||
$world = $target->getWorld();
|
||||
$pos = $sender instanceof Player ? $sender->getPosition() : $world->getSpawnLocation();
|
||||
$x = $this->getRelativeDouble($pos->x, $sender, $args[1]);
|
||||
$y = $this->getRelativeDouble($pos->y, $sender, $args[2], 0, World::Y_MAX);
|
||||
$y = $this->getRelativeDouble($pos->y, $sender, $args[2], World::Y_MIN, World::Y_MAX);
|
||||
$z = $this->getRelativeDouble($pos->z, $sender, $args[3]);
|
||||
$target->setSpawn(new Position($x, $y, $z, $world));
|
||||
|
||||
|
Reference in New Issue
Block a user