PocketMine-MP 5.21.3 git-fcef015f32c0b0709cfd4d6f1b3c32f484b25bde
|
Public Member Functions | |
__construct (Entity $damager, Entity $childEntity, Entity $entity, int $cause, float $damage, array $modifiers=[]) | |
call () | |
canBeReducedByArmor () | |
getAttackCooldown () | |
getBaseDamage () | |
getCause () | |
getChild () | |
getDamager () | |
getEntity () | |
getEventName () | |
getFinalDamage () | |
getKnockBack () | |
getModifier (int $type) | |
getModifiers () | |
getOriginalBaseDamage () | |
getOriginalModifier (int $type) | |
getOriginalModifiers () | |
getVerticalKnockBackLimit () | |
isApplicable (int $type) | |
isCancelled () | |
setAttackCooldown (int $attackCooldown) | |
setBaseDamage (float $damage) | |
setKnockBack (float $knockBack) | |
setModifier (float $damage, int $type) | |
setVerticalKnockBackLimit (float $verticalKnockBackLimit) | |
Static Public Member Functions | |
static | hasHandlers () |
Public Attributes | |
const | CAUSE_BLOCK_EXPLOSION = 9 |
const | CAUSE_CONTACT = 0 |
const | CAUSE_CUSTOM = 14 |
const | CAUSE_DROWNING = 8 |
const | CAUSE_ENTITY_ATTACK = 1 |
const | CAUSE_ENTITY_EXPLOSION = 10 |
const | CAUSE_FALL = 4 |
const | CAUSE_FALLING_BLOCK = 16 |
const | CAUSE_FIRE = 5 |
const | CAUSE_FIRE_TICK = 6 |
const | CAUSE_LAVA = 7 |
const | CAUSE_MAGIC = 13 |
const | CAUSE_PROJECTILE = 2 |
const | CAUSE_STARVATION = 15 |
const | CAUSE_SUFFOCATION = 3 |
const | CAUSE_SUICIDE = 12 |
const | CAUSE_VOID = 11 |
const | MODIFIER_ABSORPTION = 5 |
const | MODIFIER_ARMOR = 1 |
const | MODIFIER_ARMOR_ENCHANTMENTS = 6 |
const | MODIFIER_ARMOR_HELMET = 11 |
const | MODIFIER_CRITICAL = 7 |
const | MODIFIER_PREVIOUS_DAMAGE_COOLDOWN = 10 |
const | MODIFIER_RESISTANCE = 4 |
const | MODIFIER_STRENGTH = 2 |
const | MODIFIER_TOTEM = 8 |
const | MODIFIER_WEAKNESS = 3 |
const | MODIFIER_WEAPON_ENCHANTMENTS = 9 |
Protected Member Functions | |
addAttackerModifiers (Entity $damager) | |
Protected Attributes | |
Entity | $entity |
string | $eventName = null |
Called when an entity takes damage from an entity sourced from another entity, for example being hit by a snowball thrown by a Player.
Definition at line 31 of file EntityDamageByChildEntityEvent.php.
pocketmine\event\entity\EntityDamageByChildEntityEvent::__construct | ( | Entity | $damager, |
Entity | $childEntity, | ||
Entity | $entity, | ||
int | $cause, | ||
float | $damage, | ||
array | $modifiers = [] ) |
float[] | $modifiers |
Definition at line 37 of file EntityDamageByChildEntityEvent.php.
References pocketmine\event\entity\EntityEvent\$entity.
|
protectedinherited |
Definition at line 53 of file EntityDamageByEntityEvent.php.
|
inherited |
|
inherited |
Returns whether an entity can use armour points to reduce this type of damage.
Definition at line 154 of file EntityDamageEvent.php.
|
inherited |
Returns the cooldown in ticks before the target entity can be attacked again.
Definition at line 174 of file EntityDamageEvent.php.
|
inherited |
Returns the base amount of damage applied, before modifiers.
Definition at line 97 of file EntityDamageEvent.php.
Referenced by pocketmine\entity\Living\applyDamageModifiers().
|
inherited |
Definition at line 90 of file EntityDamageEvent.php.
pocketmine\event\entity\EntityDamageByChildEntityEvent::getChild | ( | ) |
Returns the entity which caused the damage, or null if the entity has been killed or closed.
Definition at line 45 of file EntityDamageByChildEntityEvent.php.
|
inherited |
Returns the attacking entity, or null if the attacker has been killed or closed.
Definition at line 69 of file EntityDamageByEntityEvent.php.
|
inherited |
Reimplemented in pocketmine\event\entity\EntityDeathEvent, pocketmine\event\entity\EntityShootBowEvent, pocketmine\event\entity\ItemDespawnEvent, pocketmine\event\entity\ItemSpawnEvent, pocketmine\event\entity\ProjectileHitEvent, pocketmine\event\entity\ProjectileLaunchEvent, and pocketmine\event\player\PlayerDeathEvent.
Definition at line 43 of file EntityEvent.php.
References pocketmine\event\entity\EntityEvent\$entity.
|
inherited |
Definition at line 147 of file EntityDamageEvent.php.
|
inherited |
Returns the force with which the victim will be knocked back from the attacking entity.
Definition at line 78 of file EntityDamageByEntityEvent.php.
|
inherited |
Definition at line 135 of file EntityDamageEvent.php.
|
inherited |
Definition at line 131 of file EntityDamageEvent.php.
|
inherited |
Returns the original base amount of damage applied, before alterations by plugins.
Definition at line 113 of file EntityDamageEvent.php.
|
inherited |
Definition at line 124 of file EntityDamageEvent.php.
|
inherited |
Definition at line 120 of file EntityDamageEvent.php.
|
inherited |
Returns the maximum upwards velocity the victim may have after being knocked back. This ensures that the victim doesn't fly up into the sky when high levels of knockback are applied.
Definition at line 97 of file EntityDamageByEntityEvent.php.
|
staticinherited |
|
inherited |
Definition at line 143 of file EntityDamageEvent.php.
|
inherited |
Returns whether this instance of the event is currently cancelled.
If it is cancelled, only downstream handlers that declare @handleCancelled
will be called with this event.
|
inherited |
Sets the cooldown in ticks before the target entity can be attacked again.
NOTE: This value is not used in non-Living entities
Definition at line 183 of file EntityDamageEvent.php.
|
inherited |
Sets the base amount of damage applied, optionally recalculating modifiers.
TODO: add ability to recalculate modifiers when this is set
Definition at line 106 of file EntityDamageEvent.php.
|
inherited |
Sets the force with which the victim will be knocked back from the attacking entity. Larger values will knock the victim back further. Negative values will pull the victim towards the attacker.
Definition at line 87 of file EntityDamageByEntityEvent.php.
|
inherited |
Definition at line 139 of file EntityDamageEvent.php.
|
inherited |
Sets the maximum upwards velocity the victim may have after being knocked back. Larger values will allow the victim to fly higher if the knockback force is also large.
Definition at line 105 of file EntityDamageByEntityEvent.php.
|
protectedinherited |
@phpstan-var TEntity
Definition at line 37 of file EntityEvent.php.
Referenced by pocketmine\event\entity\EntityDamageByBlockEvent\__construct(), pocketmine\event\entity\EntityDamageByChildEntityEvent\__construct(), pocketmine\event\entity\EntityDamageByEntityEvent\__construct(), pocketmine\event\entity\EntityDamageEvent\__construct(), pocketmine\event\entity\EntityDeathEvent\__construct(), pocketmine\event\entity\EntityExplodeEvent\__construct(), pocketmine\event\player\PlayerDeathEvent\__construct(), pocketmine\event\entity\EntityDeathEvent\getEntity(), pocketmine\event\entity\EntityEvent\getEntity(), pocketmine\event\entity\EntityShootBowEvent\getEntity(), pocketmine\event\entity\ItemDespawnEvent\getEntity(), pocketmine\event\entity\ItemSpawnEvent\getEntity(), pocketmine\event\entity\ProjectileHitEvent\getEntity(), and pocketmine\event\entity\ProjectileLaunchEvent\getEntity().
|
protectedinherited |
|
inherited |
Definition at line 60 of file EntityDamageEvent.php.
|
inherited |
Definition at line 51 of file EntityDamageEvent.php.
|
inherited |
Definition at line 65 of file EntityDamageEvent.php.
|
inherited |
Definition at line 59 of file EntityDamageEvent.php.
|
inherited |
Definition at line 52 of file EntityDamageEvent.php.
|
inherited |
Definition at line 61 of file EntityDamageEvent.php.
|
inherited |
Definition at line 55 of file EntityDamageEvent.php.
|
inherited |
Definition at line 67 of file EntityDamageEvent.php.
|
inherited |
Definition at line 56 of file EntityDamageEvent.php.
|
inherited |
Definition at line 57 of file EntityDamageEvent.php.
|
inherited |
Definition at line 58 of file EntityDamageEvent.php.
|
inherited |
Definition at line 64 of file EntityDamageEvent.php.
|
inherited |
Definition at line 53 of file EntityDamageEvent.php.
|
inherited |
Definition at line 66 of file EntityDamageEvent.php.
|
inherited |
Definition at line 54 of file EntityDamageEvent.php.
|
inherited |
Definition at line 63 of file EntityDamageEvent.php.
|
inherited |
Definition at line 62 of file EntityDamageEvent.php.
|
inherited |
Definition at line 43 of file EntityDamageEvent.php.
|
inherited |
Definition at line 39 of file EntityDamageEvent.php.
|
inherited |
Definition at line 44 of file EntityDamageEvent.php.
|
inherited |
Definition at line 49 of file EntityDamageEvent.php.
|
inherited |
Definition at line 45 of file EntityDamageEvent.php.
|
inherited |
Definition at line 48 of file EntityDamageEvent.php.
|
inherited |
Definition at line 42 of file EntityDamageEvent.php.
|
inherited |
Definition at line 40 of file EntityDamageEvent.php.
|
inherited |
Definition at line 46 of file EntityDamageEvent.php.
|
inherited |
Definition at line 41 of file EntityDamageEvent.php.
|
inherited |
Definition at line 47 of file EntityDamageEvent.php.