Merge branch 'master' into saplingsandleaves
Conflicts: src/Bindings/DeprecatedBindings.cpp src/Blocks/BlockSapling.h
This commit is contained in:
@@ -30,14 +30,14 @@ public:
|
||||
/// Note that the coords are chunk-relative!
|
||||
virtual void OnUpdate(cChunkInterface & cChunkInterface, cWorldInterface & a_WorldInterface, cBlockPluginInterface & a_BlockPluginInterface, cChunk & a_Chunk, int a_RelX, int a_RelY, int a_RelZ);
|
||||
|
||||
/** Called before a block is placed into a world.
|
||||
/** Called before a block is placed into a world.
|
||||
The handler should return true to allow placement, false to refuse.
|
||||
Also, the handler should set a_BlockType and a_BlockMeta to correct values for the newly placed block.
|
||||
Called by cItemHandler::GetPlacementBlockTypeMeta() if the item is a block
|
||||
*/
|
||||
virtual bool GetPlacementBlockTypeMeta(
|
||||
cChunkInterface & a_ChunkInterface, cPlayer * a_Player,
|
||||
int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
|
||||
int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
|
||||
int a_CursorX, int a_CursorY, int a_CursorZ,
|
||||
BLOCKTYPE & a_BlockType, NIBBLETYPE & a_BlockMeta
|
||||
);
|
||||
@@ -47,8 +47,8 @@ public:
|
||||
|
||||
/// Called by cClientHandle::HandlePlaceBlock() after the player has placed a new block. Called after OnPlaced().
|
||||
virtual void OnPlacedByPlayer(
|
||||
cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player,
|
||||
int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
|
||||
cChunkInterface & a_ChunkInterface, cWorldInterface & a_WorldInterface, cPlayer * a_Player,
|
||||
int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace,
|
||||
int a_CursorX, int a_CursorY, int a_CursorZ,
|
||||
BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta
|
||||
);
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
virtual bool CanDirtGrowGrass(NIBBLETYPE a_Meta);
|
||||
|
||||
/** Checks if the block can be placed at this point.
|
||||
Default: CanBeAt(...)
|
||||
Default: CanBeAt(...)
|
||||
NOTE: This call doesn't actually place the block
|
||||
*/
|
||||
// virtual bool CanBePlacedAt(cWorld * a_World, int a_BlockX, int a_BlockY, int a_BlockZ, char a_Dir);
|
||||
@@ -101,27 +101,27 @@ public:
|
||||
/// Called to check whether this block supports a rclk action. If it returns true, OnUse() is called
|
||||
virtual bool IsUseable(void);
|
||||
|
||||
/** Indicates whether the client will click through this block.
|
||||
/** Indicates whether the client will click through this block.
|
||||
For example digging a fire will hit the block below the fire so fire is clicked through
|
||||
*/
|
||||
virtual bool IsClickedThrough(void);
|
||||
|
||||
/** Checks if the player can build "inside" this block.
|
||||
/** Checks if the player can build "inside" this block.
|
||||
For example blocks placed "on" snow will be placed at the same position. So: Snow ignores Build collision
|
||||
*/
|
||||
virtual bool DoesIgnoreBuildCollision(void);
|
||||
|
||||
/// <summary>Similar to DoesIgnoreBuildCollision(void), but is used for cases where block meta/player item-in-hand is needed to determine collision (thin snow)</summary>
|
||||
virtual bool DoesIgnoreBuildCollision(cPlayer *, NIBBLETYPE a_Meta)
|
||||
{
|
||||
virtual bool DoesIgnoreBuildCollision(cPlayer *, NIBBLETYPE a_Meta)
|
||||
{
|
||||
UNUSED(a_Meta);
|
||||
return DoesIgnoreBuildCollision();
|
||||
return DoesIgnoreBuildCollision();
|
||||
}
|
||||
|
||||
/// <summary>Returns if this block drops if it gets destroyed by an unsuitable situation. Default: true</summary>
|
||||
virtual bool DoesDropOnUnsuitable(void);
|
||||
|
||||
/** Called when one of the neighbors gets set; equivalent to MC block update.
|
||||
/** Called when one of the neighbors gets set; equivalent to MC block update.
|
||||
By default drops if position no more suitable (CanBeAt(), DoesDropOnUnsuitable(), Drop()),
|
||||
and wakes up all simulators on the block.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user