From 54d55b31ef9b17673212184ac523f6f2a964338d Mon Sep 17 00:00:00 2001 From: Howaner Date: Sun, 16 Mar 2014 16:12:16 +0100 Subject: Add documentation for new Block spread --- MCServer/Plugins/APIDump/Hooks/OnBlockSpread.lua | 40 ++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 MCServer/Plugins/APIDump/Hooks/OnBlockSpread.lua (limited to 'MCServer/Plugins/APIDump/Hooks') diff --git a/MCServer/Plugins/APIDump/Hooks/OnBlockSpread.lua b/MCServer/Plugins/APIDump/Hooks/OnBlockSpread.lua new file mode 100644 index 000000000..1dde55f36 --- /dev/null +++ b/MCServer/Plugins/APIDump/Hooks/OnBlockSpread.lua @@ -0,0 +1,40 @@ +return +{ + HOOK_BLOCK_SPREAD = + { + CalledWhen = "Called when a block spreads based on world conditions", + DefaultFnName = "OnBlockSpread", -- also used as pagename + Desc = [[ + This hook is called when a block spreads.

+

+ 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: + + + + + + + +
SourceNotes
esFireSpreadFire spreading
esGrassSpreadGrass spreading
esMushroomSpreadMushroom spreading
esMycelSpreadMycel spreading
esVineSpreadVine spreading

+ ]], + Params = + { + { Name = "World", Type = "{{cWorld}}", Notes = "The world in which the block resides" }, + { Name = "BlockX", Type = "number", Notes = "X-coord of the block" }, + { Name = "BlockY", Type = "number", Notes = "Y-coord of the block" }, + { Name = "BlockZ", Type = "number", Notes = "Z-coord of the block" }, + { Name = "Source", Type = "eSpreadSource", Notes = "Source of the spread. See the table above." }, + }, + Returns = [[ + If the function returns false or no value, the next plugin's callback is called, and finally + MCServer will process the spread. If the function + returns true, no other callback is called for this event and the spread will not occur. + ]], + }, -- HOOK_BLOCK_SPREAD +} + + + + -- cgit v1.2.3 From 9ac3e3405a92d458bf3d09d0ec0f60031d31823d Mon Sep 17 00:00:00 2001 From: Howaner Date: Sun, 16 Mar 2014 22:28:53 +0100 Subject: Change SpreadSource documentation --- MCServer/Plugins/APIDump/Hooks/OnBlockSpread.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'MCServer/Plugins/APIDump/Hooks') diff --git a/MCServer/Plugins/APIDump/Hooks/OnBlockSpread.lua b/MCServer/Plugins/APIDump/Hooks/OnBlockSpread.lua index 1dde55f36..a2f7d7ef9 100644 --- a/MCServer/Plugins/APIDump/Hooks/OnBlockSpread.lua +++ b/MCServer/Plugins/APIDump/Hooks/OnBlockSpread.lua @@ -12,11 +12,11 @@ return depends on the source kind: - - - - - + + + + +
SourceNotes
esFireSpreadFire spreading
esGrassSpreadGrass spreading
esMushroomSpreadMushroom spreading
esMycelSpreadMycel spreading
esVineSpreadVine spreading
ssFireSpreadFire spreading
ssGrassSpreadGrass spreading
ssMushroomSpreadMushroom spreading
ssMycelSpreadMycel spreading
ssVineSpreadVine spreading

]], Params = -- cgit v1.2.3 From 327b70e769bd3bb826320027a1b7d56f6e386a6b Mon Sep 17 00:00:00 2001 From: Howaner Date: Mon, 24 Mar 2014 20:01:57 +0100 Subject: Change documentation text --- MCServer/Plugins/APIDump/Hooks/OnBlockSpread.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'MCServer/Plugins/APIDump/Hooks') diff --git a/MCServer/Plugins/APIDump/Hooks/OnBlockSpread.lua b/MCServer/Plugins/APIDump/Hooks/OnBlockSpread.lua index a2f7d7ef9..ed0b5f46f 100644 --- a/MCServer/Plugins/APIDump/Hooks/OnBlockSpread.lua +++ b/MCServer/Plugins/APIDump/Hooks/OnBlockSpread.lua @@ -7,8 +7,8 @@ return Desc = [[ This hook is called when a block spreads.

- 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 + The spread carries with it the type of its source - whether it's a block spreads. + It also carries the identification of the actual source. The exact type of the identification depends on the source kind: -- cgit v1.2.3 From 379d403443e5ecf3e66cf151391f5a8c4bd4d5c6 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Sat, 29 Mar 2014 16:08:39 +0100 Subject: Documented both hooks. --- .../Plugins/APIDump/Hooks/OnProjectileHitBlock.lua | 24 +++++++++++++++++++++ .../APIDump/Hooks/OnProjectileHitEntity.lua | 25 ++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 MCServer/Plugins/APIDump/Hooks/OnProjectileHitBlock.lua create mode 100644 MCServer/Plugins/APIDump/Hooks/OnProjectileHitEntity.lua (limited to 'MCServer/Plugins/APIDump/Hooks') diff --git a/MCServer/Plugins/APIDump/Hooks/OnProjectileHitBlock.lua b/MCServer/Plugins/APIDump/Hooks/OnProjectileHitBlock.lua new file mode 100644 index 000000000..1588d420c --- /dev/null +++ b/MCServer/Plugins/APIDump/Hooks/OnProjectileHitBlock.lua @@ -0,0 +1,24 @@ +return +{ + HOOK_PROJECTILE_HIT_BLOCK = + { + CalledWhen = "A projectile hits a solid block.", + DefaultFnName = "OnProjectileHitBlock", -- also used as pagename + Desc = [[ + This hook is called when a {{cProjectileEntity|projectile}} hits a solid block.. + ]], + Params = + { + { Name = "ProjectileEntity", Type = "{{cProjectileEntity}}", Notes = "The projectile that hit an entity." }, + }, + Returns = [[ + If the function returns false or no value, the next plugin's callback is called. If the function + returns true, no other callback is called for this event and the projectile flies through block.. + ]], + }, -- HOOK_PROJECTILE_HIT_BLOCK +} + + + + + diff --git a/MCServer/Plugins/APIDump/Hooks/OnProjectileHitEntity.lua b/MCServer/Plugins/APIDump/Hooks/OnProjectileHitEntity.lua new file mode 100644 index 000000000..dd949fb46 --- /dev/null +++ b/MCServer/Plugins/APIDump/Hooks/OnProjectileHitEntity.lua @@ -0,0 +1,25 @@ +return +{ + HOOK_PROJECTILE_HIT_ENTITY = + { + CalledWhen = "A projectile hits another entity.", + DefaultFnName = "OnProjectileHitEntity", -- also used as pagename + Desc = [[ + This hook is called when a {{cProjectileEntity|projectile}} hits another entity. + ]], + Params = + { + { Name = "ProjectileEntity", Type = "{{cProjectileEntity}}", Notes = "The projectile that hit an entity." }, + { Name = "Entity", Type = "{{cEntity}}", Notes = "The entity wich was hit." }, + }, + Returns = [[ + If the function returns false or no value, the next plugin's callback is called. If the function + returns true, no other callback is called for this event and the projectile flies through the entity. + ]], + }, -- HOOK_PROJECTILE_HIT_ENTITY +} + + + + + -- cgit v1.2.3
SourceNotes