Cuberite
A lightweight, fast and extensible game server for Minecraft
Namespaces | Typedefs | Enumerations | Functions | Variables
Defines.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 ItemCategory
 

Typedefs

typedef std::vector< int > cSlotNums
 List of slot numbers, used for inventory-painting. More...
 

Enumerations

enum  {
  DIG_STATUS_STARTED = 0, DIG_STATUS_CANCELLED = 1, DIG_STATUS_FINISHED = 2, DIG_STATUS_DROP_STACK = 3,
  DIG_STATUS_DROP_HELD = 4, DIG_STATUS_SHOOT_EAT = 5, DIG_STATUS_SWAP_ITEM_IN_HAND = 6
}
 PlayerDigging status constants. More...
 
enum  { MAX_EXPERIENCE_ORB_SIZE = 2000 }
 Experience Orb setup. More...
 
enum  BannerPattern {
  BannerPattern::BottomStripe, BannerPattern::TopStripe, BannerPattern::LeftStripe, BannerPattern::RightStripe,
  BannerPattern::CenterStripeVertical, BannerPattern::MiddleStripeHorizontal, BannerPattern::DownRightStripe, BannerPattern::DownLeftStripe,
  BannerPattern::SmallVerticalStripes, BannerPattern::DiagonalCross, BannerPattern::SquareCross, BannerPattern::LeftOfDiagonal,
  BannerPattern::RightOfUpsideDownDiagonal, BannerPattern::LeftOfUpsideDownDiagonal, BannerPattern::RightOfDiagonal, BannerPattern::VerticalHalfLeft,
  BannerPattern::VerticalHalfRight, BannerPattern::HorizontalHalfTop, BannerPattern::HorizontalHalfBottom, BannerPattern::BottomLeftCorner,
  BannerPattern::BottomRightCorner, BannerPattern::TopLeftCorner, BannerPattern::TopRightCorner, BannerPattern::BottomTriangle,
  BannerPattern::TopTriangle, BannerPattern::BottomTriangleSawtooth, BannerPattern::TopTriangleSawtooth, BannerPattern::MiddleCircle,
  BannerPattern::MiddleRhombus, BannerPattern::Border, BannerPattern::CurlyBorder, BannerPattern::Brick,
  BannerPattern::Gradient, BannerPattern::GradientUpsideDown, BannerPattern::Creeper, BannerPattern::Skull,
  BannerPattern::Flower, BannerPattern::Mojang, BannerPattern::Globe, BannerPattern::Piglin
}
 
enum  BossBarColor {
  BossBarColor::Pink, BossBarColor::Blue, BossBarColor::Red, BossBarColor::Green,
  BossBarColor::Yellow, BossBarColor::Purple, BossBarColor::White
}
 
enum  BossBarDivisionType {
  BossBarDivisionType::None, BossBarDivisionType::SixNotches, BossBarDivisionType::TenNotches, BossBarDivisionType::TwelveNotches,
  BossBarDivisionType::TwentyNotches
}
 
enum  eBlockFace {
  BLOCK_FACE_NONE = -1, BLOCK_FACE_XM = 4, BLOCK_FACE_XP = 5, BLOCK_FACE_YM = 0,
  BLOCK_FACE_YP = 1, BLOCK_FACE_ZM = 2, BLOCK_FACE_ZP = 3, BLOCK_FACE_BOTTOM = BLOCK_FACE_YM,
  BLOCK_FACE_TOP = BLOCK_FACE_YP, BLOCK_FACE_NORTH = BLOCK_FACE_ZM, BLOCK_FACE_SOUTH = BLOCK_FACE_ZP, BLOCK_FACE_WEST = BLOCK_FACE_XM,
  BLOCK_FACE_EAST = BLOCK_FACE_XP, BLOCK_FACE_MIN = -1, BLOCK_FACE_MAX = 5
}
 Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc. More...
 
enum  eChatType { ctChatBox = 0, ctSystem = 1, ctAboveActionBar = 2 }
 
enum  eClickAction {
  caLeftClick, caRightClick, caShiftLeftClick, caShiftRightClick,
  caNumber1, caNumber2, caNumber3, caNumber4,
  caNumber5, caNumber6, caNumber7, caNumber8,
  caNumber9, caMiddleClick, caDropKey, caCtrlDropKey,
  caLeftClickOutside, caRightClickOutside, caLeftClickOutsideHoldNothing, caRightClickOutsideHoldNothing,
  caLeftPaintBegin, caRightPaintBegin, caMiddlePaintBegin, caLeftPaintProgress,
  caRightPaintProgress, caMiddlePaintProgress, caLeftPaintEnd, caRightPaintEnd,
  caMiddlePaintEnd, caDblClick, caUnknown = 255
}
 Individual actions sent in the WindowClick packet. More...
 
enum  eDamageType {
  dtAttack, dtRangedAttack, dtLightning, dtFalling,
  dtDrowning, dtSuffocating, dtStarving, dtCactusContact,
  dtMagmaContact, dtLavaContact, dtPoisoning, dtWithering,
  dtOnFire, dtFireContact, dtInVoid, dtPotionOfHarming,
  dtEnderPearl, dtAdmin, dtExplosion, dtEnvironment,
  dtPawnAttack = dtAttack, dtEntityAttack = dtAttack, dtMob = dtAttack, dtMobAttack = dtAttack,
  dtArrowAttack = dtRangedAttack, dtArrow = dtRangedAttack, dtProjectile = dtRangedAttack, dtFall = dtFalling,
  dtDrown = dtDrowning, dtSuffocation = dtSuffocating, dtStarvation = dtStarving, dtHunger = dtStarving,
  dtCactus = dtCactusContact, dtCactuses = dtCactusContact, dtCacti = dtCactusContact, dtMagma = dtMagmaContact,
  dtLava = dtLavaContact, dtPoison = dtPoisoning, dtWither = dtWithering, dtBurning = dtOnFire,
  dtInFire = dtFireContact, dtPlugin = dtAdmin
}
 Damage type, used in the TakeDamageInfo structure and related functions. More...
 
enum  eDimension { dimNether = -1, dimOverworld = 0, dimEnd = 1, dimNotSet = 255 }
 Dimension of a world. More...
 
enum  eExplosionSource {
  esBed, esEnderCrystal, esGhastFireball, esMonster,
  esOther, esPlugin, esPrimedTNT, esWitherBirth,
  esWitherSkull, esMax
}
 The source of an explosion. More...
 
enum  eGameMode {
  eGameMode_NotSet = -1, eGameMode_Survival = 0, eGameMode_Creative = 1, eGameMode_Adventure = 2,
  eGameMode_Spectator = 3, gmNotSet = eGameMode_NotSet, gmSurvival = eGameMode_Survival, gmCreative = eGameMode_Creative,
  gmAdventure = eGameMode_Adventure, gmSpectator = eGameMode_Spectator, gmMax, gmMin = 0
}
 
enum  eMessageType {
  mtCustom, mtFailure, mtInformation, mtSuccess,
  mtWarning, mtFatal, mtDeath, mtPrivateMessage,
  mtJoin, mtLeave, mtMaxPlusOne, mtFail = mtFailure,
  mtError = mtFailure, mtInfo = mtInformation, mtPM = mtPrivateMessage
}
 
enum  eMobHeadRotation {
  SKULL_ROTATION_NORTH = 0, SKULL_ROTATION_NORTH_NORTH_EAST = 1, SKULL_ROTATION_NORTH_EAST = 2, SKULL_ROTATION_EAST_NORTH_EAST = 3,
  SKULL_ROTATION_EAST = 4, SKULL_ROTATION_EAST_SOUTH_EAST = 5, SKULL_ROTATION_SOUTH_EAST = 6, SKULL_ROTATION_SOUTH_SOUTH_EAST = 7,
  SKULL_ROTATION_SOUTH = 8, SKULL_ROTATION_SOUTH_SOUTH_WEST = 9, SKULL_ROTATION_SOUTH_WEST = 10, SKULL_ROTATION_WEST_SOUTH_WEST = 11,
  SKULL_ROTATION_WEST = 12, SKULL_ROTATION_WEST_NORTH_WEST = 13, SKULL_ROTATION_NORTH_WEST = 14, SKULL_ROTATION_NORTH_NORTH_WEST = 15
}
 
enum  eMobHeadType {
  SKULL_TYPE_SKELETON = 0, SKULL_TYPE_WITHER = 1, SKULL_TYPE_ZOMBIE = 2, SKULL_TYPE_PLAYER = 3,
  SKULL_TYPE_CREEPER = 4, SKULL_TYPE_DRAGON = 5
}
 
enum  EntityAnimation {
  EntityAnimation::AnimalFallsInLove, EntityAnimation::ArmorStandGetsHit, EntityAnimation::ArrowTipSparkles, EntityAnimation::DolphinShowsHappiness,
  EntityAnimation::EggCracks, EntityAnimation::EntityGetsCriticalHit, EntityAnimation::EntityGetsMagicalCriticalHit, EntityAnimation::EntityTrailsHoney,
  EntityAnimation::EvokerFangsAttacks, EntityAnimation::FireworkRocketExplodes, EntityAnimation::FoxChews, EntityAnimation::GuardianAttacks,
  EntityAnimation::HoglinAttacks, EntityAnimation::HorseTamingFails, EntityAnimation::HorseTamingSucceeds, EntityAnimation::IronGolemAttacks,
  EntityAnimation::IronGolemOffersGift, EntityAnimation::IronGolemStashesGift, EntityAnimation::MinecartSpawnerDelayResets, EntityAnimation::MinecartTNTIgnites,
  EntityAnimation::MobSpawns, EntityAnimation::OcelotTrusts, EntityAnimation::OcelotDistrusts, EntityAnimation::PawnBerryBushPricks,
  EntityAnimation::PawnBurns, EntityAnimation::PawnChestEquipmentBreaks, EntityAnimation::PawnDies, EntityAnimation::PawnDrowns,
  EntityAnimation::PawnFeetEquipmentBreaks, EntityAnimation::PawnHandItemSwaps, EntityAnimation::PawnHeadEquipmentBreaks, EntityAnimation::PawnHurts,
  EntityAnimation::PawnLegsEquipmentBreaks, EntityAnimation::PawnMainHandEquipmentBreaks, EntityAnimation::PawnOffHandEquipmentBreaks, EntityAnimation::PawnShieldBlocks,
  EntityAnimation::PawnShieldBreaks, EntityAnimation::PawnTeleports, EntityAnimation::PawnThornsPricks, EntityAnimation::PawnTotemActivates,
  EntityAnimation::PlayerBadOmenActivates, EntityAnimation::PlayerEntersBed, EntityAnimation::PlayerFinishesEating, EntityAnimation::PlayerLeavesBed,
  EntityAnimation::PlayerMainHandSwings, EntityAnimation::PlayerOffHandSwings, EntityAnimation::RabbitJumps, EntityAnimation::RavagerAttacks,
  EntityAnimation::RavagerBecomesStunned, EntityAnimation::SheepEatsGrass, EntityAnimation::SnowballPoofs, EntityAnimation::VillagerKisses,
  EntityAnimation::VillagerShowsAnger, EntityAnimation::VillagerShowsHappiness, EntityAnimation::VillagerSweats, EntityAnimation::WitchMagicks,
  EntityAnimation::WolfShakesWater, EntityAnimation::WolfTamingFails, EntityAnimation::WolfTamingSucceeds, EntityAnimation::ZoglinAttacks,
  EntityAnimation::ZombieVillagerCureFinishes
}
 
enum  eShrapnelLevel { slNone, slGravityAffectedOnly, slAll }
 
enum  eSkinPart {
  spCape = 0x01, spJacket = 0x02, spLeftSleeve = 0x04, spRightSleeve = 0x08,
  spLeftPants = 0x10, spRightPants = 0x20, spHat = 0x40, spMask = 0x7F
}
 
enum  eSpreadSource {
  ssFireSpread, ssGrassSpread, ssMushroomSpread, ssMycelSpread,
  ssVineSpread
}
 
enum  eWeather {
  eWeather_Sunny = 0, eWeather_Rain = 1, eWeather_ThunderStorm = 2, wSunny = eWeather_Sunny,
  wRain = eWeather_Rain, wThunderstorm = eWeather_ThunderStorm, wStorm = wThunderstorm
}
 

Functions

void AddFaceDirection (int &a_BlockX, int &a_BlockY, int &a_BlockZ, eBlockFace a_BlockFace, bool a_bInverse=false)
 Modifies the specified coords so that they point to the block adjacent to the one specified through its specified face. More...
 
Vector3i AddFaceDirection (Vector3i a_Pos, eBlockFace a_BlockFace, bool a_InvertDirection=false)
 Returns the coords of a block that is neighboring the specified position through its specified face. More...
 
AString BlockFaceToString (eBlockFace a_BlockFace)
 Returns the textual representation of the BlockFace constant. More...
 
const char * ClickActionToString (int a_ClickAction)
 Returns a textual representation of the click action. More...
 
AString DamageTypeToString (eDamageType a_DamageType)
 Translates damage type constant to a string representation (built-in). More...
 
template<class T >
Diff (T a_Val1, T a_Val2)
 
AString DimensionToString (eDimension a_Dimension)
 Translates a dimension enum to dimension string. More...
 
void EulerToVector (double a_Pan, double a_Pitch, double &a_X, double &a_Y, double &a_Z)
 
bool ItemCategory::IsArmor (short a_ItemType)
 
bool ItemCategory::IsAxe (short a_ItemType)
 
bool ItemCategory::IsBoots (short a_ItemType)
 
bool ItemCategory::IsChestPlate (short a_ItemType)
 
bool ItemCategory::IsHelmet (short a_ItemType)
 
bool ItemCategory::IsHoe (short a_ItemType)
 
bool ItemCategory::IsHorseArmor (short a_ItemType)
 
bool ItemCategory::IsLeggings (short a_ItemType)
 
bool ItemCategory::IsMinecart (short a_ItemType)
 
bool ItemCategory::IsPickaxe (short a_ItemType)
 
bool ItemCategory::IsShovel (short a_ItemType)
 
bool ItemCategory::IsSword (short a_ItemType)
 
bool ItemCategory::IsTool (short a_ItemType)
 
bool IsValidBlock (int a_BlockType)
 Returns true if the specified block type is valid (known). More...
 
bool IsValidItem (int a_ItemType)
 Returns true if the specified item type is valid (known). More...
 
bool ItemCategory::IsVillagerFood (short a_ItemType)
 
eBlockFace MirrorBlockFaceY (eBlockFace a_BlockFace)
 Returns a blockface mirrored around the Y axis (doesn't change up / down). More...
 
double NormalizeAngleDegrees (const double a_Degrees)
 Normalizes an angle in degrees to the [-180, +180) range: More...
 
eBlockFace ReverseBlockFace (eBlockFace a_BlockFace)
 Returns a blockface opposite to the one specified. More...
 
eBlockFace RotateBlockFaceCCW (eBlockFace a_BlockFace)
 Returns a blockface rotated around the Y axis counter-clockwise. More...
 
eBlockFace RotateBlockFaceCW (eBlockFace a_BlockFace)
 Returns a blockface rotated around the Y axis clockwise. More...
 
eDamageType StringToDamageType (const AString &a_DamageString)
 Translates a damage type string to damage type. More...
 
eDimension StringToDimension (const AString &a_DimensionString)
 Translates a dimension string to dimension enum. More...
 
void VectorToEuler (double a_X, double a_Y, double a_Z, double &a_Pan, double &a_Pitch)
 

Variables

constexpr const int TPS = 20
 Constant to calculate ticks from seconds "ticks per second". More...
 

Typedef Documentation

◆ cSlotNums

typedef std::vector<int> cSlotNums

List of slot numbers, used for inventory-painting.

Definition at line 9 of file Defines.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

PlayerDigging status constants.

Enumerator
DIG_STATUS_STARTED 
DIG_STATUS_CANCELLED 
DIG_STATUS_FINISHED 
DIG_STATUS_DROP_STACK 
DIG_STATUS_DROP_HELD 
DIG_STATUS_SHOOT_EAT 
DIG_STATUS_SWAP_ITEM_IN_HAND 

Definition at line 65 of file Defines.h.

◆ anonymous enum

anonymous enum

Experience Orb setup.

Enumerator
MAX_EXPERIENCE_ORB_SIZE 

Definition at line 26 of file Defines.h.

◆ BannerPattern

enum BannerPattern
strong
Enumerator
BottomStripe 
TopStripe 
LeftStripe 
RightStripe 
CenterStripeVertical 
MiddleStripeHorizontal 
DownRightStripe 
DownLeftStripe 
SmallVerticalStripes 
DiagonalCross 
SquareCross 
LeftOfDiagonal 
RightOfUpsideDownDiagonal 
LeftOfUpsideDownDiagonal 
RightOfDiagonal 
VerticalHalfLeft 
VerticalHalfRight 
HorizontalHalfTop 
HorizontalHalfBottom 
BottomLeftCorner 
BottomRightCorner 
TopLeftCorner 
TopRightCorner 
BottomTriangle 
TopTriangle 
BottomTriangleSawtooth 
TopTriangleSawtooth 
MiddleCircle 
MiddleRhombus 
Border 
CurlyBorder 
Brick 
Gradient 
GradientUpsideDown 
Creeper 
Skull 
Flower 
Mojang 
Globe 
Piglin 

Definition at line 378 of file Defines.h.

◆ BossBarColor

enum BossBarColor
strong
Enumerator
Pink 
Blue 
Red 
Green 
Yellow 
Purple 
White 

Definition at line 426 of file Defines.h.

◆ BossBarDivisionType

enum BossBarDivisionType
strong
Enumerator
None 
SixNotches 
TenNotches 
TwelveNotches 
TwentyNotches 

Definition at line 441 of file Defines.h.

◆ eBlockFace

enum eBlockFace

Block face constants, used in PlayerDigging and PlayerBlockPlacement packets and bbox collision calc.

Enumerator
BLOCK_FACE_NONE 
BLOCK_FACE_XM 
BLOCK_FACE_XP 
BLOCK_FACE_YM 
BLOCK_FACE_YP 
BLOCK_FACE_ZM 
BLOCK_FACE_ZP 
BLOCK_FACE_BOTTOM 
BLOCK_FACE_TOP 
BLOCK_FACE_NORTH 
BLOCK_FACE_SOUTH 
BLOCK_FACE_WEST 
BLOCK_FACE_EAST 
BLOCK_FACE_MIN 
BLOCK_FACE_MAX 

Definition at line 37 of file Defines.h.

◆ eChatType

enum eChatType
Enumerator
ctChatBox 
ctSystem 
ctAboveActionBar 

Definition at line 148 of file Defines.h.

◆ eClickAction

Individual actions sent in the WindowClick packet.

Enumerator
caLeftClick 
caRightClick 
caShiftLeftClick 
caShiftRightClick 
caNumber1 
caNumber2 
caNumber3 
caNumber4 
caNumber5 
caNumber6 
caNumber7 
caNumber8 
caNumber9 
caMiddleClick 
caDropKey 
caCtrlDropKey 
caLeftClickOutside 
caRightClickOutside 
caLeftClickOutsideHoldNothing 
caRightClickOutsideHoldNothing 
caLeftPaintBegin 
caRightPaintBegin 
caMiddlePaintBegin 
caLeftPaintProgress 
caRightPaintProgress 
caMiddlePaintProgress 
caLeftPaintEnd 
caRightPaintEnd 
caMiddlePaintEnd 
caDblClick 
caUnknown 

Definition at line 81 of file Defines.h.

◆ eDamageType

Damage type, used in the TakeDamageInfo structure and related functions.

Enumerator
dtAttack 
dtRangedAttack 
dtLightning 
dtFalling 
dtDrowning 
dtSuffocating 
dtStarving 
dtCactusContact 
dtMagmaContact 
dtLavaContact 
dtPoisoning 
dtWithering 
dtOnFire 
dtFireContact 
dtInVoid 
dtPotionOfHarming 
dtEnderPearl 
dtAdmin 
dtExplosion 
dtEnvironment 
dtPawnAttack 
dtEntityAttack 
dtMob 
dtMobAttack 
dtArrowAttack 
dtArrow 
dtProjectile 
dtFall 
dtDrown 
dtSuffocation 
dtStarvation 
dtHunger 
dtCactus 
dtCactuses 
dtCacti 
dtMagma 
dtLava 
dtPoison 
dtWither 
dtBurning 
dtInFire 
dtPlugin 

Definition at line 243 of file Defines.h.

◆ eDimension

enum eDimension

Dimension of a world.

Enumerator
dimNether 
dimOverworld 
dimEnd 
dimNotSet 

Definition at line 230 of file Defines.h.

◆ eExplosionSource

The source of an explosion.

Also dictates the type of the additional data passed to the explosion handlers: | esBed | Vector3i * | Bed exploding in the Nether or in the End | esEnderCrystal | cEnderCrystal * | | esGhastFireball | cGhastFireballEntity * | | esMonster | cMonster * | | esOther | nullptr | Any other explosion unaccounted for | esPlugin | nullptr | Explosion primarily attributed to a plugin | esPrimedTNT | cTNTEntity * | | esWitherBirth | cMonster * | | esWitherSkull | cProjectileEntity * |

Enumerator
esBed 
esEnderCrystal 
esGhastFireball 
esMonster 
esOther 
esPlugin 
esPrimedTNT 
esWitherBirth 
esWitherSkull 
esMax 

Definition at line 308 of file Defines.h.

◆ eGameMode

enum eGameMode
Enumerator
eGameMode_NotSet 
eGameMode_Survival 
eGameMode_Creative 
eGameMode_Adventure 
eGameMode_Spectator 
gmNotSet 
gmSurvival 
gmCreative 
gmAdventure 
gmSpectator 
gmMax 
gmMin 

Definition at line 124 of file Defines.h.

◆ eMessageType

Enumerator
mtCustom 
mtFailure 
mtInformation 
mtSuccess 
mtWarning 
mtFatal 
mtDeath 
mtPrivateMessage 
mtJoin 
mtLeave 
mtMaxPlusOne 
mtFail 
mtError 
mtInfo 
mtPM 

Definition at line 350 of file Defines.h.

◆ eMobHeadRotation

Enumerator
SKULL_ROTATION_NORTH 
SKULL_ROTATION_NORTH_NORTH_EAST 
SKULL_ROTATION_NORTH_EAST 
SKULL_ROTATION_EAST_NORTH_EAST 
SKULL_ROTATION_EAST 
SKULL_ROTATION_EAST_SOUTH_EAST 
SKULL_ROTATION_SOUTH_EAST 
SKULL_ROTATION_SOUTH_SOUTH_EAST 
SKULL_ROTATION_SOUTH 
SKULL_ROTATION_SOUTH_SOUTH_WEST 
SKULL_ROTATION_SOUTH_WEST 
SKULL_ROTATION_WEST_SOUTH_WEST 
SKULL_ROTATION_WEST 
SKULL_ROTATION_WEST_NORTH_WEST 
SKULL_ROTATION_NORTH_WEST 
SKULL_ROTATION_NORTH_NORTH_WEST 

Definition at line 190 of file Defines.h.

◆ eMobHeadType

Enumerator
SKULL_TYPE_SKELETON 
SKULL_TYPE_WITHER 
SKULL_TYPE_ZOMBIE 
SKULL_TYPE_PLAYER 
SKULL_TYPE_CREEPER 
SKULL_TYPE_DRAGON 

Definition at line 176 of file Defines.h.

◆ EntityAnimation

enum EntityAnimation
strong
Enumerator
AnimalFallsInLove 
ArmorStandGetsHit 
ArrowTipSparkles 
DolphinShowsHappiness 
EggCracks 
EntityGetsCriticalHit 
EntityGetsMagicalCriticalHit 
EntityTrailsHoney 
EvokerFangsAttacks 
FireworkRocketExplodes 
FoxChews 
GuardianAttacks 
HoglinAttacks 
HorseTamingFails 
HorseTamingSucceeds 
IronGolemAttacks 
IronGolemOffersGift 
IronGolemStashesGift 
MinecartSpawnerDelayResets 
MinecartTNTIgnites 
MobSpawns 
OcelotTrusts 
OcelotDistrusts 
PawnBerryBushPricks 
PawnBurns 
PawnChestEquipmentBreaks 
PawnDies 
PawnDrowns 
PawnFeetEquipmentBreaks 
PawnHandItemSwaps 
PawnHeadEquipmentBreaks 
PawnHurts 
PawnLegsEquipmentBreaks 
PawnMainHandEquipmentBreaks 
PawnOffHandEquipmentBreaks 
PawnShieldBlocks 
PawnShieldBreaks 
PawnTeleports 
PawnThornsPricks 
PawnTotemActivates 
PlayerBadOmenActivates 
PlayerEntersBed 
PlayerFinishesEating 
PlayerLeavesBed 
PlayerMainHandSwings 
PlayerOffHandSwings 
RabbitJumps 
RavagerAttacks 
RavagerBecomesStunned 
SheepEatsGrass 
SnowballPoofs 
VillagerKisses 
VillagerShowsAnger 
VillagerShowsHappiness 
VillagerSweats 
WitchMagicks 
WolfShakesWater 
WolfTamingFails 
WolfTamingSucceeds 
ZoglinAttacks 
ZombieVillagerCureFinishes 

Definition at line 456 of file Defines.h.

◆ eShrapnelLevel

Enumerator
slNone 
slGravityAffectedOnly 
slAll 

Definition at line 326 of file Defines.h.

◆ eSkinPart

enum eSkinPart
Enumerator
spCape 
spJacket 
spLeftSleeve 
spRightSleeve 
spLeftPants 
spRightPants 
spHat 
spMask 

Definition at line 214 of file Defines.h.

◆ eSpreadSource

Enumerator
ssFireSpread 
ssGrassSpread 
ssMushroomSpread 
ssMycelSpread 
ssVineSpread 

Definition at line 337 of file Defines.h.

◆ eWeather

enum eWeather
Enumerator
eWeather_Sunny 
eWeather_Rain 
eWeather_ThunderStorm 
wSunny 
wRain 
wThunderstorm 
wStorm 

Definition at line 159 of file Defines.h.

Function Documentation

◆ AddFaceDirection() [1/2]

void AddFaceDirection ( int &  a_BlockX,
int &  a_BlockY,
int &  a_BlockZ,
eBlockFace  a_BlockFace,
bool  a_bInverse = false 
)

Modifies the specified coords so that they point to the block adjacent to the one specified through its specified face.

If a_Inverse is true, the opposite direction is used instead.

Definition at line 378 of file Defines.cpp.

◆ AddFaceDirection() [2/2]

Vector3i AddFaceDirection ( Vector3i  a_Pos,
eBlockFace  a_BlockFace,
bool  a_InvertDirection = false 
)

Returns the coords of a block that is neighboring the specified position through its specified face.

If a_InvertDirection is true, the opposite direction is used instead.

Definition at line 392 of file Defines.cpp.

◆ BlockFaceToString()

AString BlockFaceToString ( eBlockFace  a_BlockFace)

Returns the textual representation of the BlockFace constant.

Definition at line 141 of file Defines.cpp.

◆ ClickActionToString()

const char* ClickActionToString ( int  a_ClickAction)

Returns a textual representation of the click action.

Definition at line 10 of file Defines.cpp.

◆ DamageTypeToString()

AString DamageTypeToString ( eDamageType  a_DamageType)

Translates damage type constant to a string representation (built-in).

Definition at line 267 of file Defines.cpp.

◆ Diff()

template<class T >
T Diff ( a_Val1,
a_Val2 
)
inline

Definition at line 616 of file Defines.h.

◆ DimensionToString()

AString DimensionToString ( eDimension  a_Dimension)

Translates a dimension enum to dimension string.

Takes an eDimension enum value and returns "Overworld" on failure.

Definition at line 236 of file Defines.cpp.

◆ EulerToVector()

void EulerToVector ( double  a_Pan,
double  a_Pitch,
double &  a_X,
double &  a_Y,
double &  a_Z 
)
inline

Definition at line 582 of file Defines.h.

◆ IsValidBlock()

bool IsValidBlock ( int  a_BlockType)

Returns true if the specified block type is valid (known).

Definition at line 160 of file Defines.cpp.

◆ IsValidItem()

bool IsValidItem ( int  a_ItemType)

Returns true if the specified item type is valid (known).

Definition at line 172 of file Defines.cpp.

◆ MirrorBlockFaceY()

eBlockFace MirrorBlockFaceY ( eBlockFace  a_BlockFace)

Returns a blockface mirrored around the Y axis (doesn't change up / down).

Definition at line 54 of file Defines.cpp.

◆ NormalizeAngleDegrees()

double NormalizeAngleDegrees ( const double  a_Degrees)
inline

Normalizes an angle in degrees to the [-180, +180) range:

Definition at line 628 of file Defines.h.

◆ ReverseBlockFace()

eBlockFace ReverseBlockFace ( eBlockFace  a_BlockFace)

Returns a blockface opposite to the one specified.

Definition at line 121 of file Defines.cpp.

◆ RotateBlockFaceCCW()

eBlockFace RotateBlockFaceCCW ( eBlockFace  a_BlockFace)

Returns a blockface rotated around the Y axis counter-clockwise.

Definition at line 77 of file Defines.cpp.

◆ RotateBlockFaceCW()

eBlockFace RotateBlockFaceCW ( eBlockFace  a_BlockFace)

Returns a blockface rotated around the Y axis clockwise.

Definition at line 99 of file Defines.cpp.

◆ StringToDamageType()

eDamageType StringToDamageType ( const AString a_DamageString)

Translates a damage type string to damage type.

Takes either a number or a damage type alias (built-in). Returns -1 on failure

Definition at line 300 of file Defines.cpp.

◆ StringToDimension()

eDimension StringToDimension ( const AString a_DimensionString)

Translates a dimension string to dimension enum.

Takes either a number or a dimension alias (built-in). Returns dimOverworld on failure

Definition at line 194 of file Defines.cpp.

◆ VectorToEuler()

void VectorToEuler ( double  a_X,
double  a_Y,
double  a_Z,
double &  a_Pan,
double &  a_Pitch 
)
inline

Definition at line 596 of file Defines.h.

Variable Documentation

◆ TPS

constexpr const int TPS = 20
inlineconstexpr

Constant to calculate ticks from seconds "ticks per second".

Definition at line 16 of file Defines.h.