PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
LevelProvider.php
1 <?php
2 
3 /*
4  *
5  * ____ _ _ __ __ _ __ __ ____
6  * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
7  * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
8  * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
9  * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
10  *
11  * This program is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License as published by
13  * the Free Software Foundation, either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * @author PocketMine Team
17  * @link http://www.pocketmine.net/
18  *
19  *
20 */
21 
22 namespace pocketmine\level\format;
23 
26 
27 interface LevelProvider{
28 
29  const ORDER_YZX = 0;
30  const ORDER_ZXY = 1;
31 
36  public function __construct(Level $level, $path);
37 
43  public static function getProviderName();
44 
48  public static function getProviderOrder();
49 
53  public static function usesChunkSection();
54 
63  public function requestChunkTask($x, $z);
64 
66  public function getPath();
67 
76  public static function isValid($path);
77 
87  public static function generate($path, $name, $seed, $generator, array $options = []);
88 
94  public function getGenerator();
95 
99  public function getGeneratorOptions();
100 
111  public function getChunk($X, $Z, $create = false);
112 
118  public static function createChunkSection($Y);
119 
120  public function saveChunks();
121 
126  public function saveChunk($X, $Z);
127 
128  public function unloadChunks();
129 
137  public function loadChunk($X, $Z, $create = false);
138 
146  public function unloadChunk($X, $Z, $safe = true);
147 
154  public function isChunkGenerated($X, $Z);
155 
162  public function isChunkPopulated($X, $Z);
163 
170  public function isChunkLoaded($X, $Z);
171 
179  public function setChunk($chunkX, $chunkZ, FullChunk $chunk);
180 
184  public function getName();
185 
189  public function getTime();
190 
194  public function setTime($value);
195 
199  public function getSeed();
200 
204  public function setSeed($value);
205 
209  public function getSpawn();
210 
214  public function setSpawn(Vector3 $pos);
215 
219  public function getLoadedChunks();
220 
224  public function getLevel();
225 
226  public function close();
227 
228 }
setChunk($chunkX, $chunkZ, FullChunk $chunk)
getChunk($X, $Z, $create=false)
static generate($path, $name, $seed, $generator, array $options=[])
loadChunk($X, $Z, $create=false)