summaryrefslogtreecommitdiffstats
path: root/Server/Plugins/APIDump/Classes/Projectiles.lua
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2016-09-13 09:43:02 +0200
committerGitHub <noreply@github.com>2016-09-13 09:43:02 +0200
commitca99e754ea430f500e79c5d929754c7e5946329b (patch)
tree5ea029a2a87d445f52ee80ca73c71e4bd37d3a0a /Server/Plugins/APIDump/Classes/Projectiles.lua
parentBindings: Fixed some function signatures comments. (diff)
parentCIBuild: Mark as failure on duplicate API docs. (diff)
downloadcuberite-ca99e754ea430f500e79c5d929754c7e5946329b.tar
cuberite-ca99e754ea430f500e79c5d929754c7e5946329b.tar.gz
cuberite-ca99e754ea430f500e79c5d929754c7e5946329b.tar.bz2
cuberite-ca99e754ea430f500e79c5d929754c7e5946329b.tar.lz
cuberite-ca99e754ea430f500e79c5d929754c7e5946329b.tar.xz
cuberite-ca99e754ea430f500e79c5d929754c7e5946329b.tar.zst
cuberite-ca99e754ea430f500e79c5d929754c7e5946329b.zip
Diffstat (limited to 'Server/Plugins/APIDump/Classes/Projectiles.lua')
-rw-r--r--Server/Plugins/APIDump/Classes/Projectiles.lua454
1 files changed, 361 insertions, 93 deletions
diff --git a/Server/Plugins/APIDump/Classes/Projectiles.lua b/Server/Plugins/APIDump/Classes/Projectiles.lua
index b94706f0f..b92f6d2a8 100644
--- a/Server/Plugins/APIDump/Classes/Projectiles.lua
+++ b/Server/Plugins/APIDump/Classes/Projectiles.lua
@@ -7,24 +7,115 @@ return
]],
Functions =
{
- CanPickup = { Params = "{{cPlayer|Player}}", Return = "bool", Notes = "Returns true if the specified player can pick the arrow when it's on the ground" },
- GetBlockHit = { Params = "", Returns = "{{Vector3i}}", Desc = "Gets the block arrow is in" },
- GetDamageCoeff = { Params = "", Return = "number", Notes = "Returns the damage coefficient stored within the arrow. The damage dealt by this arrow is multiplied by this coeff" },
- GetPickupState = { Params = "", Return = "PickupState", Notes = "Returns the pickup state (one of the psXXX constants, above)" },
- IsCritical = { Params = "", Return = "bool", Notes = "Returns true if the arrow should deal critical damage. Based on the bow charge when the arrow was shot." },
- SetDamageCoeff = { Params = "number", Return = "", Notes = "Sets the damage coefficient. The damage dealt by this arrow is multiplied by this coeff" },
- SetIsCritical = { Params = "bool", Return = "", Notes = "Sets the IsCritical flag on the arrow. Critical arrow deal additional damage" },
- SetPickupState = { Params = "PickupState", Return = "", Notes = "Sets the pickup state (one of the psXXX constants, above)" },
+ CanPickup =
+ {
+ Params =
+ {
+ {
+ Name = "Player",
+ Type = "cPlayer",
+ },
+ },
+ Returns =
+ {
+ {
+ Type = "boolean",
+ },
+ },
+ Notes = "Returns true if the specified player can pick the arrow when it's on the ground",
+ },
+ GetBlockHit =
+ {
+ Desc = "Gets the block arrow is in",
+ Returns =
+ {
+ {
+ Type = "Vector3i",
+ },
+ },
+ },
+ GetDamageCoeff =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the damage coefficient stored within the arrow. The damage dealt by this arrow is multiplied by this coeff",
+ },
+ GetPickupState =
+ {
+ Returns =
+ {
+ {
+ Type = "cArrowEntity#ePickupState",
+ },
+ },
+ Notes = "Returns the pickup state (one of the psXXX constants, above)",
+ },
+ IsCritical =
+ {
+ Returns =
+ {
+ {
+ Type = "boolean",
+ },
+ },
+ Notes = "Returns true if the arrow should deal critical damage. Based on the bow charge when the arrow was shot.",
+ },
+ SetDamageCoeff =
+ {
+ Params =
+ {
+ {
+ Name = "DamageCoeff",
+ Type = "number",
+ },
+ },
+ Notes = "Sets the damage coefficient. The damage dealt by this arrow is multiplied by this coeff",
+ },
+ SetIsCritical =
+ {
+ Params =
+ {
+ {
+ Name = "IsCritical",
+ Type = "boolean",
+ },
+ },
+ Notes = "Sets the IsCritical flag on the arrow. Critical arrow deal additional damage",
+ },
+ SetPickupState =
+ {
+ Params =
+ {
+ {
+ Name = "PickupState",
+ Type = "cArrowEntity#ePickupState",
+ },
+ },
+ Notes = "Sets the pickup state (one of the psXXX constants, above)",
+ },
},
Constants =
{
- psInCreative = { Notes = "The arrow can be picked up only by players in creative gamemode" },
- psInSurvivalOrCreative = { Notes = "The arrow can be picked up by players in survival or creative gamemode" },
- psNoPickup = { Notes = "The arrow cannot be picked up at all" },
+ psInCreative =
+ {
+ Notes = "The arrow can be picked up only by players in creative gamemode",
+ },
+ psInSurvivalOrCreative =
+ {
+ Notes = "The arrow can be picked up by players in survival or creative gamemode",
+ },
+ psNoPickup =
+ {
+ Notes = "The arrow cannot be picked up at all",
+ },
},
ConstantGroups =
{
- PickupState =
+ ePickupState =
{
Include = "ps.*",
TextBefore = [[
@@ -34,9 +125,7 @@ return
},
},
Inherits = "cProjectileEntity",
- }, -- cArrowEntity
-
-
+ },
cExpBottleEntity =
{
Desc = [[
@@ -44,146 +133,325 @@ return
]],
Functions =
{
+
},
Inherits = "cProjectileEntity",
- }, -- cExpBottleEntity
-
-
+ },
cFireChargeEntity =
{
Desc = [[
Represents a fire charge that has been shot by a Blaze or a {{cDispenserEntity|Dispenser}}. A subclass
of the {{cProjectileEntity}}.
]],
- Functions = {},
- Inherits = "cProjectileEntity",
- }, -- cFireChargeEntity
-
+ Functions =
+ {
+ },
+ Inherits = "cProjectileEntity",
+ },
cFireworkEntity =
{
Desc = [[
Represents a firework rocket.
]],
- Functions =
+ Functions =
+ {
+ GetItem =
{
- GetItem = { Params = "", Return = "{{cItem}}", Notes = "Returns the item that has been used to create the firework rocket. The item's m_FireworkItem member contains all the firework-related data." },
- GetTicksToExplosion = { Params = "", Return = "number", Notes = "Returns the number of ticks left until the firework explodes." },
- SetItem = { Params = "{{cItem}}", Return = "", Notes = "Sets a new item to be used for the firework." },
- SetTicksToExplosion = { Params = "NumTicks", Return = "", Notes = "Sets the number of ticks left until the firework explodes." },
+ Returns =
+ {
+ {
+ Type = "cItem",
+ },
+ },
+ Notes = "Returns the item that has been used to create the firework rocket. The item's m_FireworkItem member contains all the firework-related data.",
},
-
- Inherits = "cProjectileEntity",
- }, -- cFireworkEntity
-
-
- cFloater =
- {
- Desc = "",
- Functions = {},
+ GetTicksToExplosion =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the number of ticks left until the firework explodes.",
+ },
+ SetItem =
+ {
+ Params =
+ {
+ {
+ Name = "FireworkItem",
+ Type = "cItem",
+ },
+ },
+ Notes = "Sets a new item to be used for the firework.",
+ },
+ SetTicksToExplosion =
+ {
+ Params =
+ {
+ {
+ Name = "NumTicks",
+ Type = "number",
+ },
+ },
+ Notes = "Sets the number of ticks left until the firework explodes.",
+ },
+ },
Inherits = "cProjectileEntity",
- }, -- cFloater
-
-
+ },
cGhastFireballEntity =
{
Desc = "",
- Functions = {},
- Inherits = "cProjectileEntity",
- }, -- cGhastFireballEntity
-
+ Functions =
+ {
+ },
+ Inherits = "cProjectileEntity",
+ },
cProjectileEntity =
{
Desc = "Base class for all projectiles, such as arrows and fireballs.",
Functions =
{
- GetCreator = { Params = "", Return = "{{cEntity}} descendant", Notes = "Returns the entity who created this projectile. May return nil." },
- GetCreatorName = { Params = "", Return = "string", Notes = "Returns the name of the player that created the projectile. Will be empty for non-player creators" },
- GetCreatorUniqueID = { Params = "", Return = "number", Notes = "Returns the unique ID of the entity who created this projectile, or {{cEntity#NO_ID|cEntity.NO_ID}} if the projectile wasn't created by an entity." },
- GetMCAClassName = { Params = "", Return = "string", Notes = "Returns the string that identifies the projectile type (class name) in MCA files" },
- GetProjectileKind = { Params = "", Return = "ProjectileKind", Notes = "Returns the kind of this projectile (pkXXX constant)" },
- IsInGround = { Params = "", Return = "bool", Notes = "Returns true if this projectile has hit the ground." },
+ GetCreator =
+ {
+ Returns =
+ {
+ {
+ Type = "cEntity",
+ },
+ },
+ Notes = "Returns the entity who created this projectile. May return nil.",
+ },
+ GetCreatorName =
+ {
+ Returns =
+ {
+ {
+ Type = "string",
+ },
+ },
+ Notes = "Returns the name of the player that created the projectile. Will be empty for non-player creators",
+ },
+ GetCreatorUniqueID =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the unique ID of the entity who created this projectile, or {{cEntity#INVALID_ID|cEntity.INVALID_ID}} if the projectile wasn't created by an entity.",
+ },
+ GetMCAClassName =
+ {
+ Returns =
+ {
+ {
+ Type = "string",
+ },
+ },
+ Notes = "Returns the string that identifies the projectile type (class name) in MCA files",
+ },
+ GetProjectileKind =
+ {
+ Returns =
+ {
+ {
+ Type = "cProjectileEntity#eKind",
+ },
+ },
+ Notes = "Returns the kind of this projectile (pkXXX constant)",
+ },
+ IsInGround =
+ {
+ Returns =
+ {
+ {
+ Type = "boolean",
+ },
+ },
+ Notes = "Returns true if this projectile has hit the ground.",
+ },
},
Constants =
{
- pkArrow = { Notes = "The projectile is an {{cArrowEntity|arrow}}" },
- pkEgg = { Notes = "The projectile is a {{cThrownEggEntity|thrown egg}}" },
- pkEnderPearl = { Notes = "The projectile is a {{cThrownEnderPearlEntity|thrown enderpearl}}" },
- pkExpBottle = { Notes = "The projectile is a {{cExpBottleEntity|thrown exp bottle}}" },
- pkFireCharge = { Notes = "The projectile is a {{cFireChargeEntity|fire charge}}" },
- pkFirework = { Notes = "The projectile is a (flying) {{cFireworkEntity|firework}}" },
- pkFishingFloat = { Notes = "The projectile is a {{cFloater|fishing float}}" },
- pkGhastFireball = { Notes = "The projectile is a {{cGhastFireballEntity|ghast fireball}}" },
- pkSnowball = { Notes = "The projectile is a {{cThrownSnowballEntity|thrown snowball}}" },
- pkSplashPotion = { Notes = "The projectile is a {{cSplashPotionEntity|thrown splash potion}}" },
- pkWitherSkull = { Notes = "The projectile is a {{cWitherSkullEntity|wither skull}}" },
+ pkArrow =
+ {
+ Notes = "The projectile is an {{cArrowEntity|arrow}}",
+ },
+ pkEgg =
+ {
+ Notes = "The projectile is a {{cThrownEggEntity|thrown egg}}",
+ },
+ pkEnderPearl =
+ {
+ Notes = "The projectile is a {{cThrownEnderPearlEntity|thrown enderpearl}}",
+ },
+ pkExpBottle =
+ {
+ Notes = "The projectile is a {{cExpBottleEntity|thrown exp bottle}}",
+ },
+ pkFireCharge =
+ {
+ Notes = "The projectile is a {{cFireChargeEntity|fire charge}}",
+ },
+ pkFirework =
+ {
+ Notes = "The projectile is a (flying) {{cFireworkEntity|firework}}",
+ },
+ pkFishingFloat =
+ {
+ Notes = "The projectile is a {{cFloater|fishing float}}",
+ },
+ pkGhastFireball =
+ {
+ Notes = "The projectile is a {{cGhastFireballEntity|ghast fireball}}",
+ },
+ pkSnowball =
+ {
+ Notes = "The projectile is a {{cThrownSnowballEntity|thrown snowball}}",
+ },
+ pkSplashPotion =
+ {
+ Notes = "The projectile is a {{cSplashPotionEntity|thrown splash potion}}",
+ },
+ pkWitherSkull =
+ {
+ Notes = "The projectile is a {{cWitherSkullEntity|wither skull}}",
+ },
},
ConstantGroups =
{
- ProjectileKind =
+ eKind =
{
Include = "pk.*",
TextBefore = "The following constants are used to distinguish between the different projectile kinds:",
},
},
Inherits = "cEntity",
- }, -- cProjectileEntity
-
-
+ },
cSplashPotionEntity =
{
Desc = [[
Represents a thrown splash potion.
]],
- Functions =
+ Functions =
+ {
+ GetEntityEffect =
+ {
+ Returns =
+ {
+ {
+ Type = "cEntityEffect",
+ },
+ },
+ Notes = "Returns the entity effect in this potion",
+ },
+ GetEntityEffectType =
+ {
+ Returns =
+ {
+ {
+ Type = "cEntityEffect",
+ },
+ },
+ Notes = "Returns the effect type of this potion",
+ },
+ GetItem =
+ {
+ Returns =
+ {
+ {
+ Type = "cItem",
+ },
+ },
+ Notes = "Gets the potion item that was thrown.",
+ },
+ GetPotionColor =
+ {
+ Returns =
+ {
+ {
+ Type = "number",
+ },
+ },
+ Notes = "Returns the color index of the particles emitted by this potion",
+ },
+ SetEntityEffect =
{
- GetEntityEffect = { Params = "", Return = "{{cEntityEffect}}", Notes = "Returns the entity effect in this potion" },
- GetEntityEffectType = { Params = "", Return = "{{cEntityEffect|Entity effect type}}", Notes = "Returns the effect type of this potion" },
- GetPotionColor = { Params = "", Return = "number", Notes = "Returns the color index of the particles emitted by this potion" },
- GetItem = { Params = "", Return = "{{cItem}}", Notes = "Gets the potion item that was thrown." },
- SetEntityEffect = { Params = "{{cEntityEffect}}", Return = "", Notes = "Sets the entity effect for this potion" },
- SetEntityEffectType = { Params = "{{cEntityEffect|Entity effect type}}", Return = "", Notes = "Sets the effect type of this potion" },
- SetPotionColor = { Params = "number", Return = "", Notes = "Sets the color index of the particles for this potion" },
+ Params =
+ {
+ {
+ Name = "EntityEffect",
+ Type = "cEntityEffect",
+ },
+ },
+ Notes = "Sets the entity effect for this potion",
},
+ SetEntityEffectType =
+ {
+ Params =
+ {
+ {
+ Name = "EntityEffectType",
+ Type = "cEntityEffect#eType",
+ },
+ },
+ Notes = "Sets the effect type of this potion",
+ },
+ SetPotionColor =
+ {
+ Params =
+ {
+ {
+ Name = "PotionColor",
+ Type = "number",
+ },
+ },
+ Notes = "Sets the color index of the particles for this potion",
+ },
+ },
Inherits = "cProjectileEntity",
- }, -- cSplashPotionEntity
-
-
+ },
cThrownEggEntity =
{
Desc = [[
Represents a thrown egg.
]],
- Functions = {},
- Inherits = "cProjectileEntity",
- }, -- cThrownEggEntity
-
+ Functions =
+ {
+ },
+ Inherits = "cProjectileEntity",
+ },
cThrownEnderPearlEntity =
{
Desc = "Represents a thrown ender pearl.",
- Functions = {},
- Inherits = "cProjectileEntity",
- }, -- cThrownEnderPearlEntity
-
+ Functions =
+ {
+ },
+ Inherits = "cProjectileEntity",
+ },
cThrownSnowballEntity =
{
Desc = "Represents a thrown snowball.",
- Functions = {},
- Inherits = "cProjectileEntity",
- }, -- cThrownSnowballEntity
-
+ Functions =
+ {
+ },
+ Inherits = "cProjectileEntity",
+ },
cWitherSkullEntity =
{
Desc = "Represents a wither skull being shot.",
- Functions = {},
+ Functions =
+ {
+
+ },
Inherits = "cProjectileEntity",
- }, -- cWitherSkullEntity
+ },
}
-
-
-
-