mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-22 10:56:35 +00:00
Added extra Entity metadata
This commit is contained in:
parent
8637b7f5a3
commit
c73a3e53be
@ -1218,7 +1218,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
|
||||
$entity->scheduleUpdate();
|
||||
}
|
||||
|
||||
if($entity instanceof Arrow and $entity->onGround and $this->motionX == 0 and $this->motionY == 0 and $this->motionZ == 0){
|
||||
if($entity instanceof Arrow and $entity->onGround){
|
||||
if($entity->dead !== true){
|
||||
$item = Item::get(Item::ARROW, 0, 1);
|
||||
if($this->isSurvival() and !$this->inventory->canAddItem($item)){
|
||||
|
@ -198,7 +198,9 @@ class Arrow extends Projectile{
|
||||
$flags |= $this->fireTicks > 0 ? 1 : 0;
|
||||
|
||||
return [
|
||||
0 => ["type" => 0, "value" => $flags]
|
||||
0 => ["type" => 0, "value" => $flags],
|
||||
1 => ["type" => 1, "value" => $this->airTicks],
|
||||
16 => ["type" => 0, "value" => 0] //Is critical
|
||||
];
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,6 @@ use pocketmine\event\entity\EntityDamageEvent;
|
||||
use pocketmine\event\entity\EntityDespawnEvent;
|
||||
use pocketmine\event\entity\EntityLevelChangeEvent;
|
||||
use pocketmine\event\entity\EntityMotionEvent;
|
||||
use pocketmine\event\entity\EntityMoveEvent;
|
||||
use pocketmine\event\entity\EntityRegainHealthEvent;
|
||||
use pocketmine\event\entity\EntitySpawnEvent;
|
||||
use pocketmine\event\entity\EntityTeleportEvent;
|
||||
|
Loading…
x
Reference in New Issue
Block a user