PocketMine-MP 5.16.1 git-585aee9386a787c95e73dd0a05ffca8329606b68
pocketmine\world\SimpleChunkManager Class Reference
+ Inheritance diagram for pocketmine\world\SimpleChunkManager:
+ Collaboration diagram for pocketmine\world\SimpleChunkManager:

Public Member Functions

 __construct (private int $minY, private int $maxY)
 
 cleanChunks ()
 
 getBlockAt (int $x, int $y, int $z)
 
 getChunk (int $chunkX, int $chunkZ)
 
 getMaxY ()
 
 getMinY ()
 
 isInWorld (int $x, int $y, int $z)
 
 setBlockAt (int $x, int $y, int $z, Block $block)
 
 setChunk (int $chunkX, int $chunkZ, Chunk $chunk)
 

Protected Attributes

array $chunks = []
 

Detailed Description

Definition at line 32 of file SimpleChunkManager.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\world\SimpleChunkManager::__construct ( private int  $minY,
private int  $maxY 
)

Definition at line 37 of file SimpleChunkManager.php.

Member Function Documentation

◆ cleanChunks()

pocketmine\world\SimpleChunkManager::cleanChunks ( )

Definition at line 65 of file SimpleChunkManager.php.

◆ getBlockAt()

pocketmine\world\SimpleChunkManager::getBlockAt ( int  $x,
int  $y,
int  $z 
)

Returns a Block object representing the block state at the given coordinates.

Implements pocketmine\world\ChunkManager.

Definition at line 42 of file SimpleChunkManager.php.

◆ getChunk()

pocketmine\world\SimpleChunkManager::getChunk ( int  $chunkX,
int  $chunkZ 
)

Implements pocketmine\world\ChunkManager.

Definition at line 57 of file SimpleChunkManager.php.

◆ getMaxY()

pocketmine\world\SimpleChunkManager::getMaxY ( )

Returns the highest buildable Y coordinate of the world

Implements pocketmine\world\ChunkManager.

Definition at line 73 of file SimpleChunkManager.php.

◆ getMinY()

pocketmine\world\SimpleChunkManager::getMinY ( )

Returns the lowest buildable Y coordinate of the world

Implements pocketmine\world\ChunkManager.

Definition at line 69 of file SimpleChunkManager.php.

◆ isInWorld()

pocketmine\world\SimpleChunkManager::isInWorld ( int  $x,
int  $y,
int  $z 
)

Returns whether the specified coordinates are within the valid world boundaries, taking world format limitations into account.

Implements pocketmine\world\ChunkManager.

Definition at line 77 of file SimpleChunkManager.php.

◆ setBlockAt()

pocketmine\world\SimpleChunkManager::setBlockAt ( int  $x,
int  $y,
int  $z,
Block  $block 
)

Sets the block at the given coordinates to the block state specified.

Exceptions

InvalidArgumentException

Implements pocketmine\world\ChunkManager.

Definition at line 49 of file SimpleChunkManager.php.

◆ setChunk()

pocketmine\world\SimpleChunkManager::setChunk ( int  $chunkX,
int  $chunkZ,
Chunk  $chunk 
)

Implements pocketmine\world\ChunkManager.

Definition at line 61 of file SimpleChunkManager.php.

Member Data Documentation

◆ $chunks

array pocketmine\world\SimpleChunkManager::$chunks = []
protected

Definition at line 35 of file SimpleChunkManager.php.


The documentation for this class was generated from the following file: