mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Further refactors to prepare for y=-64 lower limit
This commit is contained in:
@ -36,10 +36,15 @@ interface WorldProvider{
|
||||
*/
|
||||
public function __construct(string $path);
|
||||
|
||||
/**
|
||||
* Returns the lowest buildable Y coordinate of this world
|
||||
*/
|
||||
public function getWorldMinY() : int;
|
||||
|
||||
/**
|
||||
* Gets the build height limit of this world
|
||||
*/
|
||||
public function getWorldHeight() : int;
|
||||
public function getWorldMaxY() : int;
|
||||
|
||||
public function getPath() : string;
|
||||
|
||||
|
@ -132,7 +132,11 @@ class LevelDB extends BaseWorldProvider implements WritableWorldProvider{
|
||||
return new BedrockWorldData($this->getPath() . DIRECTORY_SEPARATOR . "level.dat");
|
||||
}
|
||||
|
||||
public function getWorldHeight() : int{
|
||||
public function getWorldMinY() : int{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function getWorldMaxY() : int{
|
||||
return 256;
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,11 @@ class Anvil extends RegionWorldProvider{
|
||||
return 19133;
|
||||
}
|
||||
|
||||
public function getWorldHeight() : int{
|
||||
public function getWorldMinY() : int{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function getWorldMaxY() : int{
|
||||
//TODO: add world height options
|
||||
return 256;
|
||||
}
|
||||
|
@ -106,7 +106,11 @@ class McRegion extends RegionWorldProvider{
|
||||
return 19132;
|
||||
}
|
||||
|
||||
public function getWorldHeight() : int{
|
||||
public function getWorldMinY() : int{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function getWorldMaxY() : int{
|
||||
//TODO: add world height options
|
||||
return 128;
|
||||
}
|
||||
|
@ -50,7 +50,11 @@ class PMAnvil extends RegionWorldProvider{
|
||||
return -1; //Not a PC format, only PocketMine-MP
|
||||
}
|
||||
|
||||
public function getWorldHeight() : int{
|
||||
public function getWorldMinY() : int{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function getWorldMaxY() : int{
|
||||
return 256;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user