35    public static function create(
int $dimension, 
Vector3 $position, 
bool $respawn, ?
int $loadingScreenId) : self{
 
   37        $result->dimension = $dimension;
 
   38        $result->position = $position;
 
   39        $result->respawn = $respawn;
 
   40        $result->loadingScreenId = $loadingScreenId;
 
 
   47        $this->dimension = VarInt::readSignedInt($in);
 
   48        $this->position = CommonTypes::getVector3($in);
 
   49        $this->respawn = CommonTypes::getBool($in);
 
   50        $this->loadingScreenId = CommonTypes::readOptional($in, LE::readUnsignedInt(...));
 
 
   54        VarInt::writeSignedInt($out, $this->dimension);
 
   55        CommonTypes::putVector3($out, $this->position);
 
   56        CommonTypes::putBool($out, $this->respawn);
 
   57        CommonTypes::writeOptional($out, $this->loadingScreenId, LE::writeUnsignedInt(...));