APIDump: Updated the player block placement documentation.
The hooks now have fewer parameters but are called on all player-placed blocks (#1618).
This commit is contained in:
@@ -15,7 +15,11 @@ return
|
||||
Use the {{cPlayer}}:GetWorld() function to get the world to which the block belongs.</p>
|
||||
<p>
|
||||
See also the {{OnPlayerPlacedBlock|HOOK_PLAYER_PLACED_BLOCK}} hook for a similar hook called after
|
||||
the placement.
|
||||
the placement.</p>
|
||||
<p>
|
||||
If the client action results in multiple blocks being placed (such as a bed or a door), each separate
|
||||
block is reported through this hook and only if all of them succeed, all the blocks are placed. If
|
||||
any one of the calls are refused by the plugin, all the blocks are refused and reverted on the client.
|
||||
]],
|
||||
Params =
|
||||
{
|
||||
@@ -23,10 +27,6 @@ return
|
||||
{ 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 = "BlockFace", Type = "number", Notes = "Face of the existing block upon which the player is interacting. One of the BLOCK_FACE_ constants" },
|
||||
{ Name = "CursorX", Type = "number", Notes = "X-coord of the cursor within the block face (0 .. 15)" },
|
||||
{ Name = "CursorY", Type = "number", Notes = "Y-coord of the cursor within the block face (0 .. 15)" },
|
||||
{ Name = "CursorZ", Type = "number", Notes = "Z-coord of the cursor within the block face (0 .. 15)" },
|
||||
{ Name = "BlockType", Type = "BLOCKTYPE", Notes = "The block type of the block" },
|
||||
{ Name = "BlockMeta", Type = "NIBBLETYPE", Notes = "The block meta of the block" },
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user