mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Added PhpDoc for packet field types and changed float x,y,z to Vector3
This commit is contained in:
@ -39,9 +39,7 @@ class DestroyBlockParticle extends Particle{
|
||||
public function encode(){
|
||||
$pk = new LevelEventPacket;
|
||||
$pk->evid = LevelEventPacket::EVENT_PARTICLE_DESTROY;
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y;
|
||||
$pk->z = $this->z;
|
||||
$pk->position = $this->asVector3();
|
||||
$pk->data = $this->data;
|
||||
|
||||
return $pk;
|
||||
|
@ -81,12 +81,7 @@ class FloatingTextParticle extends Particle{
|
||||
$pk = new AddEntityPacket();
|
||||
$pk->entityRuntimeId = $this->entityId;
|
||||
$pk->type = ItemEntity::NETWORK_ID;
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y - 0.75;
|
||||
$pk->z = $this->z;
|
||||
$pk->speedX = 0;
|
||||
$pk->speedY = 0;
|
||||
$pk->speedZ = 0;
|
||||
$pk->position = $this->asVector3()->subtract(0, 0.75, 0);
|
||||
$pk->yaw = 0;
|
||||
$pk->pitch = 0;
|
||||
$flags = (
|
||||
|
@ -40,9 +40,7 @@ class GenericParticle extends Particle{
|
||||
public function encode(){
|
||||
$pk = new LevelEventPacket;
|
||||
$pk->evid = LevelEventPacket::EVENT_ADD_PARTICLE_MASK | $this->id;
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y;
|
||||
$pk->z = $this->z;
|
||||
$pk->position = $this->asVector3();
|
||||
$pk->data = $this->data;
|
||||
|
||||
return $pk;
|
||||
|
@ -40,9 +40,7 @@ class MobSpawnParticle extends Particle{
|
||||
public function encode(){
|
||||
$pk = new LevelEventPacket;
|
||||
$pk->evid = LevelEventPacket::EVENT_PARTICLE_SPAWN;
|
||||
$pk->x = $this->x;
|
||||
$pk->y = $this->y;
|
||||
$pk->z = $this->z;
|
||||
$pk->position = $this->asVector3();
|
||||
$pk->data = ($this->width & 0xff) + (($this->height & 0xff) << 8);
|
||||
|
||||
return $pk;
|
||||
|
Reference in New Issue
Block a user