Метод |
Описание |
|
__construct ( Server $server, string $name, string $path, string $provider ) |
Init the default level data |
|
__debugInfo ( ) : array |
|
|
addChunkPacket ( integer $chunkX, integer $chunkZ, DataPacket $packet ) |
|
|
addEntity ( Entity $entity ) |
|
|
addEntityMotion ( integer $chunkX, integer $chunkZ, integer $entityId, float $x, float $y, float $z ) |
|
|
addEntityMovement ( integer $chunkX, integer $chunkZ, integer $entityId, float $x, float $y, float $z, float $yaw, float $pitch, $headYaw = null ) |
|
|
addParticle ( Particle $particle, array $players = null ) |
|
|
addPlayerMovement ( $chunkX, $chunkZ, $entityId, $x, $y, $z, $yaw, $pitch, $onGround, $headYaw = null ) |
|
|
addSound ( Sound $sound, array $players = null ) |
|
|
addTile ( Tile $tile ) |
|
|
blockHash ( integer $x, integer $y, integer $z ) |
|
|
canBlockSeeSky ( Vector3 $pos ) : boolean |
|
|
cancelUnloadChunkRequest ( integer $x, integer $z ) |
|
|
checkSleep ( ) |
|
|
checkTime ( ) |
WARNING: Do not use this, it's only for internal use. |
|
chunkBlockHash ( integer $x, integer $y, integer $z ) : integer |
|
|
chunkHash ( integer $x, integer $z ) : string |
Returns the chunk unique hash/key |
|
chunkRequestCallback ( $x, $z, $payload, $ordering = FullChunkDataPacket::ORDER_COLUMNS ) |
|
|
clearCache ( boolean $full = false ) |
|
|
clearChunkCache ( integer $chunkX, integer $chunkZ ) |
|
|
close ( ) |
|
|
doChunkGarbageCollection ( ) |
|
|
doTick ( integer $currentTick ) : boolean |
WARNING: Do not use this, it's only for internal use. |
|
dropItem ( Vector3 $source, Item $item, Vector3 $motion = null, integer $delay = 10 ) : null | Item |
|
|
generateChunk ( integer $x, integer $z, boolean $force = false ) |
|
|
generateChunkCallback ( integer $x, integer $z, pocketmine\level\format\FullChunk $chunk ) |
|
|
generateChunkLoaderId ( pocketmine\level\ChunkLoader $loader ) : integer |
|
|
getAutoSave ( ) : boolean |
|
|
getBiomeColor ( integer $x, integer $z ) : array |
|
|
getBiomeId ( integer $x, integer $z ) : integer |
|
|
getBlock ( Vector3 $pos, boolean $cached = true ) : Block |
Gets the Block object on the Vector3 location |
|
getBlockDataAt ( integer $x, integer $y, integer $z ) : integer |
Gets the raw block metadata |
|
getBlockExtraDataAt ( integer $x, integer $y, integer $z ) : integer |
Gets the raw block extra data |
|
getBlockIdAt ( integer $x, integer $y, integer $z ) : integer |
Gets the raw block id. |
|
getBlockLightAt ( integer $x, integer $y, integer $z ) : integer |
Gets the raw block light level |
|
getBlockMetadata ( ) : BlockMetadataStore |
|
|
getBlockSkyLightAt ( integer $x, integer $y, integer $z ) : integer |
Gets the raw block skylight level |
|
getBlockTempData ( Vector3 $pos ) : integer |
This method is internal use only. Do not use this in plugins |
|
getBlockXYZ ( $hash, &$x, &$y, &$z ) |
|
|
getChunk ( integer $x, integer $z, boolean $create = false ) : pocketmine\level\format\FullChunk | pocketmine\level\format\Chunk |
Gets the Chunk object |
|
getChunkEntities ( integer $X, integer $Z ) : array |
Returns a list of the entities on a given chunk |
|
getChunkLoaders ( integer $chunkX, integer $chunkZ ) : array |
Gets the chunk loaders being used in a specific chunk |
|
getChunkPlayers ( integer $chunkX, integer $chunkZ ) : array |
Gets the players being used in a specific chunk |
|
getChunkTiles ( integer $X, integer $Z ) : array |
Gives a list of the Tile entities on a given chunk |
|
getChunks ( ) : array |
|
|
getCollidingEntities ( AxisAlignedBB $bb, Entity $entity = null ) : array |
Returns the entities colliding the current one inside the AxisAlignedBB |
|
getCollisionBlocks ( AxisAlignedBB $bb, boolean $targetFirst = false ) : array |
|
|
getCollisionCubes ( Entity $entity, AxisAlignedBB $bb, boolean $entities = true ) : array |
|
|
getDimension ( ) : integer |
|
|
getEntities ( ) : array |
Gets the list of all the entities in this level |
|
getEntity ( integer $entityId ) : Entity |
|
|
getFolderName ( ) : string |
Returns the Level folder name |
|
getFullBlock ( integer $x, integer $y, integer $z ) : integer |
|
|
getFullLight ( Vector3 $pos ) : integer |
*
public function rayTraceBlocks(Vector3 $pos1, Vector3 $pos2, $flag = false, $flag1 = false, $flag2 = false){
if(!is_nan($pos1->x) and !is_nan($pos1->y) and !is_nan($pos1->z)){
if(!is_nan($pos2->x) and !is_nan($pos2->y) and !is_nan($pos2->z)){
$x1 = (int) $pos1->x;
$y1 = (int) $pos1->y;
$z1 = (int) $pos1->z;
$x2 = (int) $pos2->x;
$y2 = (int) $pos2->y;
$z2 = (int) $pos2->z; |
|
getHeightMap ( integer $x, integer $z ) : integer |
|
|
getHighestBlockAt ( integer $x, integer $z ) : integer |
Gets the highest block Y value at a specific $x and $z |
|
getId ( ) : integer |
Returns the unique level identifier |
|
getLoaders ( ) : array |
|
|
getMetadata ( $metadataKey ) |
|
|
getName ( ) : string |
Returns the Level name |
|
getNearbyEntities ( AxisAlignedBB $bb, Entity $entity = null ) : array |
Returns the entities near the current one inside the AxisAlignedBB |
|
getNearbyExperienceOrb ( AxisAlignedBB $bb ) : array |
|
|
getPlayers ( ) : array |
Returns a list of the players in this level |
|
getProvider ( ) : pocketmine\level\format\LevelProvider |
|
|
getSafeSpawn ( Vector3 $spawn = null ) : boolean | Position |
|
|
getSeed ( ) : integer | string |
Gets the level seed |
|
getServer ( ) : Server |
|
|
getSpawnLocation ( ) : Position |
Returns a Position pointing to the spawn |
|
getTickRate ( ) : integer |
|
|
getTickRateTime ( ) |
|
|
getTile ( Vector3 $pos ) : Tile |
Returns the Tile in a position, or null if not found |
|
getTileById ( integer $tileId ) : Tile |
|
|
getTiles ( ) : array |
Returns a list of the Tile entities in this level |
|
getTime ( ) : integer |
Gets the current time |
|
getWaterHeight ( ) : integer |
|
|
getWeather ( ) : Weather |
|
|
getXZ ( $hash, &$x, &$z ) |
|
|
hasMetadata ( $metadataKey ) |
|
|
initLevel ( ) |
|
|
isChunkGenerated ( integer $x, integer $z ) : boolean |
|
|
isChunkInUse ( integer $x, integer $z ) : boolean |
|
|
isChunkLoaded ( integer $x, integer $z ) : boolean |
|
|
isChunkPopulated ( integer $x, integer $z ) : boolean |
|
|
isFullBlock ( Vector3 $pos ) : boolean |
|
|
isSpawnChunk ( integer $X, integer $Z ) : boolean |
Returns true if the spawn is part of the spawn |
|
loadChunk ( integer $x, integer $z, boolean $generate = true ) : boolean |
|
|
populateChunk ( integer $x, integer $z, boolean $force = false ) : boolean |
|
|
regenerateChunk ( integer $x, integer $z ) |
|
|
registerChunkLoader ( pocketmine\level\ChunkLoader $loader, integer $chunkX, integer $chunkZ, boolean $autoLoad = true ) |
|
|
registerGenerator ( ) |
|
|
removeEntity ( Entity $entity ) |
Removes the entity from the level index |
|
removeMetadata ( $metadataKey, pocketmine\plugin\Plugin $plugin ) |
|
|
removeTile ( Tile $tile ) |
|
|
requestChunk ( integer $x, integer $z, Player $player ) |
|
|
save ( boolean $force = false ) : boolean |
|
|
saveChunks ( ) |
|
|
scheduleUpdate ( Vector3 $pos, integer $delay ) |
|
|
sendBlockExtraData ( integer $x, integer $y, integer $z, integer $id, integer $data, array $targets = null ) |
|
|
sendBlocks ( array $target, array $blocks, integer $flags = UpdateBlockPacket::FLAG_NONE, boolean $optimizeRebuilds = false ) |
|
|
sendLighting ( integer $x, integer $y, integer $z, Player $p ) |
Directly send a lightning to a player |
|
sendTime ( ) |
WARNING: Do not use this, it's only for internal use. |
|
setAutoSave ( boolean $value ) |
|
|
setBiomeColor ( integer $x, integer $z, integer $R, integer $G, integer $B ) |
|
|
setBiomeId ( integer $x, integer $z, integer $biomeId ) |
|
|
setBlock ( Vector3 $pos, Block $block, boolean $direct = false, boolean $update = true ) : boolean |
Sets on Vector3 the data from a Block object,
does block updates and puts the changes to the send queue. |
|
setBlockDataAt ( integer $x, integer $y, integer $z, integer $data ) |
Sets the raw block metadata. |
|
setBlockExtraDataAt ( integer $x, integer $y, integer $z, integer $id, integer $data ) |
Sets the raw block metadata. |
|
setBlockIdAt ( integer $x, integer $y, integer $z, integer $id ) |
Sets the raw block id. |
|
setBlockLightAt ( integer $x, integer $y, integer $z, integer $level ) |
Sets the raw block light level. |
|
setBlockSkyLightAt ( integer $x, integer $y, integer $z, integer $level ) |
Sets the raw block skylight level. |
|
setBlockTempData ( Vector3 $pos, $data = null ) |
This method is internal use only. Do not use this in plugins |
|
setChunk ( integer $chunkX, integer $chunkZ, pocketmine\level\format\FullChunk $chunk = null, boolean $unload = true ) |
|
|
setDimension ( integer $dimension ) |
|
|
setHeightMap ( integer $x, integer $z, integer $value ) |
|
|
setMetadata ( $metadataKey, MetadataValue $metadataValue ) |
|
|
setSeed ( integer $seed ) |
Sets the seed for the level |
|
setSpawnLocation ( Vector3 $pos ) |
Sets the level spawn location |
|
setTickRate ( integer $tickRate ) |
|
|
setTime ( integer $time ) |
Sets the current time on the level |
|
spawnLightning ( Vector3 $pos ) : Lightning |
Add a lightning |
|
spawnXPOrb ( Vector3 $pos, integer $exp = 1 ) : boolean | XPOrb |
Add an experience orb |
|
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 ( boolean $force = false ) : boolean |
Unloads the current level from memory safely |
|
unloadChunk ( integer $x, integer $z, boolean $safe = true, boolean $trySave = true ) : boolean |
|
|
unloadChunkRequest ( integer $x, integer $z, boolean $safe = true ) : boolean |
|
|
unloadChunks ( boolean $force = false ) |
|
|
unregisterChunkLoader ( pocketmine\level\ChunkLoader $loader, integer $chunkX, integer $chunkZ ) |
|
|
unregisterGenerator ( ) |
|
|
updateAllLight ( Vector3 $pos ) |
|
|
updateAround ( Vector3 $pos ) |
|
|
updateBlockLight ( integer $x, integer $y, integer $z ) |
|
|
updateBlockSkyLight ( integer $x, integer $y, integer $z ) |
|
|
useBreakOn ( Vector3 $vector, Item &$item = null, Player $player = null, boolean $createParticles = false ) : boolean |
Tries to break a block using a item, including Player time checks if available
It'll try to lower the durability if Item is a tool, and set it to Air if broken. |
|
useItemOn ( Vector3 $vector, Item &$item, integer $face, float $fx, float $fy, float $fz, Player $player = null ) : boolean |
Uses a item on a position and face, placing it or activating the block |
|