mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
Protocol changes for 1.12.0.28
This commit is contained in:
@ -44,7 +44,7 @@ use pocketmine\nbt\tag\CompoundTag;
|
||||
use pocketmine\nbt\tag\FloatTag;
|
||||
use pocketmine\nbt\tag\IntTag;
|
||||
use pocketmine\nbt\tag\ListTag;
|
||||
use pocketmine\network\mcpe\protocol\EntityEventPacket;
|
||||
use pocketmine\network\mcpe\protocol\ActorEventPacket;
|
||||
use pocketmine\network\mcpe\protocol\LevelSoundEventPacket;
|
||||
use pocketmine\network\mcpe\protocol\MobEffectPacket;
|
||||
use pocketmine\Player;
|
||||
@ -143,7 +143,7 @@ abstract class Living extends Entity implements Damageable{
|
||||
parent::setHealth($amount);
|
||||
$this->attributeMap->getAttribute(Attribute::HEALTH)->setValue(ceil($this->getHealth()), true);
|
||||
if($this->isAlive() and !$wasAlive){
|
||||
$this->broadcastEntityEvent(EntityEventPacket::RESPAWN);
|
||||
$this->broadcastEntityEvent(ActorEventPacket::RESPAWN);
|
||||
}
|
||||
}
|
||||
|
||||
@ -606,7 +606,7 @@ abstract class Living extends Entity implements Damageable{
|
||||
}
|
||||
|
||||
protected function doHitAnimation() : void{
|
||||
$this->broadcastEntityEvent(EntityEventPacket::HURT_ANIMATION);
|
||||
$this->broadcastEntityEvent(ActorEventPacket::HURT_ANIMATION);
|
||||
}
|
||||
|
||||
public function knockBack(Entity $attacker, float $damage, float $x, float $z, float $base = 0.4) : void{
|
||||
@ -664,7 +664,7 @@ abstract class Living extends Entity implements Damageable{
|
||||
}
|
||||
|
||||
protected function startDeathAnimation() : void{
|
||||
$this->broadcastEntityEvent(EntityEventPacket::DEATH_ANIMATION);
|
||||
$this->broadcastEntityEvent(ActorEventPacket::DEATH_ANIMATION);
|
||||
}
|
||||
|
||||
protected function endDeathAnimation() : void{
|
||||
|
Reference in New Issue
Block a user