|
API
Functions and classes available in the Lua API
|
#include <0013.h>
Public Types | |
| enum | eDimension { dimNether = -1, dimOverworld = 0, dimEnd = 1 } |
Public Member Functions | |
| void | CastThunderbolt (int a_BlockX, int a_BlockY, int a_BlockZ) |
| Casts a thunderbolt at the specified coords. | |
| void | ChangeWeather (void) |
| Forces a weather change in the next game tick. | |
| bool | DigBlock (int a_X, int a_Y, int a_Z) |
| void | FastSetBlock (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) |
| void | FastSetBlock (const Vector3i &a_Pos, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) |
| void | GenerateChunk (int a_ChunkX, int a_ChunkZ) |
| int | GetBiomeAt (int a_BlockX, int a_BlockZ) |
| BLOCKTYPE | GetBlock (int a_BlockX, int a_BlockY, int a_BlockZ) |
| BLOCKTYPE | GetBlock (const Vector3i &a_Pos) |
| NIBBLETYPE | GetBlockBlockLight (int a_BlockX, int a_BlockY, int a_BlockZ) |
| bool | GetBlockInfo (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_Meta, NIBBLETYPE &a_SkyLight, NIBBLETYPE &a_BlockLight) |
| NIBBLETYPE | GetBlockMeta (int a_BlockX, int a_BlockY, int a_BlockZ) |
| NIBBLETYPE | GetBlockMeta (const Vector3i &a_Pos) |
| NIBBLETYPE | GetBlockSkyLight (int a_BlockX, int a_BlockY, int a_BlockZ) |
| bool | GetBlockTypeMeta (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE &a_BlockType, NIBBLETYPE &a_BlockMeta) |
| eDimension | GetDimension (void) const |
| eGameMode | GetGameMode (void) const |
| int | GetGeneratorQueueLength (void) |
| int | GetHeight (int a_BlockX, int a_BlockZ) |
| Returns the world height at the specified coords; waits for the chunk to get loaded / generated. | |
| int | GetLightingQueueLength (void) |
| int | GetMaxCactusHeight (void) const |
| unsigned int | GetMaxPlayers (void) const |
| int | GetMaxSugarcaneHeight (void) const |
| const AString & | GetName (void) const |
| int | GetNumChunks () const |
| unsigned int | GetNumPlayers () |
| bool | GetSignLines (int a_BlockX, int a_BlockY, int a_BlockZ, AString &a_Line1, AString &a_Line2, AString &a_Line3, AString &a_Line4) |
| double | GetSpawnX (void) const |
| double | GetSpawnY (void) const |
| double | GetSpawnZ (void) const |
| int | GetStorageLoadQueueLength (void) |
| int | GetStorageSaveQueueLength (void) |
| Int64 | GetTimeOfDay (void) const |
| eWeather | GetWeather (void) const |
| Returns the current weather. | |
| Int64 | GetWorldAge (void) const |
| void | GrowCactus (int a_BlockX, int a_BlockY, int a_BlockZ, int a_NumBlocksToGrow) |
| void | GrowMelonPumpkin (int a_BlockX, int a_BlockY, int a_BlockZ, char a_BlockType) |
| bool | GrowRipePlant (int a_BlockX, int a_BlockY, int a_BlockZ, bool a_IsByBonemeal=false) |
| void | GrowSugarcane (int a_BlockX, int a_BlockY, int a_BlockZ, int a_NumBlocksToGrow) |
| void | GrowTree (int a_BlockX, int a_BlockY, int a_BlockZ) |
| void | GrowTreeByBiome (int a_BlockX, int a_BlockY, int a_BlockZ) |
| void | GrowTreeFromSapling (int a_BlockX, int a_BlockY, int a_BlockZ, char a_SaplingMeta) |
| bool | IsBlockDirectlyWatered (int a_BlockX, int a_BlockY, int a_BlockZ) |
| bool | IsDeepSnowEnabled (void) const |
| bool | IsPVPEnabled (void) const |
| void | QueueBlockForTick (int a_BlockX, int a_BlockY, int a_BlockZ, float a_TimeToWait) |
| void | RegenerateChunk (int a_ChunkX, int a_ChunkZ) |
| void | SaveAllChunks (void) |
| void | SendBlockTo (int a_X, int a_Y, int a_Z, cPlayer *a_Player) |
| void | SetBlock (int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta) |
| void | SetBlockMeta (int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_MetaData) |
| void | SetBlockMeta (const Vector3i &a_Pos, NIBBLETYPE a_MetaData) |
| void | SetMaxPlayers (int iMax) |
| void | SetNextBlockTick (int a_BlockX, int a_BlockY, int a_BlockZ) |
| void | SetTimeOfDay (Int64 a_TimeOfDay) |
| void | SetWeather (eWeather a_NewWeather) |
| Sets the specified weather; resets weather interval; asks and notifies plugins of the change. | |
| void | SetWorldTime (Int64 a_TimeOfDay) |
| void | SpawnItemPickups (const cItems &a_Pickups, double a_BlockX, double a_BlockY, double a_BlockZ, double a_FlyAwaySpeed=1.0) |
| Spawns item pickups for each item in the list. May compress pickups if too many entities: | |
| void | SpawnItemPickups (const cItems &a_Pickups, double a_BlockX, double a_BlockY, double a_BlockZ, double a_SpeedX, double a_SpeedY, double a_SpeedZ) |
| Spawns item pickups for each item in the list. May compress pickups if too many entities. All pickups get the speed specified: | |
| int | SpawnMob (double a_PosX, double a_PosY, double a_PosZ, int a_EntityType) |
| void | UnloadUnusedChunks (void) |
| void | UpdateSign (int a_X, int a_Y, int a_Z, const AString &a_Line1, const AString &a_Line2, const AString &a_Line3, const AString &a_Line4, cPlayer *a_Player=NULL) |
Static Public Member Functions | |
| static const char * | GetClassStatic (void) |
| static float | GetTime (void) |
| Return time in seconds. | |
| enum cWorld::eDimension |
| void cWorld::CastThunderbolt | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ | ||
| ) |
Casts a thunderbolt at the specified coords.
| void cWorld::ChangeWeather | ( | void | ) |
Forces a weather change in the next game tick.
| bool cWorld::DigBlock | ( | int | a_X, |
| int | a_Y, | ||
| int | a_Z | ||
| ) |
| void cWorld::FastSetBlock | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ, | ||
| BLOCKTYPE | a_BlockType, | ||
| NIBBLETYPE | a_BlockMeta | ||
| ) |
|
inline |
| void cWorld::GenerateChunk | ( | int | a_ChunkX, |
| int | a_ChunkZ | ||
| ) |
| int cWorld::GetBiomeAt | ( | int | a_BlockX, |
| int | a_BlockZ | ||
| ) |
| BLOCKTYPE cWorld::GetBlock | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ | ||
| ) |
|
inline |
| NIBBLETYPE cWorld::GetBlockBlockLight | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ | ||
| ) |
| bool cWorld::GetBlockInfo | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ, | ||
| BLOCKTYPE & | a_BlockType, | ||
| NIBBLETYPE & | a_Meta, | ||
| NIBBLETYPE & | a_SkyLight, | ||
| NIBBLETYPE & | a_BlockLight | ||
| ) |
| NIBBLETYPE cWorld::GetBlockMeta | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ | ||
| ) |
|
inline |
| NIBBLETYPE cWorld::GetBlockSkyLight | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ | ||
| ) |
| bool cWorld::GetBlockTypeMeta | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ, | ||
| BLOCKTYPE & | a_BlockType, | ||
| NIBBLETYPE & | a_BlockMeta | ||
| ) |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
| int cWorld::GetHeight | ( | int | a_BlockX, |
| int | a_BlockZ | ||
| ) |
Returns the world height at the specified coords; waits for the chunk to get loaded / generated.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| int cWorld::GetNumChunks | ( | ) | const |
| unsigned int cWorld::GetNumPlayers | ( | ) |
| bool cWorld::GetSignLines | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ, | ||
| AString & | a_Line1, | ||
| AString & | a_Line2, | ||
| AString & | a_Line3, | ||
| AString & | a_Line4 | ||
| ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
Return time in seconds.
|
inline |
|
inline |
Returns the current weather.
|
inline |
| void cWorld::GrowCactus | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ, | ||
| int | a_NumBlocksToGrow | ||
| ) |
| void cWorld::GrowMelonPumpkin | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ, | ||
| char | a_BlockType | ||
| ) |
| bool cWorld::GrowRipePlant | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ, | ||
| bool | a_IsByBonemeal = false |
||
| ) |
| void cWorld::GrowSugarcane | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ, | ||
| int | a_NumBlocksToGrow | ||
| ) |
| void cWorld::GrowTree | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ | ||
| ) |
| void cWorld::GrowTreeByBiome | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ | ||
| ) |
| void cWorld::GrowTreeFromSapling | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ, | ||
| char | a_SaplingMeta | ||
| ) |
| bool cWorld::IsBlockDirectlyWatered | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ | ||
| ) |
|
inline |
|
inline |
| void cWorld::QueueBlockForTick | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ, | ||
| float | a_TimeToWait | ||
| ) |
| void cWorld::RegenerateChunk | ( | int | a_ChunkX, |
| int | a_ChunkZ | ||
| ) |
| void cWorld::SaveAllChunks | ( | void | ) |
| void cWorld::SendBlockTo | ( | int | a_X, |
| int | a_Y, | ||
| int | a_Z, | ||
| cPlayer * | a_Player | ||
| ) |
| void cWorld::SetBlock | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ, | ||
| BLOCKTYPE | a_BlockType, | ||
| NIBBLETYPE | a_BlockMeta | ||
| ) |
| void cWorld::SetBlockMeta | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ, | ||
| NIBBLETYPE | a_MetaData | ||
| ) |
|
inline |
| void cWorld::SetMaxPlayers | ( | int | iMax | ) |
| void cWorld::SetNextBlockTick | ( | int | a_BlockX, |
| int | a_BlockY, | ||
| int | a_BlockZ | ||
| ) |
|
inline |
| void cWorld::SetWeather | ( | eWeather | a_NewWeather | ) |
Sets the specified weather; resets weather interval; asks and notifies plugins of the change.
|
inline |
| void cWorld::SpawnItemPickups | ( | const cItems & | a_Pickups, |
| double | a_BlockX, | ||
| double | a_BlockY, | ||
| double | a_BlockZ, | ||
| double | a_FlyAwaySpeed = 1.0 |
||
| ) |
Spawns item pickups for each item in the list. May compress pickups if too many entities:
| void cWorld::SpawnItemPickups | ( | const cItems & | a_Pickups, |
| double | a_BlockX, | ||
| double | a_BlockY, | ||
| double | a_BlockZ, | ||
| double | a_SpeedX, | ||
| double | a_SpeedY, | ||
| double | a_SpeedZ | ||
| ) |
Spawns item pickups for each item in the list. May compress pickups if too many entities. All pickups get the speed specified:
| int cWorld::SpawnMob | ( | double | a_PosX, |
| double | a_PosY, | ||
| double | a_PosZ, | ||
| int | a_EntityType | ||
| ) |
| void cWorld::UnloadUnusedChunks | ( | void | ) |
| void cWorld::UpdateSign | ( | int | a_X, |
| int | a_Y, | ||
| int | a_Z, | ||
| const AString & | a_Line1, | ||
| const AString & | a_Line2, | ||
| const AString & | a_Line3, | ||
| const AString & | a_Line4, | ||
| cPlayer * | a_Player = NULL |
||
| ) |
1.8.1.2