mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Level: Remove setSeed()
Seed is immutable information about the world, like its generator type, generator options, name, etc. We don't allow changing any of those things, so why the fuck would we allow changing the seed? This makes no sense at all. I'm removing this because a) its existence makes no sense, and b) it will not produce the behaviour expected from such a function (what even is the expected behaviour???)
This commit is contained in:
@ -2864,15 +2864,6 @@ class Level implements ChunkManager, Metadatable{
|
||||
return $this->provider->getSeed();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the seed for the level
|
||||
*
|
||||
* @param int $seed
|
||||
*/
|
||||
public function setSeed(int $seed){
|
||||
$this->provider->setSeed($seed);
|
||||
}
|
||||
|
||||
public function getWorldHeight() : int{
|
||||
return $this->worldHeight;
|
||||
}
|
||||
|
@ -98,10 +98,6 @@ abstract class BaseLevelProvider implements LevelProvider{
|
||||
return $this->levelData->getLong("RandomSeed");
|
||||
}
|
||||
|
||||
public function setSeed(int $value){
|
||||
$this->levelData->setLong("RandomSeed", $value);
|
||||
}
|
||||
|
||||
public function getSpawn() : Vector3{
|
||||
return new Vector3($this->levelData->getInt("SpawnX"), $this->levelData->getInt("SpawnY"), $this->levelData->getInt("SpawnZ"));
|
||||
}
|
||||
|
@ -118,11 +118,6 @@ interface LevelProvider{
|
||||
*/
|
||||
public function getSeed() : int;
|
||||
|
||||
/**
|
||||
* @param int
|
||||
*/
|
||||
public function setSeed(int $value);
|
||||
|
||||
/**
|
||||
* @return Vector3
|
||||
*/
|
||||
|
Reference in New Issue
Block a user