5 #include "../BlockInfo.h"
29 const auto TopPos = a_PlacePosition.
addedY(1);
32 World.GetBlockTypeMeta(TopPos, TopType, TopMeta);
34 if (!
cBlockHandler::For(TopType).DoesIgnoreBuildCollision(
World, a_HeldItem, TopPos, TopMeta, a_ClickedBlockFace,
false))
unsigned char NIBBLETYPE
The datatype used by nibbledata (meta, light, skylight)
unsigned char BLOCKTYPE
The datatype used by blockdata.
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc.
Utilities to allow casting a cWorld to one of its interfaces without including World....
static const cBlockHandler & For(BLOCKTYPE a_BlockType)
cWorld * GetWorld(void) const
bool PlaceBlocks(std::initializer_list< sSetBlock > a_Blocks)
Calls the block placement hooks and places the blocks in the world.
virtual bool CommitPlacement(cPlayer &a_Player, const cItem &a_HeldItem, const Vector3i a_PlacePosition, const eBlockFace a_ClickedBlockFace, const Vector3i a_CursorPosition) const override
Performs the actual placement of this placeable item.
constexpr cItemHandler(int a_ItemType)
Vector3< T > addedY(T a_AddY) const
Returns a copy of this vector moved by the specified amount on the y axis.