Particle::encode() now always returns ClientboundPacket[]

This commit is contained in:
Dylan K. Taylor
2020-10-31 15:51:17 +00:00
parent 5a320f22b7
commit 66edf5a165
38 changed files with 73 additions and 76 deletions

View File

@@ -493,9 +493,6 @@ class World implements ChunkManager{
*/
public function addParticle(Vector3 $pos, Particle $particle, ?array $players = null) : void{
$pk = $particle->encode($pos);
if(!is_array($pk)){
$pk = [$pk];
}
if(count($pk) > 0){
if($players === null){
foreach($pk as $e){