Fixed some lines indented with 4 spaces rather than tabs

This commit is contained in:
SOF3
2016-10-03 00:58:34 +08:00
parent 6fc435da0e
commit e913b16804
56 changed files with 238 additions and 238 deletions

View File

@ -26,14 +26,14 @@ use pocketmine\math\Vector3;
use pocketmine\network\protocol\LevelEventPacket;
class DestroyBlockParticle extends Particle{
protected $data;
public function __construct(Vector3 $pos, Block $b){
parent::__construct($pos->x, $pos->y, $pos->z);
$this->data = $b->getId() + ($b->getDamage() << 12);
}
public function encode(){
$pk = new LevelEventPacket;
$pk->evid = LevelEventPacket::EVENT_PARTICLE_DESTROY;
@ -41,7 +41,7 @@ class DestroyBlockParticle extends Particle{
$pk->y = $this->y;
$pk->z = $this->z;
$pk->data = $this->data;
return $pk;
}
}

View File

@ -53,11 +53,11 @@ class FloatingTextParticle extends Particle{
public function setTitle($title){
$this->title = $title;
}
public function isInvisible(){
return $this->invisible;
}
public function setInvisible($value = true){
$this->invisible = (bool) $value;
}
@ -75,7 +75,7 @@ class FloatingTextParticle extends Particle{
}
if(!$this->invisible){
$pk = new AddEntityPacket();
$pk->eid = $this->entityId;
$pk->type = ItemEntity::NETWORK_ID;
@ -94,11 +94,11 @@ class FloatingTextParticle extends Particle{
Entity::DATA_NAMETAG => [Entity::DATA_TYPE_STRING, $this->title . ($this->text !== "" ? "\n" . $this->text : "")],
Entity::DATA_SHOW_NAMETAG => [Entity::DATA_TYPE_BYTE, 1],
Entity::DATA_NO_AI => [Entity::DATA_TYPE_BYTE, 1]
];
];
$p[] = $pk;
}
return $p;
}
}

View File

@ -25,7 +25,7 @@ use pocketmine\math\Vector3;
use pocketmine\network\protocol\LevelEventPacket;
class GenericParticle extends Particle{
protected $id;
protected $data;
@ -34,7 +34,7 @@ class GenericParticle extends Particle{
$this->id = $id & 0xFFF;
$this->data = $data;
}
public function encode(){
$pk = new LevelEventPacket;
$pk->evid = LevelEventPacket::EVENT_ADD_PARTICLE_MASK | $this->id;
@ -42,7 +42,7 @@ class GenericParticle extends Particle{
$pk->y = $this->y;
$pk->z = $this->z;
$pk->data = $this->data;
return $pk;
}
}

View File

@ -25,16 +25,16 @@ use pocketmine\math\Vector3;
use pocketmine\network\protocol\LevelEventPacket;
class MobSpawnParticle extends Particle{
protected $width;
protected $height;
public function __construct(Vector3 $pos, $width = 0, $height = 0){
parent::__construct($pos->x, $pos->y, $pos->z);
$this->width = $width;
$this->height = $height;
}
public function encode(){
$pk = new LevelEventPacket;
$pk->evid = LevelEventPacket::EVENT_PARTICLE_SPAWN;
@ -42,7 +42,7 @@ class MobSpawnParticle extends Particle{
$pk->y = $this->y;
$pk->z = $this->z;
$pk->data = ($this->width & 0xff) + (($this->height & 0xff) << 8);
return $pk;
}
}

View File

@ -58,7 +58,7 @@ abstract class Particle extends Vector3{
const TYPE_VILLAGER_ANGRY = 30;
const TYPE_VILLAGER_HAPPY = 31;
const TYPE_ENCHANTMENT_TABLE = 32;
/**
* @return DataPacket|DataPacket[]
*/