Added World::Y_MIN

preparation for Y axis expansion in 1.17
This commit is contained in:
Dylan K. Taylor
2021-03-17 23:19:49 +00:00
parent 5a59afbe2c
commit b844c4266d
4 changed files with 9 additions and 8 deletions

View File

@@ -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{

View File

@@ -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));