QcBodyBurning Class
Players and creatures on fire (decision E-393). More...
| Header: | #include <server/gameplay/QcBodyBurning.h> |
Public Types
Public Functions
| void | setRainCheck(QcBodyBurning::RainCheck check) |
| void | tick() |
Static Public Members
| const double | burnDamage |
| const int | burnIntervalTicks |
| const int | sunlightTicks |
| const int | wetIntervalTicks |
Detailed Description
A body touching a block with setsAlight (fire 8 s, lava 15 s; QcContactDamage::touching) burns for at least that long from then on; while it burns it takes burnDamage once every burnIntervalTicks (players through their armour, like the contact damage of the block), and water around its feet or body puts it out at once, as will rain (setRainCheck, weather of stage 35). Players in creative mode never catch fire. Players hear of their own burning with their health (QcMsg::PlayerHealth::burning), everyone sees it on the entity (QcMsg::Burning). Creatures that burn in daylight catch fire in direct sunlight. A burning creature makes its hurt sound when the damage takes and drops its loot when it dies, like after a hit. Items in fire or lava burn up in QcEnvironmentDamage. The same water and rain hurt creatures with waterDamage (shadewalkers, decision E-460) once every wetIntervalTicks, and one that teleports jumps away from it.
Member Type Documentation
[alias] QcBodyBurning::RainCheck
Whether rain falls on a position; rain puts out the bodies it falls on.
Member Function Documentation
void QcBodyBurning::setRainCheck(QcBodyBurning::RainCheck check)
Sets the check of where rain falls.
void QcBodyBurning::tick()
One simulated tick of every burning or touching player and creature.
Member Variable Documentation
const double QcBodyBurning::burnDamage
Damage a burning body takes each time.
const int QcBodyBurning::burnIntervalTicks
Ticks between two hits of burning.
const int QcBodyBurning::sunlightTicks
Creatures that burn in daylight (QcMobDefinition::burnsInDaylight, decision E-426) catch fire for this long in direct sunlight, as from fire; water, rain and shade keep them from it.
const int QcBodyBurning::wetIntervalTicks
Creatures hurt by water (QcMobDefinition::waterDamage) take it this often while wet.