SimpleChunkManager
in package
implements
ChunkManager
Interfaces, Classes, Traits and Enums
Table of Contents
- $chunks : array<string|int, Chunk>
- $maxY : int
- $minY : int
- __construct() : mixed
- cleanChunks() : void
- getBlockAt() : Block
- Returns a Block object representing the block state at the given coordinates.
- getChunk() : Chunk|null
- getMaxY() : int
- Returns the highest buildable Y coordinate of the world
- getMinY() : int
- Returns the lowest buildable Y coordinate of the world
- isInWorld() : bool
- Returns whether the specified coordinates are within the valid world boundaries, taking world format limitations into account.
- setBlockAt() : void
- Sets the block at the given coordinates to the block state specified.
- setChunk() : void
Properties
$chunks
protected
array<string|int, Chunk>
$chunks
= []
$maxY
private
int
$maxY
$minY
private
int
$minY
Methods
__construct()
public
__construct(int $minY, int $maxY) : mixed
Parameters
- $minY : int
- $maxY : int
Return values
mixed —cleanChunks()
public
cleanChunks() : void
Return values
void —getBlockAt()
Returns a Block object representing the block state at the given coordinates.
public
getBlockAt(int $x, int $y, int $z) : Block
Parameters
- $x : int
- $y : int
- $z : int
Return values
Block —getChunk()
public
getChunk(int $chunkX, int $chunkZ) : Chunk|null
Parameters
- $chunkX : int
- $chunkZ : int
Return values
Chunk|null —getMaxY()
Returns the highest buildable Y coordinate of the world
public
getMaxY() : int
Return values
int —getMinY()
Returns the lowest buildable Y coordinate of the world
public
getMinY() : int
Return values
int —isInWorld()
Returns whether the specified coordinates are within the valid world boundaries, taking world format limitations into account.
public
isInWorld(int $x, int $y, int $z) : bool
Parameters
- $x : int
- $y : int
- $z : int
Return values
bool —setBlockAt()
Sets the block at the given coordinates to the block state specified.
public
setBlockAt(int $x, int $y, int $z, Block $block) : void
Parameters
- $x : int
- $y : int
- $z : int
- $block : Block
Return values
void —setChunk()
public
setChunk(int $chunkX, int $chunkZ, Chunk $chunk) : void
Parameters
- $chunkX : int
- $chunkZ : int
- $chunk : Chunk