summaryrefslogtreecommitdiffstats
path: root/MCServer/Plugins/APIDump/Classes/Projectiles.lua
blob: cc6182b6ed7a7e256fbd224f6e611cfcfdd97eca (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
return
{
	cArrowEntity =
	{
		Desc = [[
			Represents the arrow when it is shot from the bow. A subclass of the {{cProjectileEntity}}.
		]],
		Functions =
		{
			CanPickup      = { Params = "{{cPlayer|Player}}", Return = "bool", Notes = "Returns true if the specified player can pick the arrow when it's on the ground" },
			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)" },
		},
		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" },
		},
		ConstantGroups =
		{
			PickupState =
			{
				Include = "ps.*",
				TextBefore = [[
					The following constants are used to signalize whether the arrow, once it lands, can be picked by
					players:
				]],
			},
		},
		Inherits = "cProjectileEntity",
	},  -- cArrowEntity

	cExpBottleEntity =
	{
		Desc = "",
		Functions = {},
		Inherits = "cProjectileEntity",
	},  -- cExpBottleEntity

	cFireChargeEntity =
	{
		Desc = "",
		Functions = {},
		Inherits = "cProjectileEntity",
	},  -- cFireChargeEntity
	
	cFireworkEntity =
	{
		Desc = "",
		Functions = {},
		Inherits = "cProjectileEntity",
	},  -- cFireworkEntity

	cFloater =
	{
		Desc = "",
		Functions = {},
		Inherits = "cProjectileEntity",
	},  -- cFloater

	cGhastFireballEntity =
	{
		Desc = "",
		Functions = {},
		Inherits = "cProjectileEntity",
	},  -- cGhastFireballEntity

	cProjectileEntity =
	{
		Desc = "",
		Functions =
		{
			GetCreator = { Params = "", Return = "{{cEntity}} descendant", Notes = "Returns the entity who created this projectile. May return nil." },
			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." },
		},
		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}}" },
		},
		ConstantGroups =
		{
			ProjectileKind =
			{
				Include = "pk.*",
				TextBefore = "The following constants are used to distinguish between the different projectile kinds:",
			},
		},
		Inherits = "cEntity",
	},  -- cProjectileEntity

	cSplashPotionEntity =
	{
		Desc = "",
		Functions = {},
		Inherits = "cProjectileEntity",
	},  -- cSplashPotionEntity

	cThrownEggEntity =
	{
		Desc = "",
		Functions = {},
		Inherits = "cProjectileEntity",
	},  -- cThrownEggEntity

	cThrownEnderPearlEntity =
	{
		Desc = "",
		Functions = {},
		Inherits = "cProjectileEntity",
	},  -- cThrownEnderPearlEntity
	
	cThrownSnowballEntity =
	{
		Desc = "",
		Functions = {},
		Inherits = "cProjectileEntity",
	},  -- cThrownSnowballEntity

	cWitherSkullEntity =
	{
		Desc = "",
		Functions = {},
		Inherits = "cProjectileEntity",
	},  -- cWitherSkullEntity
}