5 #include "../Entities/ItemFrame.h" 6 #include "../Entities/Player.h" 26 int a_BlockX,
int a_BlockY,
int a_BlockZ,
eBlockFace a_BlockFace
41 auto ItemFrame = cpp14::make_unique<cItemFrame>(a_BlockFace,
Vector3i{a_BlockX, a_BlockY, a_BlockZ});
42 auto ItemFramePtr = ItemFrame.get();
43 if (!ItemFramePtr->Initialize(std::move(ItemFrame), *a_World))
BLOCKTYPE GetBlock(Vector3i a_BlockPos)
Returns the block type at the specified position.
unsigned char BLOCKTYPE
The datatype used by blockdata.
bool RemoveOneEquippedItem(void)
Removes one item out of the currently equipped item stack, returns true if successful, false if empty-handed.
This interface is used to decouple block handlers from the cPluginManager dependency through cWorld...
void AddFaceDirection(int &a_BlockX, int &a_BlockY, int &a_BlockZ, eBlockFace a_BlockFace, bool a_bInverse=false)
cItemItemFrameHandler(int a_ItemType)
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc...
bool IsGameModeCreative(void) const
Returns true if the player is in Creative mode, either explicitly, or by inheriting from current worl...
cInventory & GetInventory(void)
virtual bool OnItemUse(cWorld *a_World, cPlayer *a_Player, cBlockPluginInterface &a_PluginInterface, const cItem &a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace) override
Called when the player tries to use the item (right mouse button).