|
Genisys
Genisys API 1.9.3
A server software for Minecraft: Pocket Edition with many features
|
Public Member Functions | |
| setBlockTempData (Vector3 $pos, $data=null) | |
| getBlockTempData (Vector3 $pos) | |
| setDimension (int $dimension) | |
| getDimension () | |
| getWeather () | |
| getTickRate () | |
| getTickRateTime () | |
| setTickRate (int $tickRate) | |
| initLevel () | |
| getWaterHeight () | |
| registerGenerator () | |
| unregisterGenerator () | |
| getBlockMetadata () | |
| getServer () | |
| getProvider () | |
| getId () | |
| isClosed () | |
| close () | |
| addSound (Sound $sound, array $players=null) | |
| addParticle (Particle $particle, array $players=null) | |
| getAutoSave () | |
| setAutoSave (bool $value) | |
| unload (bool $force=false) | |
| getChunkPlayers (int $chunkX, int $chunkZ) | |
| getChunkLoaders (int $chunkX, int $chunkZ) | |
| addChunkPacket (int $chunkX, int $chunkZ, DataPacket $packet) | |
| registerChunkLoader (ChunkLoader $loader, int $chunkX, int $chunkZ, bool $autoLoad=true) | |
| unregisterChunkLoader (ChunkLoader $loader, int $chunkX, int $chunkZ) | |
| checkTime () | |
| sendTime () | |
| doTick (int $currentTick) | |
| checkSleep () | |
| sendBlockExtraData (int $x, int $y, int $z, int $id, int $data, array $targets=null) | |
| sendBlocks (array $target, array $blocks, $flags=UpdateBlockPacket::FLAG_NONE, bool $optimizeRebuilds=false) | |
| clearCache (bool $full=false) | |
| clearChunkCache (int $chunkX, int $chunkZ) | |
| addRandomTickedBlock (int $id) | |
| removeRandomTickedBlock (int $id) | |
| __debugInfo () | |
| save (bool $force=false) | |
| saveChunks () | |
| updateAround (Vector3 $pos) | |
| scheduleUpdate (Vector3 $pos, int $delay) | |
| getCollisionBlocks (AxisAlignedBB $bb, bool $targetFirst=false) | |
| isFullBlock (Vector3 $pos) | |
| getCollisionCubes (Entity $entity, AxisAlignedBB $bb, bool $entities=true) | |
| getFullLight (Vector3 $pos) | |
| getFullBlock (int $x, int $y, int $z) | |
| getBlock (Vector3 $pos, $cached=true) | |
| updateAllLight (Vector3 $pos) | |
| updateBlockSkyLight (int $x, int $y, int $z) | |
| setBlock (Vector3 $pos, Block $block, bool $direct=false, bool $update=true) | |
| dropItem (Vector3 $source, Item $item, Vector3 $motion=null, int $delay=10) | |
| useBreakOn (Vector3 $vector, Item &$item=null, Player $player=null, bool $createParticles=false) | |
| useItemOn (Vector3 $vector, Item &$item, int $face, float $fx=0.0, float $fy=0.0, float $fz=0.0, Player $player=null) | |
| getEntity (int $entityId) | |
| getEntities () | |
| getCollidingEntities (AxisAlignedBB $bb, Entity $entity=null) | |
| getNearbyEntities (AxisAlignedBB $bb, Entity $entity=null) | |
| getNearbyExperienceOrb (AxisAlignedBB $bb) | |
| getTiles () | |
| getTileById (int $tileId) | |
| getPlayers () | |
| getLoaders () | |
| getTile (Vector3 $pos) | |
| getChunkEntities ($X, $Z) | |
| getChunkTiles ($X, $Z) | |
| getBlockIdAt (int $x, int $y, int $z) | |
| setBlockIdAt (int $x, int $y, int $z, int $id) | |
| getBlockExtraDataAt (int $x, int $y, int $z) | |
| setBlockExtraDataAt (int $x, int $y, int $z, int $id, int $data) | |
| getBlockDataAt (int $x, int $y, int $z) | |
| setBlockDataAt (int $x, int $y, int $z, int $data) | |
| getBlockSkyLightAt (int $x, int $y, int $z) | |
| setBlockSkyLightAt (int $x, int $y, int $z, int $level) | |
| getBlockLightAt (int $x, int $y, int $z) | |
| setBlockLightAt (int $x, int $y, int $z, int $level) | |
| getBiomeId (int $x, int $z) | |
| getHeightMap (int $x, int $z) | |
| setBiomeId (int $x, int $z, int $biomeId) | |
| setHeightMap (int $x, int $z, int $value) | |
| getChunks () | |
| getChunk (int $x, int $z, bool $create=false) | |
| generateChunkCallback (int $x, int $z, Chunk $chunk) | |
| setChunk (int $chunkX, int $chunkZ, Chunk $chunk=null, bool $unload=true) | |
| sendLighting (int $x, int $y, int $z, Player $p) | |
| spawnLightning (Vector3 $pos) | |
| spawnXPOrb (Vector3 $pos, int $exp=1) | |
| getHighestBlockAt (int $x, int $z) | |
| canBlockSeeSky (Vector3 $pos) | |
| isChunkLoaded (int $x, int $z) | |
| isChunkGenerated (int $x, int $z) | |
| isChunkPopulated (int $x, int $z) | |
| getSpawnLocation () | |
| setSpawnLocation (Vector3 $pos) | |
| requestChunk (int $x, int $z, Player $player) | |
| removeEntity (Entity $entity) | |
| addEntity (Entity $entity) | |
| addTile (Tile $tile) | |
| removeTile (Tile $tile) | |
| isChunkInUse (int $x, int $z) | |
| loadChunk (int $x, int $z, bool $generate=true) | |
| unloadChunkRequest (int $x, int $z, bool $safe=true) | |
| cancelUnloadChunkRequest (int $x, int $z) | |
| unloadChunk (int $x, int $z, bool $safe=true, bool $trySave=true) | |
| isSpawnChunk (int $X, int $Z) | |
| getSafeSpawn ($spawn=null) | |
| getTime () | |
| getName () | |
| getFolderName () | |
| setTime (int $time) | |
| stopTime () | |
| startTime () | |
| getSeed () | |
| setSeed (int $seed) | |
| populateChunk (int $x, int $z, bool $force=false) | |
| generateChunk (int $x, int $z, bool $force=false) | |
| regenerateChunk (int $x, int $z) | |
| doChunkGarbageCollection () | |
| unloadChunks (bool $force=false) | |
| setMetadata ($metadataKey, MetadataValue $metadataValue) | |
| getMetadata ($metadataKey) | |
| hasMetadata ($metadataKey) | |
| removeMetadata ($metadataKey, Plugin $plugin) | |
| addEntityMotion (int $chunkX, int $chunkZ, int $entityId, float $x, float $y, float $z) | |
| addEntityMovement (int $chunkX, int $chunkZ, int $entityId, float $x, float $y, float $z, float $yaw, float $pitch, $headYaw=null) | |
Public Member Functions inherited from ChunkManager | |
| updateBlockLight (int $x, int $y, int $z) | |
| getChunk (int $chunkX, int $chunkZ) | |
| setChunk (int $chunkX, int $chunkZ, Chunk $chunk=null) | |
Static Public Member Functions | |
| static | chunkHash (int $x, int $z) |
| static | blockHash (int $x, int $y, int $z) |
| static | getBlockXYZ ($hash, &$x, &$y, &$z) |
| static | getXZ ($hash, &$x, &$z) |
| static | generateChunkLoaderId (ChunkLoader $loader) |
| static | getChunkCacheFromData ($chunkX, $chunkZ, $payload) |
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 | ( | int | $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 | ( | ) |
| getBiomeId | ( | int | $x, |
| int | $z | ||
| ) |
| int | $x | |
| int | $z |
| getBlock | ( | Vector3 | $pos, |
$cached = true |
|||
| ) |
Gets the Block object on the Vector3 location
| Vector3 | $pos | |
| bool | $cached |
| getBlockDataAt | ( | int | $x, |
| int | $y, | ||
| int | $z | ||
| ) |
| getBlockExtraDataAt | ( | int | $x, |
| int | $y, | ||
| int | $z | ||
| ) |
Gets the raw block extra data
| int | $x | |
| int | $y | |
| int | $z |
| getBlockIdAt | ( | int | $x, |
| int | $y, | ||
| int | $z | ||
| ) |
| getBlockLightAt | ( | int | $x, |
| int | $y, | ||
| int | $z | ||
| ) |
Gets the raw block light level
| int | $x | |
| int | $y | |
| int | $z |
Implements ChunkManager.
| getBlockMetadata | ( | ) |
| getBlockSkyLightAt | ( | int | $x, |
| int | $y, | ||
| int | $z | ||
| ) |
Gets the raw block skylight level
| int | $x | |
| int | $y | |
| int | $z |
| getBlockTempData | ( | Vector3 | $pos | ) |
This method is internal use only. Do not use this in plugins
| Vector3 | $pos |
| getChunk | ( | int | $x, |
| int | $z, | ||
| bool | $create = false |
||
| ) |
Gets the Chunk object
| int | $x | |
| int | $z | |
| bool | $create | Whether to generate the chunk if it does not exist |
|
static |
| int | $chunkX | |
| int | $chunkZ | |
| string | $payload |
| getChunkEntities | ( | $X, | |
| $Z | |||
| ) |
Returns a list of the entities on a given chunk
| int | $X | |
| int | $Z |
| getChunkLoaders | ( | int | $chunkX, |
| int | $chunkZ | ||
| ) |
Gets the chunk loaders being used in a specific chunk
| int | $chunkX | |
| int | $chunkZ |
| getChunkPlayers | ( | int | $chunkX, |
| int | $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, |
| bool | $targetFirst = false |
||
| ) |
| AxisAlignedBB | $bb | |
| bool | $targetFirst |
| getCollisionCubes | ( | Entity | $entity, |
| AxisAlignedBB | $bb, | ||
| bool | $entities = true |
||
| ) |
| Entity | $entity | |
| AxisAlignedBB | $bb | |
| bool | $entities |
| getEntities | ( | ) |
Gets the list of all the entities in this level
| getEntity | ( | int | $entityId | ) |
| int | $entityId |
| getFolderName | ( | ) |
Returns the Level folder name
| getFullBlock | ( | int | $x, |
| int | $y, | ||
| int | $z | ||
| ) |
| $x | |
| $y | |
| $z |
| getHeightMap | ( | int | $x, |
| int | $z | ||
| ) |
| int | $x | |
| int | $z |
| getHighestBlockAt | ( | int | $x, |
| int | $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 | ( | ) |
| getTile | ( | Vector3 | $pos | ) |
Returns the Tile in a position, or null if not found
| Vector3 | $pos |
| getTileById | ( | int | $tileId | ) |
| $tileId |
| getTiles | ( | ) |
Returns a list of the Tile entities in this level
| getTime | ( | ) |
Gets the current time
| getWeather | ( | ) |
| hasMetadata | ( | $metadataKey | ) |
Tests to see whether the implementing object contains the given metadata value in its metadata store.
| string | $metadataKey |
Implements Metadatable.
| isChunkGenerated | ( | int | $x, |
| int | $z | ||
| ) |
| int | $x | |
| int | $z |
| isChunkInUse | ( | int | $x, |
| int | $z | ||
| ) |
| int | $x | |
| int | $z |
| isChunkLoaded | ( | int | $x, |
| int | $z | ||
| ) |
| int | $x | |
| int | $z |
| isChunkPopulated | ( | int | $x, |
| int | $z | ||
| ) |
| int | $x | |
| int | $z |
| isFullBlock | ( | Vector3 | $pos | ) |
| Vector3 | $pos |
| isSpawnChunk | ( | int | $X, |
| int | $Z | ||
| ) |
Returns whether the chunk at the specified coordinates is a spawn chunk
| int | $X | |
| int | $Z |
| loadChunk | ( | int | $x, |
| int | $z, | ||
| bool | $generate = true |
||
| ) |
| int | $x | |
| int | $z | |
| bool | $generate |
| removeEntity | ( | Entity | $entity | ) |
| 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 | ( | bool | $force = false | ) |
| bool | $force |
| scheduleUpdate | ( | Vector3 | $pos, |
| int | $delay | ||
| ) |
| Vector3 | $pos | |
| int | $delay |
| sendBlocks | ( | array | $target, |
| array | $blocks, | ||
$flags = UpdateBlockPacket::FLAG_NONE, |
|||
| bool | $optimizeRebuilds = false |
||
| ) |
| Player[] | $target | |
| Block[] | $blocks | |
| int | $flags | |
| bool | $optimizeRebuilds |
| sendLighting | ( | int | $x, |
| int | $y, | ||
| int | $z, | ||
| Player | $p | ||
| ) |
| sendTime | ( | ) |
WARNING: Do not use this, it's only for internal use. Changes to this function won't be recorded on the version.
| setAutoSave | ( | bool | $value | ) |
| bool | $value |
| setBiomeId | ( | int | $x, |
| int | $z, | ||
| int | $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 | ( | int | $x, |
| int | $y, | ||
| int | $z, | ||
| int | $data | ||
| ) |
| setBlockExtraDataAt | ( | int | $x, |
| int | $y, | ||
| int | $z, | ||
| int | $id, | ||
| int | $data | ||
| ) |
Sets the raw block metadata.
| int | $x | |
| int | $y | |
| int | $z | |
| int | $id | |
| int | $data |
| setBlockIdAt | ( | int | $x, |
| int | $y, | ||
| int | $z, | ||
| int | $id | ||
| ) |
| setBlockLightAt | ( | int | $x, |
| int | $y, | ||
| int | $z, | ||
| int | $level | ||
| ) |
| setBlockSkyLightAt | ( | int | $x, |
| int | $y, | ||
| int | $z, | ||
| int | $level | ||
| ) |
Sets the raw block skylight level.
| int | $x | |
| int | $y | |
| int | $z | |
| int | $level | 0-15 |
| setBlockTempData | ( | Vector3 | $pos, |
$data = null |
|||
| ) |
This method is internal use only. Do not use this in plugins
| Vector3 | $pos | |
| $data |
| setChunk | ( | int | $chunkX, |
| int | $chunkZ, | ||
| Chunk | $chunk = null, |
||
| bool | $unload = true |
||
| ) |
| int | $chunkX | |
| int | $chunkZ | |
| Chunk | $chunk | |
| bool | $unload |
| setHeightMap | ( | int | $x, |
| int | $z, | ||
| int | $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 | ( | int | $seed | ) |
Sets the seed for the level
| int | $seed |
| setSpawnLocation | ( | Vector3 | $pos | ) |
Sets the level spawn location
| Vector3 | $pos |
| setTime | ( | int | $time | ) |
Sets the current time on the level
| int | $time |
| spawnLightning | ( | Vector3 | $pos | ) |
Add a lightning
| Vector3 | $pos |
| spawnXPOrb | ( | Vector3 | $pos, |
| int | $exp = 1 |
||
| ) |
Add an experience orb
| Vector3 | $pos | |
| int | $exp |
| 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 | ( | bool | $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, | ||
| int | $face, | ||
| float | $fx = 0.0, |
||
| float | $fy = 0.0, |
||
| float | $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 |