From dac97826f7d0c9b9135c1a08c4d5f16b61494bd1 Mon Sep 17 00:00:00 2001
From: Mattes D
Date: Wed, 26 Aug 2015 10:58:51 +0200
Subject: Renamed output directory to Server
---
Server/Plugins/APIDump/Hooks/OnExploding.lua | 50 ++++++++++++++++++++++++++++
1 file changed, 50 insertions(+)
create mode 100644 Server/Plugins/APIDump/Hooks/OnExploding.lua
(limited to 'Server/Plugins/APIDump/Hooks/OnExploding.lua')
diff --git a/Server/Plugins/APIDump/Hooks/OnExploding.lua b/Server/Plugins/APIDump/Hooks/OnExploding.lua
new file mode 100644
index 000000000..e21b41be0
--- /dev/null
+++ b/Server/Plugins/APIDump/Hooks/OnExploding.lua
@@ -0,0 +1,50 @@
+return
+{
+ HOOK_EXPLODING =
+ {
+ CalledWhen = "An explosion is about to be processed",
+ DefaultFnName = "OnExploding", -- also used as pagename
+ Desc = [[
+ This hook is called before an explosion has been processed in a world.
+
+ See also {{OnExploded|HOOK_EXPLODED}} for a similar hook called after the explosion.
+
+ The explosion carries with it the type of its source - whether it's a creeper exploding, or TNT,
+ etc. It also carries the identification of the actual source. The exact type of the identification
+ depends on the source kind:
+
+ Source | SourceData Type | Notes |
+ esPrimedTNT | {{cTNTEntity}} | An exploding primed TNT entity |
+ esCreeper | {{cCreeper}} | An exploding creeper or charged creeper |
+ esBed | {{Vector3i}} | A bed exploding in the Nether or in the End. The bed coords are given. |
+ esEnderCrystal | {{Vector3i}} | An ender crystal exploding upon hit. The block coords are given. |
+ esGhastFireball | {{cGhastFireballEntity}} | A ghast fireball hitting ground or an {{cEntity|entity}}. |
+ esWitherSkullBlack | TBD | A black wither skull hitting ground or an {{cEntity|entity}}. |
+ esWitherSkullBlue | TBD | A blue wither skull hitting ground or an {{cEntity|entity}}. |
+ esWitherBirth | TBD | A wither boss being created |
+ esOther | TBD | Any other previously unspecified type. |
+ esPlugin | object | An explosion created by a plugin. The plugin may specify any kind of data. |
+
+ ]],
+ Params =
+ {
+ { Name = "World", Type = "{{cWorld}}", Notes = "The world where the explosion happens" },
+ { Name = "ExplosionSize", Type = "number", Notes = "The relative explosion size" },
+ { Name = "CanCauseFire", Type = "bool", Notes = "True if the explosion will turn random air blocks to fire (such as a ghast fireball)" },
+ { Name = "X", Type = "number", Notes = "X-coord of the explosion center" },
+ { Name = "Y", Type = "number", Notes = "Y-coord of the explosion center" },
+ { Name = "Z", Type = "number", Notes = "Z-coord of the explosion center" },
+ { Name = "Source", Type = "eExplosionSource", Notes = "Source of the explosion. See the table above." },
+ { Name = "SourceData", Type = "varies", Notes = "Additional data for the source. The exact type varies by the source. See the table above." },
+ },
+ Returns = [[
+ If the function returns false or no value, the next plugin's callback is called, and finally
+ Cuberite will process the explosion - destroy blocks and push + hurt entities. If the function
+ returns true, no other callback is called for this event and the explosion will not occur.
+ ]],
+ }, -- HOOK_EXPLODING
+}
+
+
+
+
--
cgit v1.2.3