mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 02:08:21 +00:00
Added encode and decode methods for more packets
This commit is contained in:
@ -86,7 +86,7 @@ class Arrow extends Projectile{
|
||||
public function spawnTo(Player $player){
|
||||
$pk = new AddEntityPacket();
|
||||
$pk->type = Arrow::NETWORK_ID;
|
||||
$pk->eid = $this->getId();
|
||||
$pk->entityRuntimeId = $this->getId();
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y;
|
||||
$pk->z = $this->z;
|
||||
|
@ -145,7 +145,7 @@ class FallingSand extends Entity{
|
||||
public function spawnTo(Player $player){
|
||||
$pk = new AddEntityPacket();
|
||||
$pk->type = FallingSand::NETWORK_ID;
|
||||
$pk->eid = $this->getId();
|
||||
$pk->entityRuntimeId = $this->getId();
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y;
|
||||
$pk->z = $this->z;
|
||||
|
@ -511,7 +511,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
|
||||
$pk = new AddPlayerPacket();
|
||||
$pk->uuid = $this->getUniqueId();
|
||||
$pk->username = $this->getName();
|
||||
$pk->eid = $this->getId();
|
||||
$pk->entityRuntimeId = $this->getId();
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y;
|
||||
$pk->z = $this->z;
|
||||
|
@ -228,7 +228,7 @@ class Item extends Entity{
|
||||
|
||||
public function spawnTo(Player $player){
|
||||
$pk = new AddItemEntityPacket();
|
||||
$pk->eid = $this->getId();
|
||||
$pk->entityRuntimeId = $this->getId();
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y;
|
||||
$pk->z = $this->z;
|
||||
|
@ -146,7 +146,7 @@ class PrimedTNT extends Entity implements Explosive{
|
||||
public function spawnTo(Player $player){
|
||||
$pk = new AddEntityPacket();
|
||||
$pk->type = PrimedTNT::NETWORK_ID;
|
||||
$pk->eid = $this->getId();
|
||||
$pk->entityRuntimeId = $this->getId();
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y;
|
||||
$pk->z = $this->z;
|
||||
|
@ -62,7 +62,7 @@ class Snowball extends Projectile{
|
||||
public function spawnTo(Player $player){
|
||||
$pk = new AddEntityPacket();
|
||||
$pk->type = Snowball::NETWORK_ID;
|
||||
$pk->eid = $this->getId();
|
||||
$pk->entityRuntimeId = $this->getId();
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y;
|
||||
$pk->z = $this->z;
|
||||
|
@ -148,7 +148,7 @@ class Squid extends WaterAnimal implements Ageable{
|
||||
|
||||
public function spawnTo(Player $player){
|
||||
$pk = new AddEntityPacket();
|
||||
$pk->eid = $this->getId();
|
||||
$pk->entityRuntimeId = $this->getId();
|
||||
$pk->type = Squid::NETWORK_ID;
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y;
|
||||
|
@ -52,7 +52,7 @@ class Villager extends Creature implements NPC, Ageable{
|
||||
|
||||
public function spawnTo(Player $player){
|
||||
$pk = new AddEntityPacket();
|
||||
$pk->eid = $this->getId();
|
||||
$pk->entityRuntimeId = $this->getId();
|
||||
$pk->type = Villager::NETWORK_ID;
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y;
|
||||
|
@ -39,7 +39,7 @@ class Zombie extends Monster{
|
||||
|
||||
public function spawnTo(Player $player){
|
||||
$pk = new AddEntityPacket();
|
||||
$pk->eid = $this->getId();
|
||||
$pk->entityRuntimeId = $this->getId();
|
||||
$pk->type = Zombie::NETWORK_ID;
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y;
|
||||
|
Reference in New Issue
Block a user