6 #include "../Entities/Player.h"
25 const cItem & a_HeldItem,
31 if (a_ClickedBlockFace < 0)
@ E_META_SPAWN_EGG_CHICKEN
@ E_META_SPAWN_EGG_SILVERFISH
@ E_META_SPAWN_EGG_OCELOT
@ E_META_SPAWN_EGG_ZOMBIE
@ E_META_SPAWN_EGG_VILLAGER
@ E_META_SPAWN_EGG_CAVE_SPIDER
@ E_META_SPAWN_EGG_CREEPER
@ E_META_SPAWN_EGG_MOOSHROOM
@ E_META_SPAWN_EGG_ENDERMAN
@ E_META_SPAWN_EGG_ZOMBIE_VILLAGER
@ E_META_SPAWN_EGG_GUARDIAN
@ E_META_SPAWN_EGG_SPIDER
@ E_META_SPAWN_EGG_ENDERMITE
@ E_META_SPAWN_EGG_MAGMA_CUBE
@ E_META_SPAWN_EGG_WITHER_SKELETON
@ E_META_SPAWN_EGG_SKELETON
@ E_META_SPAWN_EGG_RABBIT
@ E_META_SPAWN_EGG_ZOMBIE_PIGMAN
void AddFaceDirection(int &a_BlockX, int &a_BlockY, int &a_BlockZ, eBlockFace a_BlockFace, bool a_bInverse)
Modifies the specified coords so that they point to the block adjacent to the one specified through i...
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc.
eMonsterType
Identifies individual monster type.
This interface is used to decouple block handlers from the cPluginManager dependency through cWorld.
static const UInt32 INVALID_ID
Special ID that is considered an "invalid value", signifying no entity.
bool IsGameModeCreative(void) const
Returns true if the player is in Creative mode, either explicitly, or by inheriting from current worl...
cInventory & GetInventory(void)
bool RemoveOneEquippedItem(void)
Removes one item out of the currently equipped item stack, returns true if successful,...
constexpr cItemHandler(int a_ItemType)
static eMonsterType ItemDamageToMonsterType(short a_ItemDamage)
Converts the Spawn egg item damage to the monster type to spawn.
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
Called when the player tries to use the item (right mouse button).
virtual UInt32 SpawnMob(double a_PosX, double a_PosY, double a_PosZ, eMonsterType a_MonsterType, bool a_Baby=false) override
Spawns a mob of the specified type.