12 switch (a_ClickAction)
219 for (
size_t i = 0; i <
ARRAYCOUNT(DimensionMap); i++)
223 return DimensionMap[i].m_Dimension;
228 LOGWARNING(
"Unknown dimension: \"%s\". Setting to Overworld", a_DimensionString.c_str());
250 for (
size_t i = 0; i <
ARRAYCOUNT(DimensionMap); i++)
252 if (DimensionMap[i].m_Dimension == a_Dimension)
254 return DimensionMap[i].m_String;
259 LOGWARNING(
"Unknown dimension: \"%i\". Setting to Overworld",
static_cast<int>(a_Dimension));
270 switch (a_DamageType)
272 case dtAdmin:
return "dtAdmin";
362 for (
size_t i = 0; i <
ARRAYCOUNT(DamageTypeMap); i++)
366 return DamageTypeMap[i].m_DamageType;
380 LOGWARNING(
"AddFaceDirection with X/Y/Z parameters is deprecated, use the vector version");
382 const auto Offset =
AddFaceDirection({ a_BlockX, a_BlockY, a_BlockZ }, a_BlockFace, a_bInverse);
394 const int Offset = a_InvertDirection ? -1 : 1;
@ E_BLOCK_MAX_TYPE_ID
Maximum BlockType number used.
@ E_ITEM_MINECART_WITH_TNT
@ E_ITEM_MAX_CONSECUTIVE_TYPE_ID
Maximum consecutive ItemType number used.
@ E_ITEM_IRON_HORSE_ARMOR
@ E_ITEM_GOLD_HORSE_ARMOR
@ E_ITEM_DIAMOND_CHESTPLATE
@ E_ITEM_MINECART_WITH_HOPPER
@ E_ITEM_LAST_DISC
Maximum disc itemtype number used.
@ E_ITEM_DIAMOND_HORSE_ARMOR
@ E_ITEM_DIAMOND_LEGGINGS
@ E_ITEM_FURNACE_MINECART
@ E_ITEM_CHAIN_CHESTPLATE
bool IsValidBlock(int a_BlockType)
Returns true if the specified block type is valid (known).
eBlockFace ReverseBlockFace(eBlockFace a_BlockFace)
Returns a blockface opposite to the one specified.
eDamageType StringToDamageType(const AString &a_DamageTypeString)
Translates a damage type string to damage type.
AString DimensionToString(eDimension a_Dimension)
Translates a dimension enum to dimension string.
bool IsValidItem(int a_ItemType)
Returns true if the specified item type is valid (known).
eBlockFace RotateBlockFaceCCW(eBlockFace a_BlockFace)
Returns a blockface rotated around the Y axis counter-clockwise.
eDimension StringToDimension(const AString &a_DimensionString)
Translates a dimension string to dimension enum.
AString DamageTypeToString(eDamageType a_DamageType)
Translates damage type constant to a string representation (built-in).
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 MirrorBlockFaceY(eBlockFace a_BlockFace)
Returns a blockface mirrored around the Y axis (doesn't change up / down).
AString BlockFaceToString(eBlockFace a_BlockFace)
Returns the textual representation of the BlockFace constant.
const char * ClickActionToString(int a_ClickAction)
Returns a textual representation of the click action.
eBlockFace RotateBlockFaceCW(eBlockFace a_BlockFace)
Returns a blockface rotated around the Y axis clockwise.
eDimension
Dimension of a world.
@ caLeftClickOutsideHoldNothing
@ caRightClickOutsideHoldNothing
eDamageType
Damage type, used in the TakeDamageInfo structure and related functions.
eBlockFace
Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc.
#define ARRAYCOUNT(X)
Evaluates to the number of elements in an array (compile-time!)
void LOGWARNING(std::string_view a_Format, const Args &... args)
int NoCaseCompare(const AString &s1, const AString &s2)
Case-insensitive string comparison.
bool StringToInteger(const AString &a_str, T &a_Num)
Parses any integer type.
bool IsMinecart(short a_ItemType)
bool IsHoe(short a_ItemType)
bool IsHelmet(short a_ItemType)
bool IsPickaxe(short a_ItemType)
bool IsTool(short a_ItemType)
bool IsAxe(short a_ItemType)
bool IsVillagerFood(short a_ItemType)
bool IsLeggings(short a_ItemType)
bool IsChestPlate(short a_ItemType)
bool IsArmor(short a_ItemType)
bool IsBoots(short a_ItemType)
bool IsShovel(short a_ItemType)
bool IsHorseArmor(short a_ItemType)
bool IsSword(short a_ItemType)
Vector3< T > addedY(T a_AddY) const
Returns a copy of this vector moved by the specified amount on the y axis.
Vector3< T > addedZ(T a_AddZ) const
Returns a copy of this vector moved by the specified amount on the Z axis.
Vector3< T > addedX(T a_AddX) const
Returns a copy of this vector moved by the specified amount on the X axis.