29 const cItem & a_HeldItem,
@ E_ITEM_DIAMOND_CHESTPLATE
@ E_ITEM_DIAMOND_LEGGINGS
@ E_ITEM_CHAIN_CHESTPLATE
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc.
void LOGWARNING(std::string_view a_Format, const Args &... args)
bool IsHelmet(short a_ItemType)
bool IsLeggings(short a_ItemType)
bool IsChestPlate(short a_ItemType)
bool IsBoots(short a_ItemType)
This interface is used to decouple block handlers from the cPluginManager dependency through cWorld.
cInventory & GetInventory(void)
const cItem & GetArmorSlot(int a_ArmorSlotNum) const
Returns current item in a_ArmorSlotNum in armor slots.
void SetArmorSlot(int a_ArmorSlotNum, const cItem &a_Item)
Puts a_Item item in a_ArmorSlotNum slot number in armor slots.
bool RemoveOneEquippedItem(void)
Removes one item out of the currently equipped item stack, returns true if successful,...
bool IsEmpty(void) const
Returns true if the item represents an empty stack - either the type is invalid, or count is zero.
cItem CopyOne(void) const
Returns a copy of this item with m_ItemCount set to 1.
virtual bool CanRepairWithRawMaterial(short a_ItemType) const override
Can the anvil repair this item, when a_Item is the second input?
virtual bool OnItemUse(cWorld *a_World, cPlayer *a_Player, cBlockPluginInterface &a_PluginInterface, const cItem &a_HeldItem, const Vector3i a_ClickedBlockPos, eBlockFace a_ClickedBlockFace) const override
Move the armor to the armor slot of the player's inventory.
constexpr cItemHandler(int a_ItemType)