Protocol changes for 1.8.0 release

This commit is contained in:
Dylan K. Taylor
2018-10-12 11:45:20 +01:00
parent f704061618
commit 30f5a8fac6
21 changed files with 494 additions and 30 deletions

View File

@ -24,6 +24,7 @@ declare(strict_types=1);
namespace pocketmine\item;
use pocketmine\entity\Entity;
use pocketmine\entity\EntityIds;
use pocketmine\entity\projectile\Projectile;
use pocketmine\event\entity\ProjectileLaunchEvent;
use pocketmine\math\Vector3;
@ -65,9 +66,7 @@ abstract class ProjectileItem extends Item{
}else{
$projectile->spawnToAll();
//319 is the Player's entity type ID in MCPE, with all its flags (which we don't know)
//without this, it doesn't work at all.
$player->getLevel()->broadcastLevelSoundEvent($player, LevelSoundEventPacket::SOUND_THROW, 319);
$player->getLevel()->broadcastLevelSoundEvent($player, LevelSoundEventPacket::SOUND_THROW, 0, EntityIds::PLAYER);
}
}elseif($projectile !== null){
$projectile->spawnToAll();