PocketMine
|
Public Member Functions | |
getTickRate () | |
getTickRateTime () | |
setTickRate ($tickRate) | |
initLevel () | |
registerGenerator () | |
unregisterGenerator () | |
getBlockMetadata () | |
getServer () | |
getProvider () | |
getId () | |
close () | |
addSound (Sound $sound, array $players=null) | |
addParticle (Particle $particle, array $players=null) | |
getAutoSave () | |
setAutoSave ($value) | |
unload ($force=false) | |
getUsingChunk ($chunkX, $chunkZ) | |
getChunkPlayers ($chunkX, $chunkZ) | |
getChunkLoaders ($chunkX, $chunkZ) | |
addChunkPacket ($chunkX, $chunkZ, DataPacket $packet) | |
registerChunkLoader (ChunkLoader $loader, $chunkX, $chunkZ, $autoLoad=true) | |
unregisterChunkLoader (ChunkLoader $loader, $chunkX, $chunkZ) | |
checkTime () | |
sendTime () | |
doTick ($currentTick) | |
checkSleep () | |
sendBlockExtraData ($x, $y, $z, $id, $data, array $targets=null) | |
sendBlocks (array $target, array $blocks, $flags=UpdateBlockPacket::FLAG_NONE, $optimizeRebuilds=false) | |
clearCache ($full=false) | |
clearChunkCache ($chunkX, $chunkZ) | |
__debugInfo () | |
save ($force=false) | |
saveChunks () | |
updateAround (Vector3 $pos) | |
scheduleUpdate (Vector3 $pos, $delay) | |
getCollisionBlocks (AxisAlignedBB $bb, $targetFirst=false) | |
isFullBlock (Vector3 $pos) | |
getCollisionCubes (Entity $entity, AxisAlignedBB $bb, $entities=true) | |
getFullLight (Vector3 $pos) | |
getFullBlock ($x, $y, $z) | |
getBlock (Vector3 $pos, $cached=true) | |
updateAllLight (Vector3 $pos) | |
updateBlockSkyLight ($x, $y, $z) | |
setBlock (Vector3 $pos, Block $block, $direct=false, $update=true) | |
dropItem (Vector3 $source, Item $item, Vector3 $motion=null, $delay=10) | |
useBreakOn (Vector3 $vector, Item &$item=null, Player $player=null, $createParticles=false) | |
useItemOn (Vector3 $vector, Item &$item, $face, $fx=0.0, $fy=0.0, $fz=0.0, Player $player=null) | |
getEntity ($entityId) | |
getEntities () | |
getCollidingEntities (AxisAlignedBB $bb, Entity $entity=null) | |
getNearbyEntities (AxisAlignedBB $bb, Entity $entity=null) | |
getTiles () | |
getTileById ($tileId) | |
getPlayers () | |
getLoaders () | |
getTile (Vector3 $pos) | |
getChunkEntities ($X, $Z) | |
getChunkTiles ($X, $Z) | |
getBlockIdAt ($x, $y, $z) | |
setBlockIdAt ($x, $y, $z, $id) | |
getBlockExtraDataAt ($x, $y, $z) | |
setBlockExtraDataAt ($x, $y, $z, $id, $data) | |
getBlockDataAt ($x, $y, $z) | |
setBlockDataAt ($x, $y, $z, $data) | |
getBlockSkyLightAt ($x, $y, $z) | |
setBlockSkyLightAt ($x, $y, $z, $level) | |
getBlockLightAt ($x, $y, $z) | |
setBlockLightAt ($x, $y, $z, $level) | |
getBiomeId ($x, $z) | |
getBiomeColor ($x, $z) | |
getHeightMap ($x, $z) | |
setBiomeId ($x, $z, $biomeId) | |
setBiomeColor ($x, $z, $R, $G, $B) | |
setHeightMap ($x, $z, $value) | |
getChunks () | |
getChunk ($x, $z, $create=false) | |
getChunkAt ($x, $z, $create=false) | |
generateChunkCallback ($x, $z, FullChunk $chunk) | |
setChunk ($chunkX, $chunkZ, FullChunk $chunk=null, $unload=true) | |
getHighestBlockAt ($x, $z) | |
isChunkLoaded ($x, $z) | |
isChunkGenerated ($x, $z) | |
isChunkPopulated ($x, $z) | |
getSpawnLocation () | |
setSpawnLocation (Vector3 $pos) | |
requestChunk ($x, $z, Player $player) | |
removeEntity (Entity $entity) | |
addEntity (Entity $entity) | |
addTile (Tile $tile) | |
removeTile (Tile $tile) | |
isChunkInUse ($x, $z) | |
loadChunk ($x, $z, $generate=true) | |
unloadChunkRequest ($x, $z, $safe=true) | |
cancelUnloadChunkRequest ($x, $z) | |
unloadChunk ($x, $z, $safe=true, $trySave=true) | |
isSpawnChunk ($X, $Z) | |
getSpawn () | |
getSafeSpawn ($spawn=null) | |
setSpawn (Vector3 $pos) | |
getTime () | |
getName () | |
getFolderName () | |
setTime ($time) | |
stopTime () | |
startTime () | |
getSeed () | |
setSeed ($seed) | |
populateChunk ($x, $z, $force=false) | |
generateChunk ($x, $z, $force=false) | |
regenerateChunk ($x, $z) | |
doChunkGarbageCollection () | |
unloadChunks ($force=false) | |
setMetadata ($metadataKey, MetadataValue $metadataValue) | |
getMetadata ($metadataKey) | |
hasMetadata ($metadataKey) | |
removeMetadata ($metadataKey, Plugin $plugin) | |
addEntityMotion ($chunkX, $chunkZ, $entityId, $x, $y, $z) | |
addEntityMovement ($chunkX, $chunkZ, $entityId, $x, $y, $z, $yaw, $pitch, $headYaw=null) | |
Public Member Functions inherited from ChunkManager | |
getChunk ($chunkX, $chunkZ) | |
setChunk ($chunkX, $chunkZ, FullChunk $chunk=null) | |
Static Public Member Functions | |
static | chunkHash ($x, $z) |
static | blockHash ($x, $y, $z) |
static | chunkBlockHash ($x, $y, $z) |
static | getBlockXYZ ($hash, &$x, &$y, &$z) |
static | getXZ ($hash, &$x, &$z) |
static | generateChunkLoaderId (ChunkLoader $loader) |
Static Public Attributes | |
static | $COMPRESSION_LEVEL = 8 |
addEntity | ( | Entity | $entity | ) |
Entity | $entity |
LevelException |
addTile | ( | Tile | $tile | ) |
Tile | $tile |
LevelException |
checkTime | ( | ) |
WARNING: Do not use this, it's only for internal use. Changes to this function won't be recorded on the version.
|
static |
Returns the chunk unique hash/key
int | $x | |
int | $z |
doTick | ( | $currentTick | ) |
WARNING: Do not use this, it's only for internal use. Changes to this function won't be recorded on the version.
int | $currentTick |
Vector3 | $source | |
Item | $item | |
Vector3 | $motion | |
int | $delay |
getAutoSave | ( | ) |
getBiomeColor | ( | $x, | |
$z | |||
) |
int | $x | |
int | $z |
getBiomeId | ( | $x, | |
$z | |||
) |
int | $x | |
int | $z |
getBlock | ( | Vector3 | $pos, |
$cached = true |
|||
) |
Gets the Block object on the Vector3 location
Vector3 | $pos | |
boolean | $cached |
getBlockDataAt | ( | $x, | |
$y, | |||
$z | |||
) |
getBlockExtraDataAt | ( | $x, | |
$y, | |||
$z | |||
) |
Gets the raw block extra data
int | $x | |
int | $y | |
int | $z |
getBlockIdAt | ( | $x, | |
$y, | |||
$z | |||
) |
getBlockLightAt | ( | $x, | |
$y, | |||
$z | |||
) |
Gets the raw block light level
int | $x | |
int | $y | |
int | $z |
getBlockMetadata | ( | ) |
getBlockSkyLightAt | ( | $x, | |
$y, | |||
$z | |||
) |
Gets the raw block skylight level
int | $x | |
int | $y | |
int | $z |
getChunk | ( | $x, | |
$z, | |||
$create = false |
|||
) |
Gets the Chunk object
int | $x | |
int | $z | |
bool | $create | Whether to generate the chunk if it does not exist |
getChunkAt | ( | $x, | |
$z, | |||
$create = false |
|||
) |
getChunkEntities | ( | $X, | |
$Z | |||
) |
Returns a list of the entities on a given chunk
int | $X | |
int | $Z |
getChunkLoaders | ( | $chunkX, | |
$chunkZ | |||
) |
Gets the chunk loaders being used in a specific chunk
int | $chunkX | |
int | $chunkZ |
getChunkPlayers | ( | $chunkX, | |
$chunkZ | |||
) |
getChunks | ( | ) |
getChunkTiles | ( | $X, | |
$Z | |||
) |
Gives a list of the Tile entities on a given chunk
int | $X | |
int | $Z |
getCollidingEntities | ( | AxisAlignedBB | $bb, |
Entity | $entity = null |
||
) |
Returns the entities colliding the current one inside the AxisAlignedBB
AxisAlignedBB | $bb | |
Entity | $entity |
getCollisionBlocks | ( | AxisAlignedBB | $bb, |
$targetFirst = false |
|||
) |
AxisAlignedBB | $bb | |
bool | $targetFirst |
getCollisionCubes | ( | Entity | $entity, |
AxisAlignedBB | $bb, | ||
$entities = true |
|||
) |
Entity | $entity | |
AxisAlignedBB | $bb | |
boolean | $entities |
getEntities | ( | ) |
Gets the list of all the entities in this level
getEntity | ( | $entityId | ) |
int | $entityId |
getFolderName | ( | ) |
Returns the Level folder name
getFullBlock | ( | $x, | |
$y, | |||
$z | |||
) |
$x | |
$y | |
$z |
getHeightMap | ( | $x, | |
$z | |||
) |
int | $x | |
int | $z |
getHighestBlockAt | ( | $x, | |
$z | |||
) |
Gets the highest block Y value at a specific $x and $z
int | $x | |
int | $z |
|
final |
Returns the unique level identifier
getLoaders | ( | ) |
getMetadata | ( | $metadataKey | ) |
Returns a list of previously set metadata values from the implementing object's metadata store.
string | $metadataKey |
Implements Metadatable.
getName | ( | ) |
Returns the Level name
getNearbyEntities | ( | AxisAlignedBB | $bb, |
Entity | $entity = null |
||
) |
Returns the entities near the current one inside the AxisAlignedBB
AxisAlignedBB | $bb | |
Entity | $entity |
getPlayers | ( | ) |
Returns a list of the players in this level
|
final |
getSafeSpawn | ( | $spawn = null | ) |
Vector3 | $spawn | default null |
getSeed | ( | ) |
getServer | ( | ) |
getSpawn | ( | ) |
Returns the raw spawnpoint
getTile | ( | Vector3 | $pos | ) |
Returns the Tile in a position, or null if not found
Vector3 | $pos |
getTileById | ( | $tileId | ) |
$tileId |
getTiles | ( | ) |
Returns a list of the Tile entities in this level
getTime | ( | ) |
Gets the current time
getUsingChunk | ( | $chunkX, | |
$chunkZ | |||
) |
hasMetadata | ( | $metadataKey | ) |
Tests to see whether the implementing object contains the given metadata value in its metadata store.
string | $metadataKey |
Implements Metadatable.
isChunkGenerated | ( | $x, | |
$z | |||
) |
int | $x | |
int | $z |
isChunkInUse | ( | $x, | |
$z | |||
) |
int | $x | |
int | $z |
isChunkLoaded | ( | $x, | |
$z | |||
) |
int | $x | |
int | $z |
isChunkPopulated | ( | $x, | |
$z | |||
) |
int | $x | |
int | $z |
isFullBlock | ( | Vector3 | $pos | ) |
Vector3 | $pos |
isSpawnChunk | ( | $X, | |
$Z | |||
) |
Returns true if the spawn is part of the spawn
int | $X | |
int | $Z |
loadChunk | ( | $x, | |
$z, | |||
$generate = true |
|||
) |
int | $x | |
int | $z | |
bool | $generate |
removeEntity | ( | Entity | $entity | ) |
Removes the entity from the level index
Entity | $entity |
LevelException |
removeMetadata | ( | $metadataKey, | |
Plugin | $owningPlugin | ||
) |
Removes the given metadata value from the implementing object's metadata store.
string | $metadataKey | |
Plugin | $owningPlugin |
Implements Metadatable.
removeTile | ( | Tile | $tile | ) |
Tile | $tile |
LevelException |
save | ( | $force = false | ) |
bool | $force |
scheduleUpdate | ( | Vector3 | $pos, |
$delay | |||
) |
Vector3 | $pos | |
int | $delay |
sendBlocks | ( | array | $target, |
array | $blocks, | ||
$flags = UpdateBlockPacket::FLAG_NONE , |
|||
$optimizeRebuilds = false |
|||
) |
Player[] | $target | |
Block[] | $blocks | |
int | $flags | |
bool | $optimizeRebuilds |
sendTime | ( | ) |
WARNING: Do not use this, it's only for internal use. Changes to this function won't be recorded on the version.
setAutoSave | ( | $value | ) |
bool | $value |
setBiomeColor | ( | $x, | |
$z, | |||
$R, | |||
$G, | |||
$B | |||
) |
int | $x | |
int | $z | |
int | $R | |
int | $G | |
int | $B |
setBiomeId | ( | $x, | |
$z, | |||
$biomeId | |||
) |
int | $x | |
int | $z | |
int | $biomeId |
Sets on Vector3 the data from a Block object, does block updates and puts the changes to the send queue.
If $direct is true, it'll send changes directly to players. if false, it'll be queued and the best way to send queued changes will be done in the next tick. This way big changes can be sent on a single chunk update packet instead of thousands of packets.
If $update is true, it'll get the neighbour blocks (6 sides) and update them. If you are doing big changes, you might want to set this to false, then update manually.
Vector3 | $pos | |
Block | $block | |
bool | $direct |
setBlockDataAt | ( | $x, | |
$y, | |||
$z, | |||
$data | |||
) |
setBlockExtraDataAt | ( | $x, | |
$y, | |||
$z, | |||
$id, | |||
$data | |||
) |
Sets the raw block metadata.
int | $x | |
int | $y | |
int | $z | |
int | $id | |
int | $data |
setBlockIdAt | ( | $x, | |
$y, | |||
$z, | |||
$id | |||
) |
setBlockLightAt | ( | $x, | |
$y, | |||
$z, | |||
$level | |||
) |
Sets the raw block light level.
int | $x | |
int | $y | |
int | $z | |
int | $level | 0-15 |
setBlockSkyLightAt | ( | $x, | |
$y, | |||
$z, | |||
$level | |||
) |
Sets the raw block skylight level.
int | $x | |
int | $y | |
int | $z | |
int | $level | 0-15 |
setChunk | ( | $chunkX, | |
$chunkZ, | |||
FullChunk | $chunk = null , |
||
$unload = true |
|||
) |
int | $chunkX | |
int | $chunkZ | |
FullChunk | $chunk | |
bool | $unload |
setHeightMap | ( | $x, | |
$z, | |||
$value | |||
) |
int | $x | |
int | $z | |
int | $value |
setMetadata | ( | $metadataKey, | |
MetadataValue | $newMetadataValue | ||
) |
Sets a metadata value in the implementing object's metadata store.
string | $metadataKey | |
MetadataValue | $newMetadataValue |
Implements Metadatable.
setSeed | ( | $seed | ) |
Sets the seed for the level
int | $seed |
setSpawn | ( | Vector3 | $pos | ) |
setSpawnLocation | ( | Vector3 | $pos | ) |
Sets the level spawn location
Vector3 | $pos |
setTime | ( | $time | ) |
Sets the current time on the level
int | $time |
startTime | ( | ) |
Start the time again, if it was stopped
stopTime | ( | ) |
Stops the time for the level, will not save the lock state to disk
unload | ( | $force = false | ) |
Unloads the current level from memory safely
bool | $force | default false, force unload of default level |
updateAround | ( | Vector3 | $pos | ) |
Vector3 | $pos |
useItemOn | ( | Vector3 | $vector, |
Item & | $item, | ||
$face, | |||
$fx = 0.0 , |
|||
$fy = 0.0 , |
|||
$fz = 0.0 , |
|||
Player | $player = null |
||
) |
Uses a item on a position and face, placing it or activating the block
Vector3 | $vector | |
Item | $item | |
int | $face | |
float | $fx | default 0.0 |
float | $fy | default 0.0 |
float | $fz | default 0.0 |
Player | $player | default null |