Cuberite
A lightweight, fast and extensible game server for Minecraft
|
#include <EntityEffect.h>
Public Member Functions | |
cEntityEffectResistance (int a_Duration, short a_Intensity, double a_DistanceModifier=1) | |
Public Member Functions inherited from cEntityEffect | |
cEntityEffect (const cEntityEffect &a_OtherEffect) | |
Creates an entity effect by copying another. More... | |
cEntityEffect (int a_Duration, short a_Intensity, double a_DistanceModifier=1) | |
Creates an entity effect of the specified type. More... | |
cEntityEffect (void) | |
Creates an empty entity effect. More... | |
double | GetDistanceModifier (void) const |
Returns the distance modifier for affecting potency. More... | |
int | GetDuration (void) const |
Returns the duration of the effect. More... | |
short | GetIntensity (void) const |
Returns how strong the effect will be applied. More... | |
int | GetTicks (void) const |
Returns how many ticks this effect has been active for. More... | |
virtual void | OnActivate (cPawn &a_Target) |
Called when the effect is first added to an entity. More... | |
virtual void | OnDeactivate (cPawn &a_Target) |
Called when the effect is removed from an entity. More... | |
virtual void | OnTick (cPawn &a_Target) |
Called on each tick. More... | |
cEntityEffect & | operator= (cEntityEffect a_OtherEffect) |
Creates an entity effect by copying another. More... | |
void | SetDistanceModifier (double a_DistanceModifier) |
void | SetDuration (int a_Duration) |
void | SetIntensity (short a_Intensity) |
void | SetTicks (int a_Ticks) |
virtual | ~cEntityEffect (void)=default |
Private Types | |
using | Super = cEntityEffect |
Additional Inherited Members | |
Public Types inherited from cEntityEffect | |
enum | eType { effNoEffect = 0 , effSpeed = 1 , effSlowness = 2 , effHaste = 3 , effMiningFatigue = 4 , effStrength = 5 , effInstantHealth = 6 , effInstantDamage = 7 , effJumpBoost = 8 , effNausea = 9 , effRegeneration = 10 , effResistance = 11 , effFireResistance = 12 , effWaterBreathing = 13 , effInvisibility = 14 , effBlindness = 15 , effNightVision = 16 , effHunger = 17 , effWeakness = 18 , effPoison = 19 , effWither = 20 , effHealthBoost = 21 , effAbsorption = 22 , effSaturation = 23 } |
All types of entity effects (numbers correspond to protocol / storage types) More... | |
Static Public Member Functions inherited from cEntityEffect | |
static std::unique_ptr< cEntityEffect > | CreateEntityEffect (cEntityEffect::eType a_EffectType, int a_Duration, short a_Intensity, double a_DistanceModifier) |
Creates a pointer to the proper entity effect from the effect type. More... | |
static int | GetPotionColor (short a_ItemDamage) |
Returns the potion color (used by the client for visuals), based on the potion's damage value. More... | |
static int | GetPotionEffectDuration (short a_ItemDamage) |
Returns the effect duration, in ticks, based on the potion's damage value. More... | |
static short | GetPotionEffectIntensity (short a_ItemDamage) |
Retrieves the intensity level from the potion's damage value. More... | |
static cEntityEffect::eType | GetPotionEffectType (short a_ItemDamage) |
Translates the potion's damage value into the entity effect that the potion gives. More... | |
static bool | IsPotionDrinkable (short a_ItemDamage) |
Returns true if the potion with the given damage is drinkable. More... | |
Protected Attributes inherited from cEntityEffect | |
double | m_DistanceModifier |
The distance modifier for affecting potency. More... | |
int | m_Duration |
How long this effect will last, in ticks. More... | |
short | m_Intensity |
How strong the effect will be applied. More... | |
int | m_Ticks |
How many ticks this effect has been active for. More... | |
Definition at line 315 of file EntityEffect.h.
|
private |
Definition at line 318 of file EntityEffect.h.
|
inline |
Definition at line 322 of file EntityEffect.h.